ntop / n2n

Peer-to-peer VPN
GNU General Public License v3.0
6.05k stars 925 forks source link

Add --persistent flag to Linux edge #1138

Open sweihub opened 11 months ago

sweihub commented 11 months ago

Hi n2n

Thanks to the stable n2n-3.0, it's super stable, fast and awsome!

However, I need to make the Linux TUNTAP device persistent for routing purpose, so I added a --persistent flag to Linux edge. Would you review and accept this PR?

By default, or re-run without persistent flag, the TUNTAP device will be deleted when edge exits.

Thanks!

Alex Wei

hamishcoleman commented 11 months ago

Its probably better to use the existing tools to create a persistant tun device than to patch n2n - that way you can also integrate with your system-wide network configuration and use ownership for delegation.

If you are doing this by hand:

ip tap add mode tap user $RUNASUSER name $IFNAME
sweihub commented 11 months ago

Oh, thanks, I didn't realize that N2N can utilize the existing TAP device. However, it's still good to have the --persistent flag to have a N2N persistent TAP device in one go.

Logan007 commented 6 months ago

I do no support this one either as it looks way too specific to me and can easily be solved by other tools. Also, how would this one translate into Windows version?