Hello,

I am trying to patch QuickFIX/J to use  SOCKS Proxy connections. 

 I found a patch on the QuickFIX/J Jira  (QFJ-285), which I used as a start, 
and which, after some
tweaking, I got to work with Mina-2.0.10/Mina-2.0.11. 

The main problem, when doing so, was, that I had to disable the autostart 
feature of the SslFilter
in order to build the filterchain (ProxyFilter, SslFilter, FixProtocolFilter) 
without exceptions, and there wasn't a public function
to start  the Ssl handshake later on (SslFilter.startSsl only works after the 
initial handshake, not if autostart=false).

I solved the problem by making the function "SslFilter.initiateHandshake" 
public, and executing the following code
in the event handler "AbstractProxyIoHandler. proxySessionOpened":

    @Override
    public void proxySessionOpened(IoSession session) throws Exception {
        log.info("proxySessionOpened called");
        if (sslFilter != null) {
            IoFilter.NextFilter nextFilter = 
session.getFilterChain().getNextFilter(sslFilter);
            sslFilter.initiateHandshake(nextFilter, session);
        }
    }

Maybe you can incorporate the same change in the Mina code (making 
initiateHandshake public, I mean), or provide some other means
 to initiate the first SSL handshake, when autostart=false.

Regards.
Norbert 




Reply via email to