// Create a SOCKS proxy.
proxy = new Proxy(Proxy.Type.SOCKS, torSocketAddress);
} else {
// Use localhost port 8118 as the socket address.
// Create a SOCKS proxy.
proxy = new Proxy(Proxy.Type.SOCKS, torSocketAddress);
} else {
// Use localhost port 8118 as the socket address.