pufferffish / wireproxy

Wireguard client that exposes itself as a socks5 proxy
ISC License
4.54k stars 272 forks source link

please add feature to restart or stop own process #106

Open tsz8899 opened 7 months ago

tsz8899 commented 7 months ago

When the program is running in daemon mode wireproxy -d -c config1 , how to stop or restart

Could add the feature to restart or stop the process after the program runs in daemon mode?

For example, in the Windows or linux command line, support: wireproxy -d --reload -c config2 wireproxy -d --stop wireproxy -d -restart

pufferffish commented 7 months ago

Currently there is no option to stop or restart wireproxy except killing it externally. I don't see how wireproxy -d --stop would work with multiple wireproxy daemon running on the same host.

tsz8899 commented 7 months ago

thank you help.

wireproxy runs well. But I can't stop or restart with simple commands. For example,making it difficult to schedule tasks using scripts (1.wireproxy start, 2.download remote files, 3.wireproxy stop). It's hard for me to do such operations on a Windows or linux command line.

It would be great if wireproxy have its own process stop and restart functionality.

cadraincm commented 6 months ago

thank you help.

wireproxy runs well. But I can't stop or restart with simple commands. For example,making it difficult to schedule tasks using scripts (1.wireproxy start, 2.download remote files, 3.wireproxy stop). It's hard for me to do such operations on a Windows or linux command line.

It would be great if wireproxy have its own process stop and restart functionality.

can you try adding a script like this to your scheduler? it would indiscriminately kill all instances.

kill_wireproxy.sh

#!/bin/bash
if pgrep -x "wireproxy" > /dev/null
then
    pkill wireproxy
fi