xjasonlyu / tun2socks

tun2socks - powered by gVisor TCP/IP stack
https://github.com/xjasonlyu/tun2socks/wiki
GNU General Public License v3.0
2.84k stars 403 forks source link

[Feature] missing "--tun-post-down" option #357

Open aa51513 opened 2 months ago

aa51513 commented 2 months ago

Description

After starting tun2socks, I used the "--tun-post-up" option to adjust the routing table,

but now I have a problem, I can't find the hook to restore the routing table after the process is closed,

I think "--tun -post-down" option is very necessary

Is this feature related to a specific bug?

no

Do you have a specific solution in mind?

add "--tun-post-down" option

gaby commented 3 weeks ago

@xjasonlyu This would be very helpful to keep a clean state. Else when the interface comes back up it will run post-up twice

xjasonlyu commented 3 weeks ago

sounds good