You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting the wildcard-domain-handling to INTERNAL and connecting to asdf\x07localhost:25566\x071.20.4 results in the client connecting to 127.0.0.1:25566 and sending the hostname in the intention packet as localhost. The expected behavior is that it would send asdf as the hostname instead.
This seems to be because the clientHandshakeAddress variable that's set to the first argument you passed, is never used when constructing the ClientIntention packet to send:
Though, clientHandshakeAddress can be null if it's invalid, so I guess it should show an error or use the old code as a fallback or something in that case.
The text was updated successfully, but these errors were encountered:
ViaProxy never sends the original handshake address to the server, as that would be the wrong behaviour and easily blockable by servers (And some, especially Anti-DDoS provider even do that already). Instead it replaces it with the configured target address which results in it sending the same data to the server as a vanilla client connecting directly to the server.
The point of passing the original handshake address (asdf in your example) is purely for ViaProxy internal handling. An example of its usage is the transfer packet handler. The transfer packet handler rewrites the target address of incoming transfer packets to the client handshake address, so the client reconnects to ViaProxy instead of connecting to the target server directly.
I will note that it would be a little useful to be able to modify the connection IP address independently from the hostname sent in the intention packet, as it's possible for servers to have special behavior for hostnames that aren't resolvable. But to be fair, I can't think of any real servers that do this that wouldn't already be covered by the existing splitting by \0. It's not a massive deal, I appreciate your response. <3
Setting the
wildcard-domain-handling
toINTERNAL
and connecting toasdf\x07localhost:25566\x071.20.4
results in the client connecting to127.0.0.1:25566
and sending the hostname in the intention packet aslocalhost
. The expected behavior is that it would sendasdf
as the hostname instead.This seems to be because the
clientHandshakeAddress
variable that's set to the first argument you passed, is never used when constructing the ClientIntention packet to send:ViaProxy/src/main/java/net/raphimc/viaproxy/proxy/client2proxy/Client2ProxyHandler.java
Lines 269 to 275 in 1757724
The correct code here would be something like
(I tested it, it does work as expected).
Though,
clientHandshakeAddress
can be null if it's invalid, so I guess it should show an error or use the old code as a fallback or something in that case.The text was updated successfully, but these errors were encountered: