全球主机交流论坛备用站

 找回密码
 立即注册

QQ登录

只需一步,快速开始

nginx反代难题-套CF IP限制

发布者: llyang | 发布时间: 2024-7-26 17:37| 查看数: 182| 评论数: 9|帖子模式

一个小学的网站,练习反代发现始终无法成功。
网站地址如下

  1. fna.northerneducationtrust.org
复制代码


需要UK IP访问。如果是UK IP,访问十分正常,没有验证等。

我的VPS选用的UK IP,用这个IP代理可以访问该网站。

已经使用这些方法都无效
proxy_redirect on/off;
proxy_ssl_server_name on;

反代不成功的截图如下

最新评论

Crownsecular 发表于 2024-7-26 17:43:21
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;
    }
MrJoker 发表于 2024-7-26 18:03:01
签名用edgecdn完美解决
职业菜鸟 发表于 2024-7-26 18:14:37
是不是反代的时候 传递真实IP 给 它了
iks 发表于 2024-7-26 18:56:44
你不发
ssl_name $Host;
吗?
llyang 发表于 2024-7-26 21:10:51
Crownsecular 发表于 2024-7-26 17:43
location / {
        proxy_pass http://fna.northerneducationtrust.org;
        proxy_set_header Host ...

直接报告:ERR_TOO_MANY_REDIRECTS
添加proxy_redirect off;也一样
xfspace 发表于 2024-7-26 17:43:00


你加x-forward x-real不正告诉对面你用反代访问
llyang 发表于 2024-7-26 22:35:33
xfspace 发表于 2024-7-26 22:35
你加x-forward x-real不正告诉对面你用反代访问

X-Real-IP
X-Forwarded-For
注释与开启,表现一样
llyang 发表于 2024-7-26 22:42:00
本帖最后由 llyang 于 2024-7-26 23:03 编辑

nginx报错如下:


  1. 2024/07/26 14:59:16 [error] 43597#43597: *22 connect() to [2606:xxxx:3034::ac43:be1e]: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://[2606:xxxx:3034::ac43:be1e]:443/", host: "www.mydomain.com"

  2. 2024/07/26 14:59:17 [error] 43597#43597: *22 connect() to [2606:xxxx:3031::6815:2189]: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://[2606:xxxx:3031::6815:2189]: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也没用
Tonyleeswan 发表于 2024-7-26 22:35:00
反代 问题 ,解决了吗???proxy_set_header Host fna.northerneducationtrust.org
展开

QQ|Archiver|手机版|小黑屋|全球主机交流论坛备用站

GMT+8, 2024-9-8 11:36 , Processed in 0.041281 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表