Open fx-pro opened 1 year ago
The program manually sets the system's proxy settings (as seen in src/utils/system-proxy.js) when you run it. If you exit cleanly, it will turn it back off, but otherwise the proxy settings will be left as it was when the program was running. I don't think there's anything that Green Tunnel can do about this, but I suppose it can provide a convenient command line option to toggle the proxy.
@musjj Thank you for your kindly support. I understand that GTunnel set the proxy for the system, and it isn't clean up when closed by Windows when Shutdown. But Windows don't kill all the processes immediately when PC shutdown, however, it send signal to all running process to let them deal with it/clean up...
In node.js application, we can handle those signals likes:
function shutdownHandler(signal) {
// do some stuff here
await unsetProxy();
//process.exit()
}
process.on('SIGINT', shutdownHandler)
process.on('SIGTERM', shutdownHandler)
process.on('SIGQUIT', shutdownHandler)
Thank you,
@musjj How do you exit 'cleanly' like in your comment? Now I have to turn gt from my terminal to connect to the App Store every time.
For those who use linux, the solution may be with gsettings.
The command looks like this: gsettings set org.gnome.system.proxy mode 'none'
After that, restart the network manager: sudo systemctl restart NetworkManager
Now the proxy should be unset.
Scenario:
Suggest solution: Green Tunnel go Off if closed by Windows when shutdown.
Thank you very much for such a great app!