client.setSignatureFactories(Arrays.<NamedFactory<Signature>>asList(
new SignatureDSA.Factory(),
new SignatureRSA.Factory()));
client.setChannelFactories(Arrays.<NamedFactory<Channel>>asList(
new ChannelForwardedTcpip.Factory()));
ForwardingAcceptorFactory faf = new DefaultForwardingAcceptorFactory();
client.setTcpipForwardNioSocketAcceptorFactory(faf);
return client;
}