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

HTTP代理问题

  •  
  •   582033 · 2013-08-26 18:16:27 +08:00 · 2634 次点击
    这是一个创建于 3922 天前的主题,其中的信息可能已经有所发展或是发生改变。
    用nginx搭了个HTTP代理给自己用,但是问题来了..

    比如上QQ,设置HTTP代理时,提示验证服务器无效;

    又或者用作XSHELL链接SSH时也是无效;

    求解.
    6 条回复    1970-01-01 08:00:00 +08:00
    582033
        1
    582033  
    OP
       2013-08-26 18:25:59 +08:00
    配置如下:

    server {
    listen xxxx; #http代理
    location / {
    resolver 114.114.114.114; #DNS
    proxy_pass http://$http_host$request_uri;
    }
    #access_log /var/log/nginx/http_proxy_access.log;
    #error_log /var/log/nginx/http_proxy_error.log;
    }
    nulloo
        2
    nulloo  
       2013-08-26 18:35:08 +08:00
    目测只能代理http,对于需要tcp的不行
    582033
        3
    582033  
    OP
       2013-08-26 18:39:27 +08:00
    @nulloo 可是有人用nginx做http代理来用QQ呢.
    anheiyouxia
        4
    anheiyouxia  
       2013-08-26 19:12:25 +08:00
    @582033 你最好问问那个人是怎么实现的
    估计是利用了Squid之类的实现的
    因为QQ这类应用代理需要支持connection方法,但是nginx当前仅支持get和post方法~~
    anheiyouxia
        5
    anheiyouxia  
       2013-08-26 19:14:45 +08:00
    修正一下上面那条回复中的错误的内容,不是仅支持get post方法,get post只是常用的方法~~
    582033
        6
    582033  
    OP
       2013-08-27 08:52:26 +08:00
    @anheiyouxia OK, THX.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3023 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 04:29 · PVG 12:29 · LAX 21:29 · JFK 00:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.