10000 New Feature: DNS over SOCKS by tw-datascientist · Pull Request #347 · dnsjava/dnsjava · GitHub
[go: up one dir, main page]

Skip to content
Open
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5ff82ed
added SOCKS5 support for DNS over tcp and udp (first working version)
Thomas-Internetx Oct 2, 2024
5a41225
refactored code for udp associate into IoClient
Thomas-Internetx Oct 3, 2024
bee0c76
added user/pwd authentication and refactored some of the code
Thomas-Internetx Oct 18, 2024
2a1192c
redo code changes in SimpleResolver and the IoClients
Thomas-Internetx Dec 5, 2024
80dfcb6
implemented SOCKS5 requests in an async way and added requested changes
Thomas-Internetx Dec 5, 2024
156c797
clean up
Thomas-Internetx Dec 5, 2024
3dae148
integration of SOCKS5 with the current selector thread and timeout im…
Thomas-Internetx Jan 10, 2025
8efe515
channel pool for UDP associate
tw-datascientist Jan 12, 2025
f9c1feb
integration the UDP channel pool
Thomas-Internetx Jan 12, 2025
9d0df8b
clean up of idle udp associate connections
Thomas-Internetx Jan 17, 2025
44f4415
further cleanup of the NioSocksHandler
Thomas-Internetx Jan 18, 2025
4cfaf31
better error handling
Thomas-Internetx Jan 18, 2025
07a6977
cleanup
Thomas-Internetx Jan 18, 2025
c365e36
adjustments for the socks5 handshake future
Thomas-Internetx Jan 18, 2025
260c4d5
Make compatible with Java 8
Thomas-Internetx Jan 18, 2025
02c3168
adjusting changes to upstream
Thomas-Internetx Jan 25, 2025
588df3d
clean up
Thomas-Internetx Jan 25, 2025
46a1b24
added testcontainer
Thomas-Internetx Jan 25, 2025
66a1e1d
adjusted corefile path
Thomas-Internetx Jan 25, 2025
ba1ea1c
adjusted corefile path
Thomas-Internetx Jan 25, 2025
baf40f2
adjusted docker compose setup
Thomas-Internetx Jan 25, 2025
ba11e90
adjusted docker compose setup
Thomas-Internetx Jan 25, 2025
8b71b09
implemented simple test for DNS over Socks
Thomas-Internetx Jan 25, 2025
c0ffa87
implemented simple test for DNS over Socks
Thomas-Internetx Jan 25, 2025
f36df78
implemented simple test for DNS over Socks
Thomas-Internetx Jan 25, 2025
240d206
implemented simple test for DNS over Socks
Thomas-Internetx Jan 25, 2025
c807b02
implemented simple test for DNS over Socks
Thomas-Internetx Jan 25, 2025
d0f3460
implemented simple test for DNS over Socks
Thomas-Internetx Jan 25, 2025
1f88de9
adjusting changes to upstream
Thomas-Internetx Jan 25, 2025
02ef998
adjusting changes to upstream
Thomas-Internetx Jan 25, 2025
3970b97
further clean up
Thomas-Internetx Jan 25, 2025
00bdea2
further clean up
Thomas-Internetx Jan 25, 2025
688fe6d
further clean up
Thomas-Internetx Jan 25, 2025
e94d15c
further clean up
Thomas-Internetx Jan 25, 2025
b621b32
improved comment for DST.ADDR and DST.PORT in the SOCKS handshake
Thomas-Internetx Jan 26, 2025
a12d004
improved comment for static registrationQueue and channelMap
Thomas-Internetx Jan 26, 2025
a8be13b
improved comment for response to future mapping
Thomas-Internetx Jan 26, 2025
fe2a79e
added step for docker setup
Thomas-Internetx Jan 26, 2025
73c0db0
set DOCKER_HOST
Thomas-Internetx Jan 26, 2025
99455be
reduced logs for Testcontainers
Thomas-Internetx Jan 26, 2025
fb3f015
fixed format violations
Thomas-Internetx Jan 26, 2025
938e726
fixed format violations
Thomas-Internetx Jan 26, 2025
8000 b255bc3
try to make Testcontainers work with windows https://java.testcontain…
Thomas-Internetx Jan 26, 2025
10141bc
try to make Testcontainers work with windows https://java.testcontain…
Thomas-Internetx Jan 26, 2025
7caf075
try to make Testcontainers work with windows https://java.testcontain…
Thomas-Internetx Jan 26, 2025
fd301ba
try to make Testcontainers work with windows https://java.testcontain…
Thomas-Internetx Jan 26, 2025
3b62593
try to make Testcontainers work with windows https://java.testcontain…
Thomas-Internetx Jan 26, 2025
b97610d
try to make Testcontainers work with windows https://java.testcontain…
Thomas-Internetx Jan 26, 2025
4008b84
try to make Testcontainers work with windows https://java.testcontain…
Thomas-Internetx Jan 26, 2025
d416209
try to make Testcontainers work with windows https://java.testcontain…
Thomas-Internetx Jan 26, 2025
7b37e19
removed differentiation of remote address for SocksUdpAssociateChanne…
Thomas-Internetx Feb 9, 2025
d8dde40
fixed style
Thomas-Internetx Feb 10, 2025
be7245c
fixed style
Thomas-Internetx Feb 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
< D784 /div>
Prev Previous commit
Next Next commit
improved comment for DST.ADDR and DST.PORT in the SOCKS handshake
  • Loading branch information
Thomas-Internetx committed Jan 26, 2025
commit b621b3229f6c292eef22eda383b5bf61459b7e1d
12 changes: 6 additions & 6 deletions src/main/java/org/xbill/DNS/NioSocksHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ public CompletableFuture<byte[]> doSocks5Request(
NioTcpHandler.ChannelState channel, byte socks5Cmd, Message query, long endTime) {
CompletableFuture<byte[]> cmdHandshakeF = new CompletableFuture<>();
CompletableFuture<byte[]> commandF = new CompletableFuture<>();
// For CONNECT, DST.ADDR and DST.PORT are the address and port of the destination server.
// For UDP ASSOCIATE, DST.ADDR and DST.PORT are the address and port of the UDP client.
// If DST.ADDR and DST.PORT are set to 0.0.0.0:0, the proxy will accept UDP connections from any
// source address and port.
// After the first packet, the source address and port must not change. If they change, the
// proxy drops the connection and the UDP association.
// For CONNECT, DST.ADDR and DST.PORT represent the host and port of the remote address.
// For UDP ASSOCIATE, DST.ADDR and DST.PORT represent the destination of the returning UDP packets.
// If DST.ADDR and DST.PORT are set to 0.0.0.0:0, the proxy will send the packets back the same way.
// This allows it to work in a NAT-ed network.
// After the first packet, the source address and port must not change. If they do, the
// proxy will drop the connection and the UDP association.
InetSocketAddress address =
(socks5Cmd == SOCKS5_CMD_CONNECT) ? remoteAddress : new InetSocketAddress("0.0.0.0", 0);
CmdRequest cmdRequest = new CmdRequest(socks5Cmd, address);
Expand Down
Loading
0