Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

谷歌学术需要人机验证 #121

Open
zhangmikoto opened this issue Aug 24, 2016 · 30 comments
Open

谷歌学术需要人机验证 #121

zhangmikoto opened this issue Aug 24, 2016 · 30 comments

Comments

@zhangmikoto
Copy link

RT,谷歌可以正常反代

@shmilee
Copy link

shmilee commented Oct 26, 2016

同遇到,
deepinscrot-0812

试着解决了几步:

  • https://www.google.com/recaptcha/admin 加入自己的 Domain, 获得一枚 Site key,复制备用。
  • 修改 配置文件,默认sitekey(6LfFDwUTAAAAAIyC8IeC3aGLqVpvrB6ZpkfmAibj)从网页中获取。
    location / {
         google on;
         google_scholar on;
         subs_filter '"sitekey":"默认的sitekey"'
                  '"sitekey":"第1步得到的sitekey"' ir;
    }
  • 验证,点图片,完成后是这样的

1

但是接着就变脸了

deepinscrot-5501

@reee
Copy link

reee commented Jan 16, 2017

额 有人解决这个问题么?

@yezihack
Copy link

请问到底怎么设置?默认的sitekey"'就指哪个? '"sitekey":"第1步得到的sitekey”又是指哪个?

@dogeow
Copy link

dogeow commented Jul 21, 2017 via email

@dogeow
Copy link

dogeow commented Jul 21, 2017

@yezihack

@yezihack
Copy link

@likunyan 我现在替换了,弹出图片验证了,点击了还是不正确,一直在验证。
resolver 8.8.8.8;
location / {
google on;
google_scholar on;
subs_filter xxx
xxxx ir;
}

@yezihack
Copy link

@likunyan 好多什么路标。每次要验证,而且还通不过。

@yezihack
Copy link

@likunyan g.sgfoot.com 帮我看下。

@yezihack
Copy link

@likunyan 麻烦指导一下。企鹅710702032

@out0fmemory
Copy link

还是不行呀

@out0fmemory
Copy link

@likunyan 已经验证,方法已失效

@mashirozx
Copy link

请问Scholars入口在哪?是要添加子域名吗?😂

@dogeow
Copy link

dogeow commented Mar 5, 2018

@mashirozx 添加 google_scholar on; 即可

@mashirozx
Copy link

@likunyan嗯嗯,加了,但是浏览器里面要通过哪个域名访问?:joy:

@mashirozx
Copy link

@likunyan 这是我的配置,但是通过 https://note.shino.cc/scholar 访问会跳回主页,不清楚是哪里配置错了?

server{
listen 443 ssl;
	listen [::]:443 ssl;
	server_name note.shino.cc;
	resolver 8.8.8.8;
	
	ssl on;
ssl_certificate /pem; 
ssl_certificate_key /key; 
    ssl_session_timeout 5m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
    ssl_prefer_server_ciphers on;  

	if ($http_user_agent ~* (baiduspider|360spider|haosouspider|googlebot|soso|bing|sogou|yahoo|sohu-search|yodao|YoudaoBot|robozilla|msnbot|MJ12bot|NHN|Twiceler)) {
		return  403;
	}
  
	location / {
        proxy_pass https://www.google.com;
        proxy_connect_timeout 120;
        proxy_read_timeout 600;
        proxy_send_timeout 600;
        send_timeout 600;
        proxy_redirect    off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        google on;
        google_scholar on;
        google_language "zh-CN";
    }
}

看了一下你的镜像是能正常访问的,求指点QAQ

@dogeow
Copy link

dogeow commented Mar 5, 2018

我看了你的,确实不行。我给我朋友弄的,以及我的都可以,你看看我的配置,尝试下。

