n2n icon indicating copy to clipboard operation
n2n copied to clipboard

Add --persistent flag to Linux edge

Open sweihub opened this issue 1 year ago • 3 comments

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

sweihub avatar Jul 20 '23 14:07 sweihub

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

hamishcoleman avatar Jul 20 '23 17:07 hamishcoleman

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.

sweihub avatar Jul 21 '23 12:07 sweihub

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?

Logan007 avatar Dec 27 '23 19:12 Logan007