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

kcp服务端如何接收用户访问的真实Ip #922

Open
xwbops opened this issue Jun 12, 2023 · 5 comments
Open

kcp服务端如何接收用户访问的真实Ip #922

xwbops opened this issue Jun 12, 2023 · 5 comments

Comments

@xwbops
Copy link

xwbops commented Jun 12, 2023

问问题前先搜索ISSUE,并搞清楚下面的问题:

  1. 检查 -key xxx 至少三遍, 保证两边一致。
  2. 保证-nocomp, -datashard, -parityshard, -key, -crypt, -smuxver两边一致。
  3. 是否在服务器端,正确设定了转发的目标服务器地址 --target
  4. 是否在客户端,正确的连接到了 client的监听端口。
  5. 如果第3条不确定,尝试在服务器上telnet target port试试。
  6. 防火墙是否关闭了UDP通信,或者设置了UDP的最大发包速率?
  7. 两端的版本是否一致?
  8. 是不是最新版本?
  9. 两端分别是什么操作系统?
  10. 两端的输出日志是什么?

Before firing issue, make sure you figured out the following common questions.

PLEASE DO SEARCH FIRST.

  1. Check your -key xxx for at least 3 times, MAKE SURE both sides share the same secret.
  2. -nocomp, -datashard, -parityshard, -key, -crypt, -smuxver must be the same on both side.
  3. Did you correctly set the -target on the server side?
  4. Did you correctly connected to the listening port on client side?
  5. MAKE SURE telnet target port on your server successful(don't ask me why couldn't).
  6. Does your firewall allows UDP communications? (including your ISP Cable-Modem)
  7. Are you using the same version for both client & server
  8. Are you using the latest release?
  9. Which OS do you use?
  10. Which end for this issue related to, client or server?
@xtaci
Copy link
Owner

xtaci commented Jun 12, 2023

kcp工作在OSI 4层,已经没有IP信息了

@xwbops
Copy link
Author

xwbops commented Jun 14, 2023

4层包里不是还有ip 和mac吗

@xtaci
Copy link
Owner

xtaci commented Jun 14, 2023

不行,已经变成了纯数据流。

@xwbops
Copy link
Author

xwbops commented Jun 14, 2023

kcp server后面挂个nginx tcp stream 模块能把用户ip解出来吗

@keuin
Copy link

keuin commented Nov 3, 2023

PROXY protocol is all you need

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