My questions:
1) How can I use dante as a SOCKS v5 proxy, without authentication to send amqp messages from a producer to RabbitMQ in a docker-compose network?
2) I've never used SOCKS before so I have no idea if what I'm trying to do is stupid or not supposed to work, is it?
I'm currently trying to set up a network with three parts:
- A proxy server (Dante)
- A RabbitMQ server.
- A message producer.
I want to proxy my messages through Dante to rabbitMQ.
To achieve this I've started my producer with the following option:
-DsocksProxyHost=dante
I'm running the applications with a docker compose script, and I can verify that my producer connects to the host dante
. However my producer always tries to connect with the current users credentials, i.e root (or socksuser if I change the user), ignoring the options:
-Djava.net.socks.username=socksuser
-Djava.net.socks.password=sockspass
Which I can verify are set with the following output from docker compose:
app_1 | Connecting to proxy host: dante app_1 | User: socksuser with password: sockspass app_1 | dante_1 | Jan 24 15:01:41 (1516806101.263639) sockd[7]: info: pass(1): tcp/accept [: 172.19.0.4.40910 172.19.0.3.1080 dante_1 | Jan 24 15:01:41 (1516806101.265226) sockd[7]: info: block(1): tcp/accept ]: 172.19.0.4.40910 172.19.0.3.1080: error after reading 11 bytes in 0 seconds: system password authentication failed for user "root" app_1 | java.net.SocketException: SOCKS : authentication failed app_1 | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:473)
The dante docker image I'm using is wernight/dante, with the default configuration provided which states that everyone is allowed to use the proxy.