Plugs into Apache's HTTP async client to open a connection via a SOCKSv4 proxy.
This proxy can be set per request with the RequestConfig
.
It currently only supports SOCKSv4.
Adding SOCKSv4a and SOCKSv5 should be straightforward with the given extension points.
Either a new session scheme socks5
could be added or the SOCKS connection handling be adapted like in
java.net.SocksSocketImpl
that can degrade von v5 to v4.
SchemeIOSessionStrategy
is injected that supports the socks
scheme.
IOSession
in a Socks4IOSession
Socks4IOSession
puts itself on the IOSession
with a session attributeconnect
package is sent (see RFC)DefaultConnectingIOReactor
was extended with
SocksConnectingIOReactor
to wrap the IOEventDispatch
on execute(..)
with the SocksIOEventDispatchProxy
SocksIOEventDispatchProxy
Socks4IOSession
from the session attributes on inputReady(..)
Socks4IOSession
receives and verifies the SOCKS response