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

[Bug] param -tun-post-up not work #338

Closed iLemonRain closed 1 month ago

iLemonRain commented 4 months ago

Verify steps

Version

v2.5.2

What OS are you seeing the problem on?

Windows

Description

try to use the param -tun-post-up to attach the path of bat script the content of that script was like "echo hello" but no that output in terminal while no error showed please teach me how to use this param correctly Thank you! or please tell me how another way to know if TUN device is ready to use:-)

CLI or Config

No response

Logs

No response

How to Reproduce

No response

xjasonlyu commented 4 months ago

-tun-post-up will execute the given commands, but there would be no output (this is by design).

It can be used like -tun-post-up "sh some_script.sh".

or please tell me how another way to know if TUN device is ready to use :-)

-tun-post-up is always executed after TUN is ready.

Cheers.

iLemonRain commented 4 months ago

-tun-post-up will execute the given commands, but there would be no output (this is by design).

It can be used like -tun-post-up "sh some_script.sh".

or please tell me how another way to know if TUN device is ready to use :-)

-tun-post-up is always executed after TUN is ready.

Cheers.

Thanks. And how to understand "TUN is ready"? I don’t know if there are any standards

xjasonlyu commented 4 months ago

Ready basically means the TUN interface is created and you can see the link is up in Linux (using ifconfig).

xjasonlyu commented 4 months ago

Feel free to check this https://github.com/xjasonlyu/tun2socks/wiki/TUN-Pre-and-Post-UP.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days