Valor nginx 的 http
或 server
块里,需要配置:
# v4
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 104.16.0.0/13;
set_real_ip_from 104.24.0.0/14;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 131.0.72.0/22;
# v6
set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2a06:98c0::/29;
set_real_ip_from 2c0f:f248::/32;
# jd cloud
set_real_ip_from 14.204.96.192/27;
set_real_ip_from 14.204.96.224/27;
set_real_ip_from 27.36.126.192/27;
set_real_ip_from 27.36.126.224/27;
set_real_ip_from 27.128.218.192/27;
set_real_ip_from 27.128.218.224/27;
set_real_ip_from 36.147.52.128/27;
set_real_ip_from 36.147.52.160/27;
set_real_ip_from 36.154.11.224/27;
set_real_ip_from 42.81.59.0/26;
set_real_ip_from 42.81.59.64/26;
set_real_ip_from 58.243.179.64/27;
set_real_ip_from 58.243.179.96/27;
set_real_ip_from 60.13.99.0/26;
set_real_ip_from 60.13.99.64/26;
set_real_ip_from 61.159.93.0/27;
set_real_ip_from 61.159.93.32/27;
set_real_ip_from 61.159.93.128/27;
set_real_ip_from 61.159.93.160/27;
set_real_ip_from 103.44.252.0/27;
set_real_ip_from 103.44.252.32/27;
set_real_ip_from 111.62.54.128/27;
set_real_ip_from 111.62.54.160/27;
set_real_ip_from 111.170.27.64/27;
set_real_ip_from 111.170.27.96/27;
set_real_ip_from 112.21.164.64/27;
set_real_ip_from 112.29.217.64/27;
set_real_ip_from 112.29.217.96/27;
set_real_ip_from 112.49.47.64/27;
set_real_ip_from 112.49.47.96/27;
set_real_ip_from 113.56.217.64/27;
set_real_ip_from 113.56.217.96/27;
set_real_ip_from 114.67.161.0/28;
set_real_ip_from 114.67.161.32/27;
set_real_ip_from 114.67.161.64/28;
set_real_ip_from 114.67.161.80/28;
set_real_ip_from 114.67.192.192/28;
set_real_ip_from 114.67.192.208/28;
set_real_ip_from 116.141.242.0/26;
set_real_ip_from 116.141.242.64/26;
set_real_ip_from 116.163.41.0/26;
set_real_ip_from 116.163.41.64/26;
set_real_ip_from 116.198.49.128/28;
set_real_ip_from 116.198.49.144/28;
set_real_ip_from 116.198.165.0/28;
set_real_ip_from 116.198.165.16/28;
set_real_ip_from 119.0.67.0/27;
set_real_ip_from 119.0.67.32/27;
set_real_ip_from 119.188.204.0/27;
set_real_ip_from 119.188.204.32/27;
set_real_ip_from 120.206.188.192/27;
set_real_ip_from 120.206.188.224/27;
set_real_ip_from 120.220.55.64/27;
set_real_ip_from 120.220.55.96/27;
set_real_ip_from 120.241.124.64/27;
set_real_ip_from 120.241.124.96/27;
set_real_ip_from 121.17.125.0/27;
set_real_ip_from 121.17.125.32/27;
set_real_ip_from 122.226.163.192/27;
set_real_ip_from 122.226.163.224/27;
set_real_ip_from 124.166.232.0/27;
set_real_ip_from 124.166.232.32/27;
set_real_ip_from 124.225.84.0/27;
set_real_ip_from 124.225.84.32/27;
set_real_ip_from 150.138.153.128/26;
set_real_ip_from 150.138.153.192/26;
set_real_ip_from 153.35.50.128/27;
set_real_ip_from 153.35.50.160/27;
set_real_ip_from 182.201.240.192/27;
set_real_ip_from 182.201.240.224/27;
set_real_ip_from 182.242.62.128/27;
set_real_ip_from 182.242.62.160/27;
set_real_ip_from 183.131.87.192/27;
set_real_ip_from 183.131.87.224/27;
set_real_ip_from 183.248.220.128/27;
set_real_ip_from 183.248.220.160/27;
set_real_ip_from 198.41.130.0/28;
set_real_ip_from 198.41.130.16/28;
set_real_ip_from 218.207.1.0/27;
set_real_ip_from 218.207.1.32/27;
set_real_ip_from 221.10.20.0/27;
set_real_ip_from 221.10.20.32/27;
set_real_ip_from 2400:cb00:164:0:1000::/68;
set_real_ip_from 2402:db40:51b5:10::/64;
set_real_ip_from 2403:1ec0:1400:ff01::/64;
set_real_ip_from 2403:1ec0:1400:ff05::/64;
set_real_ip_from 2403:1ec0:1400:ff10::/64;
set_real_ip_from 2403:1ec0:1610:ff05::/64;
set_real_ip_from 2408:8719:64:50:1000::/68;
set_real_ip_from 2408:871a:8810:205:1000::/68;
set_real_ip_from 2408:8726:3000:fff4:1000::/68;
set_real_ip_from 2408:8736:1802:0:1000::/68;
set_real_ip_from 2408:873d:2812:103:1000::/68;
set_real_ip_from 2408:8744:1000:9:1000::/68;
set_real_ip_from 2408:8752:600:6:1000::/68;
set_real_ip_from 2408:8756:4cff:d002:1000::/68;
set_real_ip_from 2408:8760:107:2:1000::/68;
set_real_ip_from 2409:8720:4001:2:1000::/68;
set_real_ip_from 2409:8728:5eff:100d:1000::/68;
set_real_ip_from 2409:8c04:1104:8:1000::/68;
set_real_ip_from 2409:8c34:d00:6:1000::/68;
set_real_ip_from 2409:8c38:c50:604:1000::/68;
set_real_ip_from 2409:8c3c:1400:5:1000::/68;
set_real_ip_from 2409:8c54:4010:27:1000::/68;
set_real_ip_from 240e:b1:9801:20d:1000::/68;
set_real_ip_from 240e:f7:4d0f:601:1000::/68;
set_real_ip_from 240e:f7:7c00:821:1000::/68;
set_real_ip_from 240e:914:6:d:1000::/68;
set_real_ip_from 240e:928:101:300:1000::/68;
set_real_ip_from 240e:935:a00:1706:1000::/68;
set_real_ip_from 240e:935:a00:1707:1000::/68;
set_real_ip_from 240e:938:a05:22:1000::/68;
set_real_ip_from 240e:944:8:5:1000::/68;
set_real_ip_from 240e:94c:4000:1602:1000::/68;
set_real_ip_from 240e:97c:4014:102:1000::/68";
# 客户端真实 ip
real_ip_header CF-Connecting-IP;
注:cloudflare 的回源 ip 地址段如果有更新,会在这里发公告:https://www.cloudflare.com/zh-cn/ips/
你可以通过接口查询:https://api.cloudflare.com/client/v4/ips?networks=jdcloud