Closed Popwax closed 1 year ago
I thought this through today and find this approach is actually quite complex. It requires rpfilter=0
and possibly another SNAT
to redirect incoming fake-TCP packets. Maybe it just doesn't worth it.
For transparent support, UDP socket with TPROXY
redirection is probably the best approach.
Thanks for creating this project,
phantun
works like a charm along with WireGuard, especially in place where WireGuard was blocked/filtered.However, it certainly has some limitation. I think, by making
phantun
totally transparent, it could bring a lot of improvements.Here is how it could be done.
tun0
interface.tun0
interface, and it will generate fake-TCP outgoing packet. Likewise, incoming fake-TCP packet will be routed totun0
as well, and it will be translated back to incoming UDP packet.Compare to current method, I think it will bring improvements over a number of places:
127.0.0.1
).phantun
can even run on a router and handle UDP requests for all devices in the home network.phantun
config and associatedip rule
routing rules ares required.phantun
client and server, only single binary is enough. When both endpoints have public-facing TCP port to bind, both endpoints could initiate new fake-TCP connection.phantun
less noisy.