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

[Feature Request] Better KCP protocol support please. #1622

Closed
gubiao opened this issue Jan 16, 2020 · 4 comments
Closed

[Feature Request] Better KCP protocol support please. #1622

gubiao opened this issue Jan 16, 2020 · 4 comments

Comments

@gubiao
Copy link

gubiao commented Jan 16, 2020

KCP协议受网络环境影响非常大, 在不同网络环境下通常都需要调整KCP协议的相关参数才能实现较好的加速效果, 目前版本的FRP中KCP协议底层相关参数是对终端用户屏蔽的, 用户无法调整KCP参数进行加速优化, 查看代码(utils/net/kcp.go#ListenKcp)后发现目前使用的KCP参数如下:

  • MTU: 1350
  • 发送窗口: 1024
  • 接收窗口: 1024
  • 缓冲区: 4194304
  • 工作模式: 1, 20, 2, 1

请把以上5个KCP协议关键配置项开放给最终用户, 使用户可以在不同的网络环境下对使用KCP协议的FRP两端进行优化调整, 谢谢.

@sqliuchang
Copy link

我最近刚尝试使用kcp协议避免被墙,才发现没法手动调整kcp的参数
的确应该考虑开放这个参数,否则很容易出现过度发包导致流量暴涨的情况

@fatedier
Copy link
Owner

fatedier commented Feb 4, 2020

建议这样的需求可以自己另外部署 kcp 程序,可以根据自己的需求使用不同的版本或参数,更加灵活。frp 内置的功能只是方便使用,也不会同步版本更新,不过多地在这方面增加复杂度。

@fatedier fatedier closed this as completed Feb 4, 2020
@sqliuchang
Copy link

sqliuchang commented Feb 4, 2020

建议这样的需求可以自己另外部署 kcp 程序

只需要对bind_port套一层kcptun就可以了吗?

@fatedier
Copy link
Owner

fatedier commented Feb 4, 2020

@sqliuchang 可以,frpc 和 frps 之间只通过这一个端口通信,除了 xtcp 比较特殊。

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

3 participants