小弟公司使用http代理上网,我想用winsock写一个穿过http代理下载的工具,前面的connect没有问题,但是当我发送
CONNECT www.sina.com:80 HTTP/1.1
User-Agent: Myapp/0.1
Proxy-Authorization: Basic TGFzZXJfamlhbmc6TUR6bW16Zno1YwA=
到公司的代理服务器时,收到如下的数据
HTTP/1.1 502 Proxy Error ( The specified Secure Sockets Layer (SSL) port is not allowed. ISA Server is not configured to allow SSL requests from this port. Most Web browsers use port 443 for SSL requests.  )
Via: 1.1 ATSZ-PROXY-03
Connection: close
Proxy-Connection: close
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 786   
很奇怪,为什么要我通过443端口连接,没办法,只好改端口为443,重新发送requestheader,收到了如下的信息
HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )
Via: 1.1 ATSZ-PROXY-03
Proxy-Authenticate: Negotiate
Proxy-Authenticate: Kerberos
Proxy-Authenticate: NTLM
Connection: close
Proxy-Connection: close
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
这是什么意思?网上查了一下,是不是需要使用GSS-API?如果是,该如何使用,有没有这方面的资料推荐一下。谢谢!

解决方案 »

  1.   

    你用flashget下载个东西看看它都发那些包
      

  2.   

    我也想过这么做的啊,可是我在公司用不了wpe,一打开就被公司的OfficeScan杀掉了,哭
      

  3.   


    是你公司的代理服务器把的你http请求当成了https请求了 ~ 你看看你的代码是不是什么地方有问题?
      

  4.   


    直接把OfficeScan的服务停掉, 用户进程终止...
    我就是这么干的 ^_^
      

  5.   

    通过http代理需要 CONNECT 命令?一般不是 GET吗?
      

  6.   

    get是http代理
    connect是tcp代理
      

  7.   

    GET 我也使用过了,和connect的结果一样,有没有人做过Kerberos 或者NTLM认证的程序呢?
      

  8.   

    我不知道connect 消息怎么proxy但是我使用 get 消息是要发送如下语句的:
    Proxy-Connection: Keep-Alive
      

  9.   

    补充说明一下,我的IE可以上外网,而且目前发现的只有Internet download manager可以使用,使用flashget时,配置相同的代理,但就是用不了,flashget发的包和我的差不多,也收到了相同的返回头