Giter VIP home page Giter VIP logo

Comments (9)

Abreto avatar Abreto commented on July 25, 2024

如果没法降级呢?我现在找不到参考,关于 ERR_INVALID_ARGUMENT 也没找到多少有用的信息

from naiveproxy.

klzgrad avatar klzgrad commented on July 25, 2024

问题没有解决。

之前我的经验是HAProxy可能对h2隧道大量上传的流量限制有点问题,不知道是不是同样的问题。

你确认一下HAProxy 2.0.x 是不是客户端大量上传就一定会重现

from naiveproxy.

Abreto avatar Abreto commented on July 25, 2024

我现在的配置大概这样 (HAProxy 2.1)

global
    log stdout format raw local0 info
    maxconn 100000
    tune.h2.initial-window-size 1048576

defaults
    log global
    mode http

    option httplog
    option redispatch
    option forwardfor
    option http-keep-alive
    option persist
    http-reuse always

    timeout connect 4s
    timeout queue 5s
    timeout client 30s
    timeout server 30s
    timeout tunnel 1h
    timeout http-request 10s
    timeout http-keep-alive 2s
    timeout client-fin 1s
    timeout server-fin 1s

userlist users
    user name insecure-password pass

frontend besides-trojan
    bind *:80

    option http-use-proxy-header
    use_backend naive if { http_auth(users) }

    use_backend v2ray_vmess_h2 if { path -i -m beg /filesync/v2ray/h2/vmess }

    default_backend sb

backend naive
    server naive naive:1080

backend v2ray_vmess_h2
    server v2ray v2ray:280 proto h2

backend sb
    server sb sb:80

这样的配置下,h2 传输的 vmess 正常,上传可以跑到 30Mbps 左右。naive 这边单纯连下 http://gstatic.com/generate_204 也有很大几率 ERR_INVALID_ARGUMENT

$ all_proxy='socks5h://127.0.0.1:8999' curl -v http://gstatic.com/generate_204
* Uses proxy env variable all_proxy == 'socks5h://127.0.0.1:8999'
*   Trying 127.0.0.1...
* TCP_NODELAY set
* SOCKS5 communication to gstatic.com:80
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 8999 (#0)
> GET /generate_204 HTTP/1.1
> Host: gstatic.com
> User-Agent: curl/7.64.1
> Accept: */*
>
* Empty reply from server
* Connection #0 to host 127.0.0.1 left intact
curl: (52) Empty reply from server
* Closing connection 0

from naiveproxy.

bluesimke avatar bluesimke commented on July 25, 2024

我完全是试出来的,因为我也没有找到任何可供参考的资料
在尝试过 Debian 和 CentOS 各个发行版原生 repo 的 HAProxy 版本之后,乃至自己编译 HAProxy,我始终会莫名奇妙获得标题上所示的报错
但是在使用了 CentOS 7.x + IUS 第三方库的 HAProxy 1.8.x 之后,问题消失
@klzgrad 大概率是你所说的问题,而恰好我用的这个 HAProxy 版本,没有这个问题
我已经在内网中进行了大流量测试
在 PVE 上的两台万兆互连的虚拟机(1T1G)上,iperf3 显示经过 NaiveProxy 隧道过的流量,速度能吃到 2Gbps,我尝试过长时间不间断测试,发现再也没有报错。

from naiveproxy.

bluesimke avatar bluesimke commented on July 25, 2024

原因不得而知,我只能给后来者一个实践过的结论
同样的 HAProxy 1.8.x,刚刚好只有我上面提到那个版本,不会出错
而各种版本甚至报错都不一样,出错表现也不一样
配置一致,大版本号一致,1.8.x,同样是 CentOS,但是来自 Software Collection 的 HA 1.8.x 就会出现大流量后导致连接意外断开,然后后续的连接全部报错
而我当时编译的 latest 版本的 HA,出错的表现就是,第一次连接没问题,但是第一个长连接释放后,第二个长连接始终报错。

from naiveproxy.

klzgrad avatar klzgrad commented on July 25, 2024

Ok, this is actually a bug which naiveproxy does not handle correctly when HAProxy coalesces two HTTP headers into one TCP packet.

from naiveproxy.

klzgrad avatar klzgrad commented on July 25, 2024

See if this build fixes it: https://github.com/klzgrad/naiveproxy/releases/tag/v80.0.3987.87-3.

from naiveproxy.

klzgrad avatar klzgrad commented on July 25, 2024

问题有没有解决?

from naiveproxy.

Abreto avatar Abreto commented on July 25, 2024

It's now fixed. Thanks.

from naiveproxy.

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.