server {
server_name g.example.com;
listen 443;

ssl on;
ssl_certificate /etc/letsencrypt/live/g.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/g.example.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/g.example.com/fullchain.pem;
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
add_header Strict-Transport-Security max-age=15768000;

resolver 8.8.8.8;
location / {
google on;
google_scholar on;
subs_filter '6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1a'
'6LfwGw4UAAAAAO1FMzjzrEC8nkvmsAV_ypBpIk9b' ir;
}
location ~ ^/ipv4/sorry/ {
google on;
subs_filter '6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1a'
'6LfwGw4UAAAAAO1FMzjzrEC8nkvmsAV_ypBpIk9b' ir;
subs_filter '(<img src="/sorry/image.*continue=https://)g.example.com'
'$1www.google.com' ir;
subs_filter '(<input.*name="continue".*value="https://)g.example.com'
'$1www.google.com' ir;
}
}

@dogeow
Copy link

dogeow commented Mar 5, 2018

@out0fmemory @yezihack @reee @shmilee 你们都好了吗

@shmilee
Copy link

shmilee commented Mar 5, 2018

弃用了,现在fq,直接访问google学术

@mashirozx
Copy link

@likunyan 感谢,可以了,原来实我多写了个proxy_pass https://www.google.com; 😂

@meilele
Copy link

meilele commented Jul 27, 2019

我看了你的,确实不行。我给我朋友弄的,以及我的都可以,你看看我的配置,尝试下。

server {
server_name g.example.com;
听443;

ssl on;
ssl_certificate /etc/letsencrypt/live/g.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/g.example.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/g.example.com/fullchain.pem;
ssl_ciphers'ECEDE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE- RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128- SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256: DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES- CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:DSS“;!
add_header Strict-Transport-Security max-age = 15768000;

解析器8.8.8.8;
location / {
google on;
google_scholar on;
subs_filter'6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1a''6LfwGw4UAAAAAO1FMzjzrEC8nkvmsAV_ypBpIk9b'ir
;
}
位置〜^ /的IPv4 /抱歉/ {
谷歌上;
subs_filter'6LfwuyUTAAAAAOAmoS0fdqijC2PbbdH4kjq62Y1a''6LfwGw4UAAAAAO1FMzjzrEC8nkvmsAV_ypBpIk9b'ir
;
subs_filter'(<img src =“/sorry/image.continue=https://)g.example.com''$
1www.google.com'ir;
subs_filter'(<input。
name =”continue“。 * value =“https://)g.example.com'
'$ 1www.google.com'ir;
}
}

已经失效,无法验证通过。

@cuber
Copy link
Owner

cuber commented Aug 14, 2019

目前 google 最新的 reCaptcha 基本无解
因为会对域名做好几次强校验
如果有的好的办法我会继续更新到 dev 分支

@shmilee
Copy link

shmilee commented Aug 14, 2019

最近vps访问google也是一直人机验证,一天至少一次,显示的是ipv4地址,解决办法是给vps加了一个ipv6 tunnel地址去访问google,几天下来,没再碰到人机验证。
所以搭建google镜像碰到验证这个问题可能最好通过换ip解决?有条件的可以试试,让nginx通过ipv6反代。

@cuber
Copy link
Owner

cuber commented Aug 14, 2019

@shmilee
可以参考 https://github.com/lennylxx/ipv6-hosts
通过本地绑定 ipv6 的 host 解决

@shmilee
Copy link

shmilee commented Aug 14, 2019

@cuber

  1. 第一段话是关于v2ray的,VPS加ipv6地址是因为这个原因 谷歌搜索的时候让输入验证码 v2ray/v2ray-core#264, 不是非ipv6不可,只要换个不在google名单上的ip地址即可。用ipv6隧道 https://tunnelbroker.net/, 因为即免费又简单。

  2. 第二段话是针对此模块的这个issue,借鉴1,让nginx换ip反代google,不需要ipv6 host这么麻烦,按理说只需要设置 nginx resolver [2001:4860:4860::8888] ipv6=on; 即可。不过也看每个人的网,我这边没用google的DNS。教育网v4 v6双栈, openwrt 路由器,用的以下配置:

