Coder Social home page Coder Social logo

Comments (8)

fscarmen avatar fscarmen commented on August 30, 2024

因为不稳,v4 和 v6 毫无规则的来回跳,已经向wireproxy作者提issue
pufferffish/wireproxy#66

from warp.

 avatar commented on August 30, 2024

可以用以下办法

开两个wireproxy,一个v4[127.0.0.1:1444]+一个v6,[127.0.0.1:1666]

用clash分流

proxies:
  - name: "warp6"
    type: socks5
    server: 127.0.0.1
    port: 1666
  - name: "warp4"
    type: socks5
    server: 127.0.0.1
    port: 1444
rules:
  - IP-CIDR,0.0.0.0/0,warp4
  - IP-CIDR6,::/0,warp6

能够解决ipv6和ipv4乱跳的毛病。原因是因为clash会在本地解析IP后再进行代理。不会用wireproxy的dns解析导致乱跳。这个bug可能是wireproxy的dns解析问题。

dns解析要从本地解析,解析完了再套socks5,就不会乱跳

from warp.

fscarmen avatar fscarmen commented on August 30, 2024

你的意思是建两个wrieproxy的进程,一个把 Address = 172.16.0.2/32 ,另一个把 Address = /128,让他们一个服务端口是 1444,另一个是1666?

from warp.

 avatar commented on August 30, 2024

你的意思是建两个wrieproxy的进程,一个把 Address = 172.16.0.2/32 ,另一个把 Address = /128,让他们一个服务端口是 1444,另一个是1666?

没有错啊,这个似乎是wireproxy dns解析的问题。

比如原来的是wireproxy->bind:127.0.0.1:40000

改成这样clash【或者其他分流软件】->bind:127.0.0.1:40000 ->【[ipv4分流]:127.0.0.1:1444】 ->【[ipv6分流]:127.0.0.1:1666】。

这样还是和原来一样用,下游代理链几乎不需要改动。

wireproxy dns的解析可能有问题,有时解析为v4,有时又为v6,不知道wghttp的dns解析有没有问题
https://github.com/zhsj/wghttp
wghttp是2021年的,比wireproxy 早一年

from warp.

fscarmen avatar fscarmen commented on August 30, 2024

没有错啊,这个似乎是wireproxy dns解析的问题。

是的,作者貌似长时间不回复这问题,你说要不要弄两个配置文件,运行两个呢?不过管理起来有点麻烦

from warp.

 avatar commented on August 30, 2024

不过管理起来有点麻烦

我使用了一段时间,管理起来也不是很麻烦

我是这样管理的,关闭的话,直接使用killall wireproxy,会直接结束wireproxy两个进程,启动的话,使用了sh脚本wired.sh

$cat wired.sh
setsid /usr/bin/wireproxy -c /etc/wireguard/proxy4.conf &
setsid /usr/bin/wireproxy -c /etc/wireguard/proxy6.conf &

然后添加systemd启动

[Service]
...
ExecStart=/usr/bin/sh /etc/wireguard/wired.sh

查找wireproxy有没有运行

ps -ef | grep wireproxy

两个配置文件几乎一模一样,就是
cp proxy.conf proxy6.conf
mv proxy.conf proxy4.conf

vim proxy6.conf
把proxy6.conf里面的ip地址换成v6,然后把socks5端口改改,也不需要其他配置

不过我是手动管理的,自动脚本可能会有点麻烦,要思考逻辑。

另外,clash一点都不好用,我已经换了,clash不但占用cpu,还有概率有dns解析的问题

from warp.

fscarmen avatar fscarmen commented on August 30, 2024

不过我是手动管理的,自动脚本可能会有点麻烦,要思考逻辑。

另外,clash一点都不好用,我已经换了,clash不但占用cpu,还有概率有dns解析的问题

手动是不麻烦,脚本的话,需要处处考虑用户的个性化需求,太花了,要考虑自定义两个端口对应v4v6,同时检测端口有没有被占用,有的需要v4 v6开关要两个一起(你的做法),有的需要只开一个关另一个。又要考虑刷奈飞的逻辑,想想都可怕,还是再等等原作者的回复,看他能不能修这个bug,我在 pufferffish/wireproxy#66 已经很好的复现 v4 v6 乱跳的问题。

话说项目的作者名改了,以前叫 octeep ,不知道从何时起改为 pufferffish

from warp.

 avatar commented on August 30, 2024

你可以看看wghttp,这个也是功能一样的软件,不知道有没有有这个bug。我没有试过。

from warp.

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.