1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00
psyced/world/net/socks/socks.h

34 lines
853 B
C
Raw Normal View History

#define STATE_INITIAL 0
#define STATE_AUTH 1
#define STATE_REQUEST 2
#define STATE_READY 3
#define STATE_AUTH_USERPASS 4
#define STATE_LAST 5
#define STATE_CONNECT_PENDING 6
#define SOCKS5_VER 0x05
#define ADDR_IPV4 0x01
#define ADDR_DOMAINNAME 0x03
#define ADDR_IPV6 0x04
#define CMD_CONNECT 0x01
#define CMD_BIND 0x02
#define CMD_UDPASSOC 0x03
#define AUTHMECH_ANON 0x00
#define AUTHMECH_USERPASS 0x02
#define AUTHMECH_INVALID 0xFF
#define REPLY_SUCCESS 0x00
#define REPLY_GENERAL_FAILUR 0x01
#define REPLY_CONN_NOT_ALLOWED 0x02
#define REPLY_NETWORK_UNREACHABLE 0x03
#define REPLY_HOST_UNREACHABLE 0x04
#define REPLY_CONN_REFUSED 0x05
#define REPLY_TTL_EXPIRED 0x06
#define REPLY_CMD_NOT_SUPPORTED 0x07
#define REPLY_ADDR_NOT_SUPPORTED 0x08
#define SOCKS_ERROR(code) binary_message( ({ SOCKS5_VER, code, 0,1,0,0,0 }) ); remove_interactive(ME);