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

Fix(httpupgrade): X-Forwarded-For header not read. #3172

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

chise0713
Copy link
Contributor

Linked: #3167

@yuhan6665 yuhan6665 merged commit 2cafb3e into XTLS:main Mar 23, 2024
34 checks passed
@yuhan6665
Copy link
Member

感谢佬!

@RPRX
Copy link
Member

RPRX commented Mar 25, 2024

一直想说,在 WebSocket 中这东西的优先级一直是最高的,高于 PROXY protocol,那就有个小 bug 是如果 Xray 服务端前面没东西追加 X-Forwarded-For 的话客户端可以随意“伪造”来源 IP,应该加一个开关来决定是否读取它 @yuhan6665 @Fangliding

@yuhan6665
Copy link
Member

加个 env var?

@RPRX
Copy link
Member

RPRX commented Mar 27, 2024

加个 env var?

影响范围太大了,加个配置项就行,甚至可以加成指定读第几个 IP

arror added a commit to arror/Xray-core that referenced this pull request Apr 2, 2024
* main: (24 commits)
  Add "nosni" option to send empty SNI (XTLS#3214)
  API: add Source IP Block command (XTLS#3211)
  v1.8.10
  Fix TestXrayConfig in xray_test.go
  Add separate host config for websocket
  Update proto file for websocket and httpupgrade (breaking)
  API - Add | Remove Routing Rules  (XTLS#3189)
  Fix host in headers field does not work XTLS#3191
  fix: config `burstObservatory` override
  Bump github.com/sagernet/sing from 0.3.6 to 0.3.8
  Add support for HTTPupgrade custom headers
  improve balancer_info.go
  Fix(httpupgrade): `X-Forwarded-For` header not read. (XTLS#3172)
  Allow to send through random IPv6
  Update HTTPUpgrade spelling and proto
  Chore: Clean up legacy `field` usage
  Update README.md
  Bump github.com/quic-go/quic-go from 0.41.0 to 0.42.0
  Fix HTTPUpgrade transport register
  HTTPUpgrade 0-RTT (XTLS#3152)
  ...
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.

3 participants