[Pidgin] #3230: Allow DNS lookups via socks proxy option

Pidgin trac at pidgin.im
Thu Apr 24 03:53:51 EDT 2008


#3230: Allow DNS lookups via socks proxy option
----------------------------+-----------------------------------------------
  Reporter:  timrichardson  |       Owner:                 
      Type:  enhancement    |      Status:  new            
  Priority:  minor          |   Milestone:  Patches welcome
 Component:  libpurple      |     Version:  2.2.0          
Resolution:                 |    Keywords:                 
   Pending:  0              |  
----------------------------+-----------------------------------------------
Comment (by sandrewh):

 SOCKS4 does not support specifying domain names (only IP's.)
 However, SOCKS4/a and SOCKS5 do.
 After a quick look at libpurple::proxy.c, it looks like when using SOCKS5,
 what the user enters is what is sent to the SOCKS server, with no DNS
 lookup.

 In regards to SOCKS4/a, proxy.c contains the following comments:
 {{{
 /*
   * The socks4 spec doesn't include support for doing host name
   * lookups by the proxy.  Some socks4 servers do this via
   * extensions to the protocol.  Since we don't know if a
   * server supports this, it would need to be implemented
   * with an option, or some detection mechanism - in the
   * meantime, stick with plain old SOCKS4.
   */
 }}}

 The SOCKS4/a spec is compatible with SOCKS4.  In SOCKS4/a the IP address
 is sent as 0.0.0.0 (to indicate a domain name will follow the username).

 I suggest the following alternative:
 The client should initially connect the SOCKS4 server and "speak"
 SOCKS4/a.  If the server does not support 4/a, it will most likely simply
 return an error to the client (as it will not like 0.0.0.0).  In this
 case, the client can either resolve the hostname itself and reconnect
 using SOCKS4 (leaking the DNS request) or simply give up (safer, but not
 user-friendly).

-- 
Ticket URL: <http://developer.pidgin.im/ticket/3230#comment:2>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list