反代节点配置
反代机Nginx配置

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;

源站配置
源站机从 反代机 获取IP的配置,从 X-Forwarded-For 头获取IP

set_real_ip_from 0.0.0.0/0;
real_ip_header X-Forwarded-For;

源站从 CloudFlare 获取IP的配置,从 CF-Connecting-IP 头获取IP

set_real_ip_from 0.0.0.0/0;
real_ip_header CF-Connecting-IP;