kcp服务端如何接收用户访问的真实Ip
xwbops opened this issue · 5 comments
xwbops commented
问问题前先搜索ISSUE,并搞清楚下面的问题:
- 检查
-key xxx
至少三遍, 保证两边一致。 - 保证
-nocomp, -datashard, -parityshard, -key, -crypt, -smuxver
两边一致。 - 是否在服务器端,正确设定了转发的目标服务器地址 --target。
- 是否在客户端,正确的连接到了 client的监听端口。
- 如果第3条不确定,尝试在服务器上telnet target port试试。
- 防火墙是否关闭了UDP通信,或者设置了UDP的最大发包速率?
- 两端的版本是否一致?
- 是不是最新版本?
- 两端分别是什么操作系统?
- 两端的输出日志是什么?
Before firing issue, make sure you figured out the following common questions.
PLEASE DO SEARCH FIRST.
- Check your
-key xxx
for at least 3 times, MAKE SURE both sides share the same secret. -nocomp, -datashard, -parityshard, -key, -crypt, -smuxver
must be the same on both side.- Did you correctly set the -target on the server side?
- Did you correctly connected to the listening port on client side?
- MAKE SURE
telnet target port
on your server successful(don't ask me why couldn't). - Does your firewall allows UDP communications? (including your ISP Cable-Modem)
- Are you using the same version for both client & server
- Are you using the latest release?
- Which OS do you use?
- Which end for this issue related to, client or server?
xtaci commented
kcp工作在OSI 4层,已经没有IP信息了
xwbops commented
4层包里不是还有ip 和mac吗
xtaci commented
不行,已经变成了纯数据流。
xwbops commented
kcp server后面挂个nginx tcp stream 模块能把用户ip解出来吗
keuin commented
PROXY protocol is all you need