beautypg.com

Appendix vii: socks information, continued, The client’s authentication request is, Server response for authentication – Fairbanks FB3000 II Operators Manual User Manual

Page 63: The client’s connection request is

background image

Appendix VII: SOCKS Information

02/10

63

51220 Rev. 1

APPENDIX VII: SOCKS INFORMATION, CONTINUED

The subsequent authentication is method-dependent and described in RFC 1929.

The client’s authentication request is:

Field 1: Version number, 1 byte (must be 0x01).
Field 2: Username length, 1 byte.
Field 3: Username.
Field 4: Password length, 1 byte.
Field 5: Password.

Server response for authentication:

Field 1: Version, 1 byte.
Field 2: Status code, 1 byte.

0x00 = success.

Any other value = failure, connection must be closed.

The client’s connection request is:

Field 1: SOCKS version number, 1 byte (must be 0x05 for this version).
Field 2: Command code, 1 byte:

0x01 = establish a TCP/IP stream connection.

0x02 = establish a TCP/IP port binding.

0x03 = associate a UDP port.

Field 3: Reserved, must be 0x00.
Field 4: Address type, 1 byte:

0x01 = Ipv4 address.

0x03 = Domain name.

0x04 = Ipv6 address.

Field 5: Destination address of:

4 bytes for Ipv4 address.

1 byte of name length followed by the name for Domain name.

16 bytes for Ipv6 address.

Field 6: Port number in a network byte order, 2 bytes.