全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
12
返回列表 发新帖
楼主: llyang

[疑问] nginx反代难题-套CF IP限制

[复制链接]
发表于 2024-7-27 11:36:45 | 显示全部楼层
proxy_set_header Host fna.northerneducationtrust.org
 楼主| 发表于 2024-7-27 16:18:00 | 显示全部楼层
swan 发表于 2024-7-27 11:36
proxy_set_header Host fna.northerneducationtrust.org


proxy_set_header Host fna.northerneducationtrust.org;
OR
proxy_set_header $host;

都不行,常用的都测试了
 楼主| 发表于 2024-7-27 16:47:10 | 显示全部楼层
本帖最后由 llyang 于 2024-7-27 16:48 编辑

把我测试过的一些代码发出来.remark部分是我测试过不行的

  1.      proxy_pass https://fna.northerneducationtrust.org;
  2. #    proxy_pass http://fna.northerneducationtrust.org;
  3.      proxy_set_header Host fna.northerneducationtrust.org;
  4. #    proxy_ssl_name $host;
  5.      proxy_ssl_name fna.northerneducationtrust.org;
  6.     proxy_ssl_server_name on;
  7. #    proxy_set_header X-Real-IP $remote_addr;
  8. #    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  9.      proxy_set_header X-Forwarded-Proto $scheme; #ERR_TOO_MANY_REDIRECTS

  10.      proxy_set_header Accept-Encoding "";
  11.      sub_filter fna.northerneducationtrust.org mydomain.com;
  12. #    proxy_redirect https://fna.northerneducationtrust.org https://mydomain.com;
  13. #    proxy_redirect off;
  14. #    sub_filter 'abc'  '123'  ;
  15. #    sub_filter_once off;
复制代码
发表于 2024-7-27 17:14:48 | 显示全部楼层
正好没事做,帮你修好了,亲测有效,记得要用 UK 的 IP,再不行的话你换个别的 UK 商家的 IP 试试,也可能是访问量大以后触发了对面 CF 设置的 WAF


  1.         location / {
  2.             proxy_pass https://fna.northerneducationtrust.org;
  3.             proxy_redirect off;
  4.             proxy_set_header Host fna.northerneducationtrust.org;
  5.             proxy_set_header Accept-Encoding '';
  6.          
  7.             client_max_body_size    10m;
  8.             client_body_buffer_size  512k;

  9.             proxy_connect_timeout    5;
  10.             proxy_read_timeout       60;
  11.             proxy_send_timeout       5;
  12.             proxy_buffer_size        16k;
  13.             proxy_buffers            4 64k;
  14.             proxy_busy_buffers_size 128k;

  15.             proxy_hide_header Alt-Svc;
  16.             proxy_hide_header Cf-Cache-Status;
  17.             proxy_hide_header Report-To;
  18.             proxy_hide_header Nel;
  19.             proxy_hide_header Cf-Ray;
  20.             proxy_hide_header Vary;
  21.             proxy_hide_header X-protocol;
  22.             proxy_hide_header Strict-Transport-Security;
  23.             proxy_hide_header X-Frame-Options;
  24.             proxy_hide_header X-Content-Type-Options;
  25.             proxy_hide_header X-XSS-Protection;

  26.             proxy_ssl_server_name on;

  27.             sub_filter 'fna.northerneducationtrust.org' '你的域名';
  28.             sub_filter_once off;
  29.             sub_filter_types text/javascript application/json application/ld+json application/xml;
  30.         }
复制代码
 楼主| 发表于 2024-7-27 19:33:06 | 显示全部楼层
Showfom 发表于 2024-7-27 17:14
正好没事做,帮你修好了,亲测有效,记得要用 UK 的 IP,再不行的话你换个别的 UK 商家的 IP 试试,也可能 ...

了不起,可以正常工作了,万分感谢

有个小插曲,以前的UK IP无论咋样都不行;新换一个UK IP+复制你的代码,妥妥的
发表于 2024-7-27 22:17:55 | 显示全部楼层
llyang 发表于 2024-7-26 21:10
直接报告:ERR_TOO_MANY_REDIRECTS
添加proxy_redirect off;也一样

解决了吗?
发表于 2024-7-27 22:19:06 | 显示全部楼层
Showfom 发表于 2024-7-27 17:14
正好没事做,帮你修好了,亲测有效,记得要用 UK 的 IP,再不行的话你换个别的 UK 商家的 IP 试试,也可能 ...

哇塞 给力啊
请教个问题,反向代理 能否开启QUIC ?
发表于 2024-7-28 08:40:35 | 显示全部楼层
llyang 发表于 2024-7-27 19:33
了不起,可以正常工作了,万分感谢

有个小插曲,以前的UK IP无论咋样都不行;新换一个UK IP+复制你 ...

估计网站设置有 IP 速率限制等策略

不知道新 IP 访问量一大会不会在触发
发表于 2024-8-5 06:52:26 | 显示全部楼层
Showfom 发表于 2024-7-27 17:14
正好没事做,帮你修好了,亲测有效,记得要用 UK 的 IP,再不行的话你换个别的 UK 商家的 IP 试试,也可能 ...

老板 这个cf js challange 卡住怎么半
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-9-8 07:24 , Processed in 0.061198 second(s), 6 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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