Closed fscarmen closed 2 years ago
I don't use systemd so I can't test this out, but have you tried Type=simple
instead of Type=forking
?
I think it would be best to add parameters to run in the background in next verion. For example
wireproxy /etc/wireguard/proxy.conf -d
Thank you!
I think it would be best to add parameters to run in the background in next verion. For example
wireproxy /etc/wireguard/proxy.conf -d
Thank you!
I'll address this in the first "official" release version of wireproxy. I think after getting feedbacks from different communities, the codebase is mature enough. I'm gonna rework the command line parsing part, add this feature, and bump the version to v1.0
Glad to hear this exciting news.
Many WARP users have reported such a need.
I also hope the parameter to close wireproxy. Now I need to use kill -9 $(pgrep -f wireproxy)
, which seems rude and unprofessional.
Glad to hear this exciting news. Many WARP users have reported such a need. I also hope the parameter to close wireproxy. Now I need to use
kill -9 $(pgrep -f wireproxy)
, which seems rude and unprofessional.
How exactly would the parameter closing wireproxy looks like? Would it be something like wireproxy --close
? I am not sure how that work with multiple instances of wireproxy.
How abt like screen?
case 1: one session
[root@srv21706 ~]# screen -SX a quit
[root@srv21706 ~]# screen -ls
No Sockets found in /var/run/screen/S-root.
[root@srv21706 ~]# screen -USdm a
[root@srv21706 ~]# screen -ls
There is a screen on:
11609.a (Detached)
1 Socket in /var/run/screen/S-root.
[root@srv21706 ~]# screen -SX a quit
[root@srv21706 ~]# screen -ls
No Sockets found in /var/run/screen/S-root.
case 2: multiple sessions
[root@srv21706 ~]# screen -USdm a
[root@srv21706 ~]# screen -USdm a
[root@srv21706 ~]# screen -USdm a
[root@srv21706 ~]# screen -ls
There are screens on:
12705.a (Detached)
12676.a (Detached)
12631.a (Detached)
3 Sockets in /var/run/screen/S-root.
[root@srv21706 ~]# screen -SX 12705 quit
[root@srv21706 ~]# screen -ls
There are screens on:
12676.a (Detached)
12631.a (Detached)
2 Sockets in /var/run/screen/S-root.
[root@srv21706 ~]# screen -SX 12631.a quit
[root@srv21706 ~]# screen -ls
There is a screen on:
12676.a (Detached)
1 Socket in /var/run/screen/S-root.
Ah, so each instance of wireproxy is named and you can close them by specifying the name of the instance of the wireproxy you want to close. I think we can do that. This also ties in to one of the task in #16 too. I will address this in the future.
yes if there is one session . It can be closed by name. And if more than 1 session which is named the same. It will hint you to specify
[root@srv21706 ~]# screen -ls
No Sockets found in /var/run/screen/S-root.
[root@srv21706 ~]# screen -USdm a
[root@srv21706 ~]# screen -USdm a
[root@srv21706 ~]# screen -ls
There are screens on:
24870.a (Detached)
24841.a (Detached)
2 Sockets in /var/run/screen/S-root.
[root@srv21706 ~]# screen -SX a quit
There are several suitable screens on:
24870.a (Detached)
24841.a (Detached)
Use -S to specify a session.
[root@srv21706 ~]# screen -SX 24870 quit
[root@srv21706 ~]# screen -ls
There is a screen on:
24841.a (Detached)
1 Socket in /var/run/screen/S-root.
[root@srv21706 ~]# screen -SX a quit
[root@srv21706 ~]# screen -ls
No Sockets found in /var/run/screen/S-root.
I think it would be best to add parameters to run in the background in next verion. For example
wireproxy /etc/wireguard/proxy.conf -d
Thank you!
Daemon flag has been implemented in the latest commit, note that there is also a slight change to how the path of the configuration is passed to wireproxy as well. I've tested the daemon feature on my OpenBSD and Linux machines. Can you confirm that it works for you as well?
@fscarmen also did you manage to get wireproxy working with cloudflare warp? I'm interested in using it as well.
Edit: nvm got it working
@fscarmen also did you manage to get wireproxy working with cloudflare warp? I'm interested in using it as well.
Edit: nvm got it working
As a bit of off-topic discussion: I wanted to make it working for torrenting, but doesn't look like it works :( the only thing that is working is HTTP tracker updates
Can you confirm that it works for you as well?
Quite practical, now I use systemctl restart wgcf
to restart the warp service to indirectly change the warp ip to unlock Netflix.
@fscarmen also did you manage to get wireproxy working with cloudflare warp? I'm interested in using it as well.
Edit: nvm got it working
Yes.I will do deeper integration in existing projects.
@fscarmen also did you manage to get wireproxy working with cloudflare warp? I'm interested in using it as well. Edit: nvm got it working
As a bit of off-topic discussion: I wanted to make it working for torrenting, but doesn't look like it works :( the only thing that is working is HTTP tracker updates
What client are you using?
Do you mean by CloudFlare WARP Client for Linux? https://blog.cloudflare.com/announcing-warp-for-linux-and-proxy-mode
Tonight I will add wireproxy options to the menu.
Do you mean by CloudFlare WARP Client for Linux? https://blog.cloudflare.com/announcing-warp-for-linux-and-proxy-mode
Tonight I will add wireproxy options to the menu.
Ah I was replying to @ElDavoo, asking what torrent client he's using. This issue has too many off topic discussion right now. I'll close it and split it to two different issues.
I don't use systemd so I can't test this out, but have you tried
Type=simple
instead ofType=forking
?
It works. Ths. 'Type=simple' is default, so i remove it. Now the systemd file content is as follow. ( /usr/lib/systemd/system/wireproxy.service )
[Unit]
Description=WireProxy for WARP
After=network.target
Documentation=https://github.com/fscarmen/warp
Documentation=https://github.com/octeep/wireproxy
[Service]
ExecStart=/usr/bin/wireproxy /etc/wireguard/proxy.conf
RemainAfterExit=yes
Restart=always
[Install]
WantedBy=multi-user.target
I turn on the WireProxy service by systemctl start wireproxy
turn it off by systemctl stop wireproxy
change the warp ip (restart service) by systemctl restart wireproxy
enable daemon systemctl enable --now wireproxy
disable daemon systemctl disable --now wireproxy
I don't use systemd so I can't test this out, but have you tried
Type=simple
instead ofType=forking
?It works. Ths. 'Type=simple' is default, so i remove it. Now the systemd file content is as follow. ( /usr/lib/systemd/system/wireproxy.service )
[Unit] Description=WireProxy for WARP After=network.target Documentation=https://github.com/fscarmen/warp Documentation=https://github.com/octeep/wireproxy [Service] ExecStart=/usr/bin/wireproxy /etc/wireguard/proxy.conf RemainAfterExit=yes Restart=always [Install] WantedBy=multi-user.target
I turn on the WireProxy service by
systemctl enable --now wireproxy
turn it off bysystemctl disable --now wireproxy
change the warp ip (restart service) bysystemctl restart wireproxy
Are you using the latest version? It should be ExecStart=/usr/bin/wireproxy -c /etc/wireguard/proxy.conf
.
Are you using the latest version? It should be
ExecStart=/usr/bin/wireproxy -c /etc/wireguard/proxy.conf
.
Not yet. I fail to cross compile wireproxy in action. The previous version was ok. I guess there is no file: main.go
Are you using the latest version? It should be
ExecStart=/usr/bin/wireproxy -c /etc/wireguard/proxy.conf
.Not yet. I fail to cross compile wireproxy in action. The previous version was ok. I guess there is no file: main.go
Ah yes, you should compile with this command: go build ./cmd/wireproxy
instead. I will add an instruction in README. Alternatively, you can find it on the Actions tab. I setup a CI to build it for every commits.
Here is the binaries for the latest commit https://github.com/octeep/wireproxy/actions/runs/2068821766
@fscarmen do you mind moving this conversation to discussion? I don't think it's appropiate to discuss on an issue tracker. https://github.com/octeep/wireproxy/discussions/25
I run winproxy with the command
nohup wireproxy /etc/wireguard/proxy.conf >/dev/null 2>&1 &
. I want to run it in Systemd. There is a problem. Stuck for a long time, eventually showing timeout. I think it's caused by windproxy running in the foreground