1楼
以下是我的配置文件:
- server {
server_name www.example.com;
location / {
proxy_pass https://www.google.com/;
proxy_redirect https://www.google.com/ /;
# proxy_redirect off;
proxy_cookie_domain google.com www.example.com;
proxy_set_header Host "www.google.com";
proxy_set_header Referer https://www.google.com;
proxy_set_header Accept-Encoding "";
proxy_set_header Accept-Language "en-US";
proxy_set_header User-Agent $http_user_agent;
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 https;
subs_filterhttp://www.google.com http://www.example.com;
subs_filterhttps://www.google.com http://www.example.com;
sub_filter_once off;
# 这里替换网页中的链接,因为我们的镜像站是http的,所以上面顺便把协议也一起替换了
}
}
复制代码
可是只能打开 google 首页,搜索的话会显示连接已重置,求解?有没有做过的大哥解答一下呢?
热议
2楼 【主机资讯】 记得之前有个jsproxy.ga挺好用的,可惜不知道咋没了
3楼 【cybmp3】 把小鸡IPV6关掉试试,或者把相关域名的IPv4在hosts里写死
4楼 【nichijou】 你不怕域名 ip被封么
5楼 【yousihai】 Google的结果中有一大把的其他域名,需要全部替换。
6楼 【imp】 用http 还怎么搜,结果页动不动就是敏感词
7楼 【Ticifer】 自行参考:https://linuxeye.com/450.html