![]() |
All SOCKS implementations should support the Username/Password (RFC 1929) authentication
method (0x02
).
If the server has agreed with Username/Password authentication, the client should send a message with in following format:
+-----+--------+-----+-------+-----+ | VER | IDLEN | ID | PWLEN | PW | +-----+--------+-----+-------+-----+ 1 1 1-255 1 1-255
where:
VER
: Username/Password protocol version number (1 byte:
0x01
)
IDLEN
: Username length (1 byte)
ID
: Username as bytestring (1-255 bytes)
PWLEN
: Password length (1 byte)
PW
: Username as bytestring (1-255 bytes)
The SOCKS server should create an authentication response in the following format:
+-----+--------+ | VER | STATUS | +-----+--------+ 1 1
where:
VER
: Username/Password protocol version number (1 byte:
0x01
)
STATUS
: 0x00
for success or any other value
for failure.