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.
- A
SchemeIOSessionStrategyis injected that supports thesocksscheme.- It wraps the
IOSessionin aSocks4IOSession - The
Socks4IOSessionputs itself on theIOSessionwith a session attribute - A SOCKS
connectpackage is sent (see RFC)
- It wraps the
- In order to be able to await the SOCKS reply the
DefaultConnectingIOReactorwas extended withSocksConnectingIOReactorto wrap theIOEventDispatchonexecute(..)with theSocksIOEventDispatchProxy - The
SocksIOEventDispatchProxy- extracts the
Socks4IOSessionfrom the session attributes oninputReady(..) Socks4IOSessionreceives and verifies the SOCKS response- does some ugly error handling
- extracts the