Title: New Feature: DNS over SOCKS by tw-datascientist · Pull Request #347 · dnsjava/dnsjava · GitHub
Open Graph Title: New Feature: DNS over SOCKS by tw-datascientist · Pull Request #347 · dnsjava/dnsjava
X Title: New Feature: DNS over SOCKS by tw-datascientist · Pull Request #347 · dnsjava/dnsjava
Description: I added SOCKS5 support to the ioClients.
It does work for TCP and UDP (udp associate).
It also supports user/pwd authentication.
The implementation is based on
RFC 1928: SOCKS Protocol Version 5 (https://datatracker.ietf.org/doc/html/rfc1928)
RFC 1929: Username/Password Authentication for SOCKS V5 (https://datatracker.ietf.org/doc/html/rfc1929)
I tested it on a Dante SOCKS5 proxy with following config.
# logging
errorlog: /var/log/sockd.errlog
logoutput: /var/log/sockd.log
# server address specification
internal: 0.0.0.0 port = 1080
external: eth0
# auth
#user.privileged: root
user.notprivileged: nobody
socksmethod: none # "none" or "username" user/pwd auth
# Allow everyone to connect to this server.
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: connect disconnect error
}
# Allow all operations for connected clients on this server.
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: bind connect udpassociate
log: connect disconnect iooperation error
socksmethod: none # "none" or "username" user/pwd auth
udp.portrange: 10000-10001
}
# Allow all inbound packets.
socks pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
command: bindreply udpreply
log: error connect disconnect iooperation
}
You should be able to install the Dante SOCKS5 proxy via package managers like apt, apk or brew.
I can also provide you a Docker setup.
I tried it like
InetSocketAddress localAddress = new InetSocketAddress(InetAddress.getByName("0.0.0.0"), 0);
InetSocketAddress remoteAddress = new InetSocketAddress(InetAddress.getByName("1.1.1.1"), 53);
InetSocketAddress proxyAddress = new InetSocketAddress(InetAddress.getByName("
Open Graph Description: I added SOCKS5 support to the ioClients. It does work for TCP and UDP (udp associate). It also supports user/pwd authentication. The implementation is based on RFC 1928: SOCKS Protocol Version 5 (...
X Description: I added SOCKS5 support to the ioClients. It does work for TCP and UDP (udp associate). It also supports user/pwd authentication. The implementation is based on RFC 1928: SOCKS Protocol Version 5 (...
Opengraph URL: https://github.com/dnsjava/dnsjava/pull/347
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:1b445ba7-90a3-6a9a-42cb-a42abdbae9f5 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 9FB0:16695D:12C9406:1A379D0:696F43BC |
| html-safe-nonce | 98b1352065243593e3061c8c0766c171b229fb76e815e502cd94f774b497f4dc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkIwOjE2Njk1RDoxMkM5NDA2OjFBMzc5RDA6Njk2RjQzQkMiLCJ2aXNpdG9yX2lkIjoiMTA5Njc0NTI0NTQwNDUxMzIxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6a630018df12823ea412b156f28ddcceaaceafd4dd54095fadcc9ebb02fdd696 |
| hovercard-subject-tag | pull_request:2133853020 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/dnsjava/dnsjava/pull/347/checks |
| twitter:image | https://avatars.githubusercontent.com/u/106313256?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/106313256?s=400&v=4 |
| og:image:alt | I added SOCKS5 support to the ioClients. It does work for TCP and UDP (udp associate). It also supports user/pwd authentication. The implementation is based on RFC 1928: SOCKS Protocol Version 5 (... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee |
| turbo-cache-control | no-cache |
| go-import | github.com/dnsjava/dnsjava git https://github.com/dnsjava/dnsjava.git |
| octolytics-dimension-user_id | 6755615 |
| octolytics-dimension-user_login | dnsjava |
| octolytics-dimension-repository_id | 17084567 |
| octolytics-dimension-repository_nwo | dnsjava/dnsjava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17084567 |
| octolytics-dimension-repository_network_root_nwo | dnsjava/dnsjava |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 39aed5006635ab6f45e6b77d23e73b08a00272a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width