Details
OppySOCKSProtocol instances handle the initial SOCKS 5 handshake with client applications, passing the remote resource request to a stream, and then forwarding data back and forth between a circuit and a local application.
An OppySOCKSProtocol instance is assigned to each incoming request on the SOCKS port, and upon successful handshake negotiaton a stream is created for the client application’s request.
Once the client has made a successful request, this object goes into the forwarding state in which it:
- forwards all subsequent data from the client to the remote resource (through a circuit)
- sends all data written to this object’s writeData() method to the client application
Throughout this process, this object communicates with the client application via transport, as usual for Twisted Protocol objects.
Bases: twisted.internet.protocol.Protocol
Do SOCKS 5 handshake and forward local traffic to streams.
Either handle an incoming SOCKS handshake, make a new stream request, or forward application data on to a stream.
Called when data is received from a local application.
Parameters: | data (str) – data that was received |
---|
Write received data to local client application.
Parameters: | data (str) – data to write |
---|
Lose this transports local connection.
Called by the attached stream when we want to signal to a local application that this connection has closed.
Bases: twisted.internet.protocol.ServerFactory
Serve OppySOCKSProtocol instances.
alias of OppySOCKSProtocol