Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

singbox 内核 ignore_client_bandwidth 设置不生效 #47

Open
nqzhang opened this issue Feb 7, 2025 · 10 comments
Open

singbox 内核 ignore_client_bandwidth 设置不生效 #47

nqzhang opened this issue Feb 7, 2025 · 10 comments

Comments

@nqzhang
Copy link

nqzhang commented Feb 7, 2025

描述该错误
简单地描述一下这个bug是什么

singbox内核设置 ignore_client_bandwidth 不生效

v2bx 版本 0.1.5

面板版本 xboard 1.0.0

面板节点设置

Image

根据singbox文档 https://sing-box.sagernet.org/zh/configuration/inbound/hysteria2/#ignore_client_bandwidth

服务端设置了ignore_client_bandwidth ,没有设置带宽会始终使用bbr,客户端带宽设置会不生效。

但是使用v2bx服务端用以上配置,v2rayn将带宽设置为10Mbits测速会只有10Mbits,设置为1000Mbits会跑的快很多。客户端设置任然有效

用singbox原生的服务端设置ignore_client_bandwidth为true时,无论v2rayn带宽设置为多少都可以跑出很高的速度,客户端设置没有生效

复现
请自行复现,并贴出详细步骤操作过程

config.json 配置文件

cat /etc/V2bX/config.json

{
    "Log": {
        "Level": "debug",
        "Output": "/etc/V2bX/v2bx.log"
    },
    "Cores": [
    {
        "Type": "sing",
        "Log": {
            "Level": "debug",
	    "Output": "/etc/V2bX/singbox.log",
            "Timestamp": true
        },
        "NTP": {
            "Enable": false,
            "Server": "time.apple.com",
            "ServerPort": 0
        },
        "OriginalPath": "/etc/V2bX/sing_origin.json",
	"EnableConnClear": true
    }],
    "Nodes": [{
            "Core": "sing",
            "ApiHost": "https://somesite",
            "ApiKey": "somekey",
            "NodeID": 1,
            "NodeType": "hysteria2",
	    "Hysteria2ConfigPath": "/etc/V2bX/hy2config.yaml",
            "Timeout": 30,
            "ListenIP": "0.0.0.0",
            "SendIP": "0.0.0.0",
            "DeviceOnlineMinTraffic": 1000,
            "TCPFastOpen": true,
            "SniffEnabled": true,
            "EnableDNS": true,
            "CertConfig": {
                "CertMode": "self",
                "RejectUnknownSni": false,
                "CertDomain": "amazon.com",
                "CertFile": "/etc/V2bX/fullchain.cer",
                "KeyFile": "/etc/V2bX/cert.key",
                "Email": "[email protected]",
                "Provider": "cloudflare",
                "DNSEnv": {
                    "EnvName": "env1"
                }
            }
        }



]
}

hy2config 配置文件

cat /etc/V2bX/hy2config.yaml 

quic:
  initStreamReceiveWindow: 8388608
  maxStreamReceiveWindow: 8388608
  initConnReceiveWindow: 20971520
  maxConnReceiveWindow: 20971520
  maxIdleTimeout: 300s
  maxIncomingStreams: 65535
  disablePathMTUDiscovery: false
ignoreClientBandwidth: true
disableUDP: false
udpIdleTimeout: 60s
resolver:
  type: system
acl:
  inline:
    - direct(geosite:google)
    - block(geosite:cn)
    - block(geoip:cn)
masquerade:
  type: 404
brutal_debug: true

日志和错误
请使用v2bx log查看并添加日志,没有日志的issue不会得到答复并且会被直接关闭

tail -f /etc/V2bX/v2bx.log 

time="2025-02-08T05:50:43+08:00" level=info msg="Report 1 users traffic" tag="[https://somesite]-hysteria2:1"
time="2025-02-08T05:50:43+08:00" level=info msg="Total 1 online users, 0 Reported" tag="[https://somesite]-hysteria2:1"
time="2025-02-08T05:53:29+08:00" level=debug msg="Clear online ip..." Type=Limiter
time="2025-02-08T05:53:29+08:00" level=debug msg="Clear online ip done" Type=Limiter
time="2025-02-08T05:56:29+08:00" level=debug msg="Clear online ip..." Type=Limiter
time="2025-02-08T05:56:29+08:00" level=debug msg="Clear online ip done" Type=Limiter
time="2025-02-08T05:59:29+08:00" level=debug msg="Clear online ip..." Type=Limiter
time="2025-02-08T05:59:29+08:00" level=debug msg="Clear online ip done" Type=Limiter
time="2025-02-08T06:02:29+08:00" level=debug msg="Clear online ip..." Type=Limiter
time="2025-02-08T06:02:29+08:00" level=debug msg="Clear online ip done" Type=Limiter
time="2025-02-08T06:05:29+08:00" level=debug msg="Clear online ip..." Type=Limiter
time="2025-02-08T06:05:29+08:00" level=debug msg="Clear online ip done" Type=Limiter

额外的内容
在这里添加关于问题的任何其他内容

@wyx2685
Copy link
Owner

wyx2685 commented Feb 7, 2025

sing内核配置在/etc/V2bX/sing_origin.json里面
你写错配置文件了(虽然写对了也不会生效

换hy2内核

@nqzhang
Copy link
Author

nqzhang commented Feb 7, 2025

有其他办法吗.... singbox规则里面定义了 流媒体解锁 规则好不容易写好的..

@wyx2685
Copy link
Owner

wyx2685 commented Feb 7, 2025

下版本加面板里配置

@nqzhang
Copy link
Author

nqzhang commented Feb 7, 2025

谢谢您开发这么好的项目👍

@nqzhang
Copy link
Author

nqzhang commented Feb 14, 2025

您好,请问这个有开发计划吗。brutal 经过长时间测试,服务端会经常出现疯狂上传的情况。
上传经常会达到下载的10倍甚至更多。
应该不会是掉包问题,出现这情况的时候测试掉包并不严重,应该是客户端运营商Qos,或者是客户端设置了很大的带宽,导致服务端疯狂补发包,而且正常情况下测试brutal只能跑到120M左右带宽,bbr能跑到几乎满速带宽。
brutal如果不能正确设置客户端带宽的话应该很容易出现这问题,但是客户端完全是不可控的。

@wyx2685
Copy link
Owner

wyx2685 commented Feb 15, 2025

目前最大的问题是xboard下发了宽带设置给用户,我这边是不发的

@nqzhang
Copy link
Author

nqzhang commented Feb 15, 2025

我测试了xboard没有下发.... xboard是github最新版
但是有些客户端会自己设置一个带宽 比如ios上的shadowrocket和windows上的v2rayn,虽然他们的默认设置都比较安全,上传下载都应该是100Mbps,但是当客户端Qos或者不可达的时候,服务端就会疯狂上传.

这是使用clash-verge的 就没有设置带宽
Image

根据hysteria和singbox官方文档,最可靠的方法就是服务端设置这个参数

hysteria介绍
Image

singbox介绍

Image

@nqzhang
Copy link
Author

nqzhang commented Feb 15, 2025

sing内核配置在/etc/V2bX/sing_origin.json里面 你写错配置文件了(虽然写对了也不会生效

换hy2内核

我也试了hy2内核。hy2内核的这个参数的确是有效的。但是hy2内核的问题是分流有问题,域名分流会失效...........,貌似hysteria sniffing 这个功能加的比较晚,也是有点问题,客户端会解析域名传来服务端的的直接是ip
apernet/hysteria#635
apernet/hysteria#967

@nqzhang
Copy link
Author

nqzhang commented Feb 15, 2025

e502624

谢谢开发者👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants