SenseUnit / dtlspipe

Generic DTLS wrapper for UDP sessions
MIT License
132 stars 11 forks source link

Possible iOS/Android port? #12

Closed edthepurple closed 1 year ago

edthepurple commented 1 year ago

Hey.

first of all. thanks for sharing this project. awesome work. I'm in a situation where direct udp traffic is blocked to my vpn server (OpenVPN/WireGuard) and I have to run a domestic relay and forward the traffic there, and I'm currently using similar tools like udp2raw, swgp and dtlspipe.

I was wondering if it was possible to run the client side of this "tunnel" on the device itself so a relay isn't needed. so I install iSH on iOS and downloaded the right binary for it and ran it with a simple configuration.

in terms of testing its functionality, when I ran the binary with the proper config on iOS and tried to connect to my iPhone's DHCP allocated ip address, it worked and I had internet access. however, when i tried to connect to the forwarded port on the iPhone itself, the connection got established but it seemed no data was being routed to the right destination.

is this a limitation of iOS or the tunnel itself?

right now its VPN CLIENT --> DOMESTIC RELAY RUNNING DTLSPIPE --> VPN SERVER I want it to be VPN CLIENT --> DTLSPIPE ON THE DEVICE ITSELF --> VPN SERVER

Snawoot commented 1 year ago

Hi!

If you're running dtlspipe on the same device where wg client resides, you have to exclude IP address of remote dtlspipe server. One possible way to do it for wireguard is to adjust AllowedIPs in a way that sidestep route to dtlspipe server. It's explained in README how to subtract some IP from Wireguard AllowedIPs.