精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>C/C++>>资料汇编----------藏经阁>>RFC&STD>>SOCKS 4A: A Simple Extension to SOCKS 4 Protocol

主题:SOCKS 4A: A Simple Extension to SOCKS 4 Protocol
发信人: wenbobo(灌了拂衣去)
整理人: wenbobo(2002-08-14 14:56:37), 站内信件
        SOCKS 4A: A  Simple Extension to SOCKS 4 Protocol

                        Ying-Da Lee
                [email protected]  or  [email protected]

Please read SOCKS4.protocol first for an description of the version 4
protocol. This extension is intended to allow the use of SOCKS on hosts
which are not capable of resolving all domain names.

In version 4, the client sends the following packet to the SOCKS server
to request a CONNECT or a BIND operation:

                +----+----+----+----+----+----+----+----+----+----+....+----+
                | VN | CD | DSTPORT |      DSTIP        | USERID       |NULL|
                +----+----+----+----+----+----+----+----+----+----+....+----+
 # of bytes:       1    1      2              4           variable       1

VN is the SOCKS protocol version number and should be 4. CD is the
SOCKS command code and should be 1 for CONNECT or 2 for BIND. NULL
is a byte of all zero bits.

For version 4A, if the client cannot resolve the destination host's
domain name to find its IP address, it should set the first three bytes
of DSTIP to NULL and the last byte to a non-zero value. (This corresponds
to IP address 0.0.0.x, with x nonzero. As decreed by IANA  -- The
Internet Assigned Numbers Authority -- such an address is inadmissible
as a destination IP address and thus should never occur if the client
can resolve the domain name.) Following the NULL byte terminating
USERID, the client must sends the destination domain name and termiantes
it with another NULL byte. This is used for both CONNECT and BIND requests.

A server using protocol 4A must check the DSTIP in the request packet.
If it represent address 0.0.0.x with nonzero x, the server must read
in the domain name that the client sends in the packet. The server
should resolve the domain name and make connection to the destination
host if it can. 

SOCKSified sockd may pass domain names that it cannot resolve to
the next-hop SOCKS server.



----
GVC广州研发中心(广州天河)招聘
软件工程师,计算机专业,C/C++,Embedded RTOS或者Win32开发

有兴趣请给我发简历

两种工作
1、ADSL/路由器嵌入开发,用arm-gcc,需要对网络协议栈非常熟悉(主要在2,3,4层作开发)
2、Windows程序,用bcb,要对串并口,I/O操作,PCI Spec等熟悉

公司简介
致福股份有限公司(GVC Corporation),成立于1979年,目前海内外员工合计超过3000,主要从事通讯产品的研发和生产,包括手机,Modem等等。公司网址:http://www.gvc.com。GVC公司属于光宝集团(Lite-On, Inc.),成立于1975年,网址是http://www.liteon.com,要了解进一步的信息,请查阅我们的网站资料。


广州社区C语言版        我的纯音乐网站
  

[关闭][返回]