dndx / phantun

Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs.
Apache License 2.0
1.71k stars 138 forks source link

A question regarding forward on the server side #168

Closed terrytw closed 1 month ago

terrytw commented 1 month ago

Dear dev, I have got a question regarding forward, I have researched a bit but to no avail, so can you please help me out?

I use the following command on client side

phantun_client --local 127.0.0.1:1234 --remote 1.2.3.4:4567

server side 1.2.3.4 forrwad port 4567 to another server 5.6.7.8:4567

When forwarding using nftables everything works as expected, however when forwarding using other softwars like brook or socat, it just doesn't work. I wonder what is the reason behind, is it because nftables is on layer 3 while others are on layer 4? The main reason I'm asking this is because nftables forward is significantly slower compared to other solutions.

Thank you so much!