root@OpenWrt:/etc/nginx# cat nginx.conf
。。。。。。。。。。。。。。。。。。。。
########## google ##########
upstream www.google.com {
    include /etc/nginx/google-upstream.conf;
}
upstream scholar.google.com {
   include /etc/nginx/google-upstream.conf;
}
upstream www.gstatic.com {
    include /etc/nginx/google-upstream.conf;
}
upstream encrypted-tbn0.gstatic.com {
    include /etc/nginx/google-upstream.conf;
}
upstream encrypted-tbn1.gstatic.com {
    include /etc/nginx/google-upstream.conf;
}
upstream encrypted-tbn2.gstatic.com {
    include /etc/nginx/google-upstream.conf;
}
upstream encrypted-tbn3.gstatic.com {
    include /etc/nginx/google-upstream.conf;
}
upstream ssl.gstatic.com {
    include /etc/nginx/google-upstream.conf;
}
upstream apis.google.com {
    include /etc/nginx/google-upstream.conf;
}
upstream id.google.com {
    include /etc/nginx/google-upstream.conf;
}

server {
    listen       80;
    server_name  google.shmilee.io;
    # enforce https
    return 301 https://$server_name$request_uri;
}
server {
    listen       443 ssl http2;
    server_name  google.shmilee.io;
    ssl_certificate        ssl-certs/server-google-shmilee.crt;
    ssl_certificate_key    ssl-certs/server-google-shmilee.key;
    #resolver [2001:4860:4860::8888] ipv6=on;
    resolver [2620:0:ccc::2] ipv6=on;

    location / {
        google on;
        google_scholar on;
    }
}
########## end ##########
。。。。。。。。。。。。。。。。。

root@OpenWrt:/etc/nginx# cat /etc/nginx/google-upstream.conf
server [2404:6800:4005:80f::200e]:443 weight=3;

方便切换IP多了这个文件 /etc/nginx/google-upstream.conf,可以去掉。
刚测试,可以正常使用搜索+学术。可能平时用的少,没再碰到人机验证。
如果搭的镜像用的人多,可能IP还会被google加入名单,那只能定期更换ipv6地址了。

@cuber
Copy link
Owner

cuber commented Aug 15, 2019

@shmilee
主要大部分 vps 提供商的 ipv4 地址都在 google 的黑名单上了,搜索弹验证码,学术直接打不开
感谢分享 ipv6 的配置,是个不错的思路

@SJ2050cn
Copy link

SJ2050cn commented Feb 6, 2020

我也碰到了访问google学术出现人机身份验证,有大佬有最新的解决方法吗
screenshot

@xiaohuimc
Copy link

xiaohuimc commented Mar 27, 2020

@shmilee
image

请教一下,已经开启ipv6,但访问学术的ip还是ipv4的。

这是我的配置

worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
  upstream www.google.com {
        server [2404:6800:4008:801::2004]:443;
   }

server {

    listen 443 ssl;
    server_name scholar.spvip.net;
    ssl_certificate /etc/nginx/ssl/s8.soolun.net_ssl.crt;
    ssl_certificate_key /etc/nginx/ssl/s8.soolun.net_ssl.key;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM- 
    SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    resolver [2620:0:ccc::2] ipv6=on;

    location / {
                google on;
                google_scholar on;
                google_language "zh-CN";
      }
   }

      server {
          listen       80;
          server_name  localhost;

        location / {
            root   html;
            index  index.html index.htm;
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

    }

}

@shmilee
Copy link

shmilee commented Mar 29, 2020

@xiaohuimc
nginx没看出有问题,可能系统那边某个环节出问题了吧

@shmilee
Copy link

shmilee commented May 18, 2020

@xiaohuimc 学术现在不能ipv6访问了,惨惨惨
Screenshot_2020-05-18 IPv6 test - web site reachability

@xiaohuimc
Copy link

@xiaohuimc 学术现在不能ipv6访问了,惨惨惨
Screenshot_2020-05-18 IPv6 test - web site reachability

找到可以用的镜像,再镜像镜像的网站,说的有点绕。不妨也是一种解决方法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests