nf_srv_tcpSetProxy

Redirect TCP connection with given id to the specified SOCKS proxy from tcpConnectRequest event. If id is zero, the function specifies proxy for all TCP connections, and can be called from any place after nf_srv_init.
NF_STATUS nf_srv_tcpSetProxy(ENDPOINT_ID id, SRV_PROXY_TYPE proxyType, const char * proxyAddress, int proxyAddressLen, const char * userName, const char * userPassword)

Parameters

id
Connection identifier
proxyType
Type of proxy (SRVPROXY_NONE or SRVPROXY_SOCKS5)
proxyAddress
Network address of the proxy (sockaddr_in or sockaddr_in6)
proxyAddressLen
Size of proxyAddress
userName
Optional proxy user name (can be NULL)
userPassword
Optional proxy password (can be NULL)

Return Values

NF_STATUS_SUCCESS on success, or other NF_STATUS error code on fail.

Remarks

If id is zero, the function specifies proxy for all TCP connections, and can be called from any place after nf_srv_init.

Requirements

Header nfsrvapi.h
Library nfsrvapi.lib