![]() If it represents address 0.0.0.x with nonzero x, the server must read in the domain name that the client sends in the packet. ![]() SOCKS4_C SOCKS4 client handshake packet (above) DOMAIN the domain name of the host to contact, null (0x00) terminatedĪ server using protocol SOCKS4a must check the DSTIP in the request packet. This is used for both "connect" and "bind" requests. (This corresponds to IP address 0.0.0.x, with x nonzero, an inadmissible destination address and thus should never occur if the client can resolve the domain name.) Following the NULL byte terminating USERID, the client must send the destination domain name and terminate it with another NULL byte. The client should set the first three bytes of DSTIP to NULL and the last byte to a non-zero value. It was proposed by Ying-Da Lee, the author of SOCKS4. SOCKS4a extends the SOCKS4 protocol to allow a client to specify a destination domain name rather than an IP address this is useful when the client itself cannot resolve the destination host's domain name to an IP address. The command field may be 0x01 for "connect" or 0x02 for "bind" the "bind" command allows incoming connections for protocols such as active FTP. The SOCKS4 protocol specifies that the values of these bytes should be ignored.įrom this point onwards, any data sent from the SOCKS client to the SOCKS server is relayed to 66.102.7.99, and vice versa. Server: 0x00 | 0x5A | 0xXX 0xXX | 0xXX 0xXX 0xXX 0xXX.The last field is "Fred" in ASCII, followed by a null byte.Request failed because client's identd could not confirm the user ID in the requestĭSTPORT destination port, meaningful if granted in BIND, otherwise ignore DSTIP destination IP, as above – the ip:port the client should bind toįor example, this a SOCKS4 request to connect Fred to 66.102.7.99:80, the server replies with an "OK": Request failed because client is not running identd (or not reachable from server) VN reply version, null byte REP reply code Byte 0x01 = establish a TCP/IP stream connectionĭSTPORT 2-byte port number (in network byte order) DESTIP IPv4 Address, 4 bytes (in network byte order) ID the user ID string, variable length, null-terminated. ![]() VER SOCKS version number, 0x04 for this version CMD command code: This can free the user from the limitations of connecting only to a predefined remote port and server.Ī typical SOCKS4 connection request looks like this:
0 Comments
Leave a Reply. |