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

add tcpcongestion #1234

Merged
merged 7 commits into from
Oct 10, 2022
Merged

add tcpcongestion #1234

merged 7 commits into from
Oct 10, 2022

Conversation

xqzr
Copy link
Contributor

@xqzr xqzr commented Sep 30, 2022

No description provided.

@xqzr
Copy link
Contributor Author

xqzr commented Sep 30, 2022

{
 "streamSettings": {
  "sockopt": {
   "tcpcongestion": "bbr"
  }
 }
}

@@ -424,6 +424,7 @@ type SocketConfig struct {
DialerProxy string `protobuf:"bytes,9,opt,name=dialer_proxy,json=dialerProxy,proto3" json:"dialer_proxy,omitempty"`
TcpKeepAliveInterval int32 `protobuf:"varint,10,opt,name=tcp_keep_alive_interval,json=tcpKeepAliveInterval,proto3" json:"tcp_keep_alive_interval,omitempty"`
TcpKeepAliveIdle int32 `protobuf:"varint,11,opt,name=tcp_keep_alive_idle,json=tcpKeepAliveIdle,proto3" json:"tcp_keep_alive_idle,omitempty"`
TcpCongestion string `protobuf:"bytes,12,opt,name=tcp_congestion,json=tcpCongestion,proto3 json:"tcp_congestion,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大佬是不是手动修改的?
请使用 go generate core/proto.go 或者单独 protoc 自动生成这个文件

@yuhan6665 yuhan6665 merged commit 8cf23f1 into XTLS:main Oct 10, 2022
@yuhan6665
Copy link
Member

感谢大佬 先合了 我帮你自动生成一下

@hkbase
Copy link

hkbase commented Oct 27, 2022

这个特性,在入站和出站里都可以使用的吗?

@chancat87
Copy link

这?bbr啥意思

@egg1234
Copy link

egg1234 commented Oct 29, 2022

@chancat87 如果没有误解的话,应该是用户空间的bbr拥塞控制,与TUIC那个项目的想法应该一样吧

对应的应该就是之前大家一直强调的linux系统的/etc/sysctl.conf文件加入net.ipv4.tcp_congestion_control=bbr拥塞控制,但这个需要linux系统内核版本支持,但很多奇奇怪怪的linux系统甚至都没有/etc/sysctl.conf文件的,另外容器系统也是没有办法在容器内部开bbr的,所有这些限制都可以通过用户空间方式bbr解除

另外windows server也不支持bbr的,而bbr在用户空间实现的话,连带着windows server系统也沾光了,不需要依赖系统了(可惜现在的代码仅支持linux)

@chancat87
Copy link

chancat87 commented Oct 30, 2022 via email

@kulongwangzhi85
Copy link

牛逼

@kxjhcmc
Copy link

kxjhcmc commented Dec 3, 2022

请问配置文件里面inbounds和outbounds都需要增加这个配置吗?还是只需要inbounds里面添加就可以?

{
 "streamSettings": {
  "sockopt": {
   "tcpcongestion": "bbr"
  }
 }
}

@asiaqa
Copy link
Contributor

asiaqa commented Jan 25, 2023

我在docker container 行 Xray。開設定跑網速快了30%。。牛。。。

@bash99
Copy link

bash99 commented Mar 2, 2023

@chancat87 如果没有误解的话,应该是用户空间的bbr拥塞控制,与TUIC那个项目的想法应该一样吧

我感觉不是用户空间的bbr,只是如果kernel支持但是没有全局打开的话,则自动为此程序打开,或许在docker里面有点用?

总之我在某个4.19内核,没加载bbr模块的系统上,开启此选项会报错,

[Info] transport/internet: failed to apply socket options to incoming connection > transport/internet: failed to set TCP_CONGESTIONno such file or directory

, 虽然server还是启动了,但也没有加速效果。
如果换成reno之类的已有的协议则无报错

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

Successfully merging this pull request may close these issues.

None yet

9 participants