GFW4Fun / x-ui-pro

XUI-PRO nginx reverse proxy with ws/grpc/httpupgrade/splithttp,xray protocol support: vless,vmess,trojan,shadowsocks xui-pro panel cloudflare ssl,xtls-rprx,ssr,v2fly bypass restrictions: socks5,v2ray-core installer,sing-box,shadowtls,reality,tunnel,gfw tor warp wireguard geoip tuic clash vpn mihomo psiphon hy2 oneclick argo bbr anticensorship⚡🛡️
356 stars 116 forks source link

Get Real ip connections #23

Open intellvold opened 3 months ago

intellvold commented 3 months ago

Hello, how can I get the user's real ip like getting the ip in the http protocol using X forward headers? Is there a way to do this without a domain? Or on a protocol that can be done in v2ray ?

GFW4Fun commented 2 months ago

Hi your cdn is on?

proxy_set_header    X-Real-IP $remote_addr;
proxy_set_header    X-Forwarded-For $http_cf_connecting_ip;
proxy_set_header    CF-Connecting-IP $http_cf_connecting_ip;
intellvold commented 2 months ago

I installed according to the instructions. I entered the domain . and the script got a certificate for this domain, and I opened the panel link that the script gave me , in the browser and tried to create an inbound with the websocket protocol, but the user's real IP was still not visible in the xui logs . In CDN, everything is open

and on the same domain, you can see the real IP in http get or post requests. but not show in xui logs when user connect vpn.

After installing the script and raising the panel in the browser using the domain. and creating ws inbound?

Do I have to do anything ?

Hi your cdn is on?

proxy_set_header  X-Real-IP $remote_addr;
proxy_set_header  X-Forwarded-For $http_cf_connecting_ip;
proxy_set_header  CF-Connecting-IP $http_cf_connecting_ip;
intellvold commented 2 months ago

For some security and server connection issue, I want to know real IP of users when connecting to vpn using V2ray core. In the xui logs, I can see IPs, but a bunch of ISPs, including my own. The router shows the central IP of the isp as the connection. While the actual IP is visible when the send or receive request is sent from the client to the server. I wanted to know how the same x forwarded scenario can be fully implemented in v2ray without the need to edit the client anymore because these things can be manipulated on the client side. I would be grateful if you know a solution for not using the domain, or if you know how it works with the domain. Because in the documentation of this repository, I could not fully understand how it works

Hi your cdn is on?

proxy_set_header  X-Real-IP $remote_addr;
proxy_set_header  X-Forwarded-For $http_cf_connecting_ip;
proxy_set_header  CF-Connecting-IP $http_cf_connecting_ip;
GFW4Fun commented 2 months ago

Run the installation again! The script was updated!

GFW4Fun commented 2 months ago

@GFW4Fun 我使用了ChatGPT进行翻译,方便您的阅读。感谢您的出色工作。我想知道,NGINX是否支持TCP TLS xtls-rprx-vision?另外,在您看来,Caddy、NGINX和HAProxy哪个更好?

Maybe TCP/UDP stream support in the future!

hazharKurdi commented 1 week ago

remove this script cod plz