ie设置代理服务器之后,打开网页无法弹出输入用户名密码的对话框,请问您是如何解决的?能分享一下吗?谢

2024-12-16 12:33:00
推荐回答(3个)
回答1:

这样看看:用SPI重写WSPSend(),如果是80端口,那么就检查申请人的ip,如果此IP从来没有登记过,那么就要他输入ID和PASS,他输入正确的话,保存它的IP和用户名,密码以便下次查找。

char szUnauthorized[] = "HTTP/1.0 407 Unauthorized\r\n "
"Server: Simple Proxy\r\n "
"char szUnauthorized[] = "HTTP/1.0 407 Unauthorized\r\n "
"Server: Simple Proxy\r\n "
"Proxy-Authenticate: Basic realm=\ "Simple Proxy Authorization\ "\r\n "
"Cache-control: no-cache\r\n "
"\r\n "
"

Unauthorized ...

";: Basic realm=\ "Simple Proxy Authorization\ "\r\n "
"Cache-control: no-cache\r\n "
"\r\n "
"

Unauthorized ...

";

收到browser请求时,验证请求头中Proxy-Authenticate:后面的用户名和密码,如果不正确发送上面内容到browser而不去请求webserver相关页面。上面内容关键两点:
"HTTP/1.0 407 Unauthorized\r\n "
"Proxy-Authenticate: Basic realm=\ "Simple Proxy Authorization\ "\r\n "

上面帖的乱了,看下面(\r\n是回车换行,即0d0a)

HTTP/1.0 407 Unauthorized\r\n
Server: Simple Proxy\r\n
Proxy-Authenticate: Basic realm= "Simple Proxy Authorization "\r\n
Cache-control: no-cache\r\n
\r\n

Unauthorized ...

回答2:

我这里有一个小旋风软件,大小就一M多但是很好用的,把你的网站复制到指定的目录下就能用了

回答3:

百度搜索 80猪在线代理

不用设置IE