-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hi!
I am observing strange behavior when connecting with username/password via a SOCKS5 proxy.
The connection to some proxy servers is fine, but when I try to connect to other servers, I get an error CONNECTION_NOT_ALLOWED.
I am always using standard connection method:
private SocketFactory getSocksSocketFactory() { final InetSocketAddress address = new InetSocketAddress(request.proxyIp, Integer.parseInt(request.proxyPort)); final AuthenticationCredentials credentials = getCredentials(); final BrokerConfiguration configuration = new StandardBrokerConfiguration(SOCKS5, address, credentials); final SocketFactory defaultSocketFactory = SocketFactory.getDefault(); return new BrokeredSocketFactory(configuration, defaultSocketFactory); }
Trace is:
Caused by: java.net.ConnectException: SOCKS Connect Request Failed: [CONNECTION_NOT_ALLOWED] Status [2] at com.exceptionfactory.socketbroker.protocol.socks.Socks5SocketBroker.connect(Socks5SocketBroker.java:95) at com.exceptionfactory.socketbroker.BrokeredSocket.connect(BrokeredSocket.java:103)
Please tell me where is the problem?