nginx反代难题-套CF IP限制
一个小学的网站,练习反代发现始终无法成功。网站地址如下
fna.northerneducationtrust.org
需要UK IP访问。如果是UK IP,访问十分正常,没有验证等。
我的VPS选用的UK IP,用这个IP代理可以访问该网站。
已经使用这些方法都无效
proxy_redirect on/off;
proxy_ssl_server_name on;
反代不成功的截图如下
https://s2.loli.net/2024/07/26/kcHLpj4OmQCb2Yi.png location / {
proxy_pass http://fna.northerneducationtrust.org;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
} 签名用edgecdn完美解决 是不是反代的时候 传递真实IP 给 它了 你不发
ssl_name $Host;
吗? 直接报告:ERR_TOO_MANY_REDIRECTS
添加proxy_redirect off;也一样 :lol
你加x-forward x-real不正告诉对面你用反代访问 X-Real-IP
X-Forwarded-For
注释与开启,表现一样 nginx报错如下:
2024/07/26 14:59:16 43597#43597: *22 connect() to :443 failed (101: Network is unreachable) while connecting to upstream, client: 172.167.88.51, server: www.mydomain.com, request: "GET / HTTP/2.0", upstream: "https://:443/", host: "www.mydomain.com"2024/07/26 14:59:17 43597#43597: *22 connect() to :443 failed (101: Network is unreachable) while connecting to upstream, client: 172.167.88.51, server: www.mydomain.com, request: "GET /cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1?ray=8a9540b07f3a3634 HTTP/2.0", upstream: "https://:443/cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1?ray=8a9540b07f3a3634", host: "www.mydomain.com", referrer: "https://www.mydomain.com/?__cf_chl_rt_tk=CN_qBOKFGQHcehplHm5VTXmY7VFB8N9Hcn34eu3pt40-1722005957-0.0.1.1-4330"
关闭IPv6也没用:lol
页:
[1]