SOCKS5 bytestream module

Available since version 0.7.

The Vysper SOCKS5 Bytestream module implements mediated connections from XEP-0065 SOCKS5 Bytestream. Direct connections requires no support from the server and thus works without this module. For mediated connections, this module will supply a SOCKS5 proxy that transfers data between the requestor and target clients. The module also provides all the required service discovery support used to negotiate the address of the SOCKS5 proxy.

The example below shows how to add the module using the API:

XMPPServer server = new XMPPServer(“”);
server.addEndpoint(new TCPEndpoint());

// other initialization
server.addModule(new Socks5Module());


This will enable the SOCKS5 component on and start a proxy on port 5777. Make sure resolves to the server running Vysper.

To configure the subdomain name, provide the subdomain in the constructor:

server.addModule(new Socks5Module("proxy"));

In this case, the SOCKS5 component would be available on

It is also possible to supply a socket address on which the proxy will be listening. This can be used to configure the port for the proxy, or the local address to bind the proxy to. For example:

server.addModule(new Socks5Module("proxy", new InetSocketAddress("", 18100)));

With this code, the proxy will use the JID, the hostname and the port 18100. It will only listen on the network interface for

server.addModule(new Socks5Module("proxy";, new> InetSocketAddress(18100)));

In this case, the proxy will use the JID and hostname and the port 18100. It will listen on all network interfaces.


The module currently only supports unauthenticated SOCKS5 connections (support for username/password connections is tracked in VYSPER-280).