powered by Jive Software

SOCKS support for Gateways?

I need to connect my aim transport through a SOCKS server without forcing all TCP connections (such as JDBC) to get proxied.

As a quick hack, I made the following changes to the gateway:

  1. Update AbstractFlapConnection.java:
public AbstractFlapConnection(ConnDescriptor cd, OSCARSession mainSession) {
    super(cd); // Hand off to ClientFlapConn
    super.setSocketFactory(new GatewaySocketFactory()); //added this line
    initBaseFlapConnection();
    oscarSessionRef = new WeakReference<OSCARSession>(mainSession);
}
  1. Create GatewaySocketFactory.java (see attached)

This is proof of concept code I hacked together, not production quality.

Has anyone else run into this issue? Should this be handled some other way?
GatewaySocketFactory.java (2348 Bytes)

Hey great research! This will help me a lot! Support for Socks/etc proxies is scheduled for 1.3.0 btw.

GATE-130