Cannot establish socks5 connection via dante
-
I need to send WireGuard handshake under Socks5 as my country is blocking simple WireGuard handshake. So I installed dante, configured it, opened port. But I have no idea why I can't use socks5.
/usr/local/etc/sockd.conf
logoutput: /var/log/sockd.log debug: 1 user.privileged: root user.unprivileged: nobody internal: 0.0.0.0 port = PORT external: vtnet0 # socks-rules determine what is proxied through the external interface. socksmethod: username # client-rules determine who can connect to the internal interface. clientmethod: none #permit clients inbound to the proxy client pass { from: 0.0.0.0/0 to: 0.0.0.0/0 log: error #connect disconnect } socks pass { from: 0.0.0.0/0 to: 0.0.0.0/0 log: error connect disconnect }
curl -v -x socks5://user:pass@ip:PORT-L ifconfig.co
* Trying ip:PORT... * SOCKS5 connect to IPv4 localip:80 (locally resolved) * connection to proxy closed * Closing connection 0 curl: (97) connection to proxy closed
/var/log/sockd.log (dropping messages)
Sep 27 03:18:19 (1695773899.720920) sockd[50492]: debug: accesscheck(): authentication matched Sep 27 03:18:19 (1695773899.721008) sockd[50492]: debug: run_negotiate(): recv_clientrequest() from client myip returned 2, errno is 0 (no error) Sep 27 03:18:19 (1695773899.776496) sockd[50492]: debug: recv_clientrequest(): fd 11, client myip, state->complete: 0, read so far: 26 Sep 27 03:18:19 (1695773899.776608) sockd[50492]: debug: run_negotiate(): recv_clientrequest() from client myip returned 3, errno is 0 (no error) Sep 27 03:18:19 (1695773899.776639) sockd[50492]: debug: send_negotiate(): no shmem to unuse/clear Sep 27 03:18:19 (1695773899.776749) sockd[50492]: debug: send_negotiate(): client myip finished negotiate phase for command udpassociate using proxyprotocol socks_v5 Sep 27 03:18:19 (1695773899.776787) sockd[50492]: debug: sendmsgn(): sendmsg() of 23272 bytes on fd 7 failed on try #0 (Message too long). Giving up on this one Sep 27 03:18:19 (1695773899.776830) sockd[50492]: debug: send_negotiate(): sending client to mother failed: Message too long Sep 27 03:18:19 (1695773899.776858) sockd[50492]: warning: new client from myip dropped: no resources
So what do I need to do?
-
I experienced this issue on FreeBSD 14.1 and figured out that increasing
net.local.dgram.maxdgram
to65536
fixes it.Hopefully this helps someone else trying to figure it out.