Skip to content

log the real client ip when using grpc transport#3606

Closed
hann-wang wants to merge 1 commit into
v2fly:masterfrom
hann-wang:han/fix-grpc-real-ip
Closed

log the real client ip when using grpc transport#3606
hann-wang wants to merge 1 commit into
v2fly:masterfrom
hann-wang:han/fix-grpc-real-ip

Conversation

@hann-wang

@hann-wang hann-wang commented Jan 23, 2026

Copy link
Copy Markdown

resolve: #1026
original pr: #1032

This PR rebases the original pr on top of the main branch.

Tested with a GRPC server behind NGINX proxy.

@xiaokangwang

Copy link
Copy Markdown
Contributor

Thanks for the contribution. This function should be controlled via a option, rather than applied by default, as when listening directly, this ip address can be set by client.

@codecov

codecov Bot commented Feb 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.66667% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 23.23%. Comparing base (7fdb717) to head (1a4bf0e).
⚠️ Report is 68 commits behind head on master.

Files with missing lines Patch % Lines
transport/internet/grpc/encoding/conn.go 0.00% 6 Missing ⚠️
common/protocol/grpc/metadata.go 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3606      +/-   ##
==========================================
+ Coverage   23.21%   23.23%   +0.02%     
==========================================
  Files         836      837       +1     
  Lines       45454    45469      +15     
==========================================
+ Hits        10552    10565      +13     
- Misses      33685    33688       +3     
+ Partials     1217     1216       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown
Contributor

It has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions Bot added the Stale label Jun 10, 2026
@github-actions github-actions Bot closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] grpc 不接受来自 X-Real-IP 的 ip 作为客户端 ip

2 participants