tobychui / zoraxy

A general purpose HTTP reverse proxy and forwarding tool. Now written in Go!
https://zoraxy.aroz.org
GNU Affero General Public License v3.0
3.09k stars 188 forks source link

[ENHANCEMENTS] forward the clients external IP #333

Closed bluenazgul closed 4 weeks ago

bluenazgul commented 1 month ago

Is there a solutions to get the external Client IP forwared to the proxy Host (Host and Stream Hosts)

Currently all Hosts only get accessed by the Zoraxy Proxy IP

tobychui commented 1 month ago

@bluenazgul Have you tried the advance setting under the custom header snippet tool to see if that fits your needs? 圖片

Usually the previous node (client) external IP & zoraxy's IP is appended to the X-Forwarded-For header following de-facto standard used by other open source reverse proxy / web server projects. If that is not the case, you can uncheck the Remove Hop-by-Hop Header and make Zoraxy kinda transparent to the upstream application for testing. If this option is disabled (i.e. Hop-by-hop header is not removed) and your upstream still cannot get the Client IP, then there will be a high chances that you got some networking issues in downstream.

tobychui commented 4 weeks ago

As the X-Forward-For and X-Real-IP are already there and I guess this request is more like a setup issue of upstream services, I am closing this issue. For future visitors, if you want to override the values in default headers, check out the Wiki page for custom headers variables.