Giter VIP home page Giter VIP logo

Comments (21)

pufferffish avatar pufferffish commented on May 18, 2024 1

I don't use systemd so I can't test this out, but have you tried Type=simple instead of Type=forking?

from wireproxy.

fscarmen avatar fscarmen commented on May 18, 2024 1

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!

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

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

from wireproxy.

fscarmen avatar fscarmen commented on May 18, 2024

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.

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

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.

from wireproxy.

fscarmen avatar fscarmen commented on May 18, 2024

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.

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

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.

from wireproxy.

fscarmen avatar fscarmen commented on May 18, 2024

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.

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

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?

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

@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

from wireproxy.

ElDavoo avatar ElDavoo commented on May 18, 2024

@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

from wireproxy.

fscarmen avatar fscarmen commented on May 18, 2024

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.

from wireproxy.

fscarmen avatar fscarmen commented on May 18, 2024

@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.
image

image

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

@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?

from wireproxy.

fscarmen avatar fscarmen commented on May 18, 2024

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.

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

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.

from wireproxy.

fscarmen avatar fscarmen commented on May 18, 2024

I don't use systemd so I can't test this out, but have you tried Type=simple instead of Type=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

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

I don't use systemd so I can't test this out, but have you tried Type=simple instead of Type=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 by systemctl disable --now wireproxy change the warp ip (restart service) by systemctl restart wireproxy

Are you using the latest version? It should be ExecStart=/usr/bin/wireproxy -c /etc/wireguard/proxy.conf.

from wireproxy.

fscarmen avatar fscarmen commented on May 18, 2024

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

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

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

from wireproxy.

pufferffish avatar pufferffish commented on May 18, 2024

@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

from wireproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.