Changeset View
Changeset View
Standalone View
Standalone View
src/netbase.cpp
Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | struct timeval MillisToTimeval(int64_t nTimeout) { | ||||
return timeout; | return timeout; | ||||
} | } | ||||
/** SOCKS version */ | /** SOCKS version */ | ||||
enum SOCKSVersion : uint8_t { SOCKS4 = 0x04, SOCKS5 = 0x05 }; | enum SOCKSVersion : uint8_t { SOCKS4 = 0x04, SOCKS5 = 0x05 }; | ||||
/** Values defined for METHOD in RFC1928 */ | /** Values defined for METHOD in RFC1928 */ | ||||
enum SOCKS5Method : uint8_t { | enum SOCKS5Method : uint8_t { | ||||
NOAUTH = 0x00, //! No authentication required | NOAUTH = 0x00, //!< No authentication required | ||||
GSSAPI = 0x01, //! GSSAPI | GSSAPI = 0x01, //!< GSSAPI | ||||
USER_PASS = 0x02, //! Username/password | USER_PASS = 0x02, //!< Username/password | ||||
NO_ACCEPTABLE = 0xff, //! No acceptable methods | NO_ACCEPTABLE = 0xff, //!< No acceptable methods | ||||
}; | }; | ||||
/** Values defined for CMD in RFC1928 */ | /** Values defined for CMD in RFC1928 */ | ||||
enum SOCKS5Command : uint8_t { | enum SOCKS5Command : uint8_t { | ||||
CONNECT = 0x01, | CONNECT = 0x01, | ||||
BIND = 0x02, | BIND = 0x02, | ||||
UDP_ASSOCIATE = 0x03 | UDP_ASSOCIATE = 0x03 | ||||
}; | }; | ||||
/** Values defined for REP in RFC1928 */ | /** Values defined for REP in RFC1928 */ | ||||
enum SOCKS5Reply : uint8_t { | enum SOCKS5Reply : uint8_t { | ||||
SUCCEEDED = 0x00, //! Succeeded | SUCCEEDED = 0x00, //!< Succeeded | ||||
GENFAILURE = 0x01, //! General failure | GENFAILURE = 0x01, //!< General failure | ||||
NOTALLOWED = 0x02, //! Connection not allowed by ruleset | NOTALLOWED = 0x02, //!< Connection not allowed by ruleset | ||||
NETUNREACHABLE = 0x03, //! Network unreachable | NETUNREACHABLE = 0x03, //!< Network unreachable | ||||
HOSTUNREACHABLE = 0x04, //! Network unreachable | HOSTUNREACHABLE = 0x04, //!< Network unreachable | ||||
CONNREFUSED = 0x05, //! Connection refused | CONNREFUSED = 0x05, //!< Connection refused | ||||
TTLEXPIRED = 0x06, //! TTL expired | TTLEXPIRED = 0x06, //!< TTL expired | ||||
CMDUNSUPPORTED = 0x07, //! Command not supported | CMDUNSUPPORTED = 0x07, //!< Command not supported | ||||
ATYPEUNSUPPORTED = 0x08, //! Address type not supported | ATYPEUNSUPPORTED = 0x08, //!< Address type not supported | ||||
}; | }; | ||||
/** Values defined for ATYPE in RFC1928 */ | /** Values defined for ATYPE in RFC1928 */ | ||||
enum SOCKS5Atyp : uint8_t { | enum SOCKS5Atyp : uint8_t { | ||||
IPV4 = 0x01, | IPV4 = 0x01, | ||||
DOMAINNAME = 0x03, | DOMAINNAME = 0x03, | ||||
IPV6 = 0x04, | IPV6 = 0x04, | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 564 Lines • Show Last 20 Lines |