4.23.5.2. AbstractSocksProxy methods

MethodDescription
requestForward(self, ip, port) Called when the SOCKS protocol reaches forward state.

Table 4.69. Method summary

Method requestForward(self, ip, port)

This method must determine whether to stack another proxy class into the traffic, or simply forward the traffic without analyzing. The method can raise an exception which will result in denying any traffic. The default behavior is to forward traffic without analyzing.

Arguments of requestForward
IP (string)
Default: n/a
The IP address of the target host.

port (integer)
Default: n/a
The port number to connect to.

return (complex)
Default: n/a
Tuple of SOCKS_STK_* and a class. SOCKS_STK_NONE will result in simple forwarding, while SOCKS_STK_DATA will start a stacked proxy instance of the returned class.