V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
imxz
V2EX  ›  问与答

如何处理谷歌学术反代中需要输入验证码的问题 ?

  •  
  •   imxz · 2014-10-19 15:30:51 +08:00 · 4448 次点击
    这是一个创建于 3484 天前的主题,其中的信息可能已经有所发展或是发生改变。
    反向代理了谷歌学术,使用了一两天后出现 “请键入下面的字词,这样我们就知道请求是由您而不是机器人发出的” ,如何处理 ?

    我的配置如下:

    server
    {
    listen 80;
    server_name scholar.goojie.me;

    location / {
    proxy_redirect http://scholar.google.com/ /;
    proxy_set_header Host "scholar.google.com";
    proxy_set_header Accept-Encoding "";
    proxy_set_header Accept-Language "zh-CN";
    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_pass http://scholar.google.com;
    sub_filter scholar.google.com scholar.goojie.me;
    sub_filter_once off;
    }
    }
    5 条回复    2014-10-19 21:24:10 +08:00
    anjunecha
        1
    anjunecha  
       2014-10-19 15:46:19 +08:00 via Android
    做一个负载均衡就可以了
    wdlth
        2
    wdlth  
       2014-10-19 16:47:55 +08:00
    不要直接proxy_pass到Google,用upstream里面加一堆IP做均衡。有条件的可以使用IPv6。
    ilihai
        3
    ilihai  
       2014-10-19 17:26:03 +08:00
    不知道怎么做,能不能多ua轮询。
    imxz
        4
    imxz  
    OP
       2014-10-19 19:53:17 +08:00
    @anjunecha
    @wdlth

    谢谢 !
    xarrow
        5
    xarrow  
       2014-10-19 21:24:10 +08:00
    均衡负载
    upstream {
    ip_hash;
    .........}
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2368 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 07:19 · PVG 15:19 · LAX 00:19 · JFK 03:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.