V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
582033
V2EX  ›  问与答

HTTP代理问题

  •  
  •   582033 · Aug 26, 2013 · 3051 views
    This topic created in 4633 days ago, the information mentioned may be changed or developed.
    用nginx搭了个HTTP代理给自己用,但是问题来了..

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

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

    求解.
    6 replies    1970-01-01 08:00:00 +08:00
    582033
        1
    582033  
    OP
       Aug 26, 2013
    配置如下:

    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  
       Aug 26, 2013
    目测只能代理http,对于需要tcp的不行
    582033
        3
    582033  
    OP
       Aug 26, 2013
    @nulloo 可是有人用nginx做http代理来用QQ呢.
    anheiyouxia
        4
    anheiyouxia  
       Aug 26, 2013
    @582033 你最好问问那个人是怎么实现的
    估计是利用了Squid之类的实现的
    因为QQ这类应用代理需要支持connection方法,但是nginx当前仅支持get和post方法~~
    anheiyouxia
        5
    anheiyouxia  
       Aug 26, 2013
    修正一下上面那条回复中的错误的内容,不是仅支持get post方法,get post只是常用的方法~~
    582033
        6
    582033  
    OP
       Aug 27, 2013
    @anheiyouxia OK, THX.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   920 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 18:27 · PVG 02:27 · LAX 11:27 · JFK 14:27
    ♥ Do have faith in what you're doing.