GSOAP:自动代理配置 URL
如何设置 GSOAP 生成的代理客户端类以使用自动 HTTP 代理配置 URL?
我知道我可以像这样配置 HTTP 代理地址:
AnyWebServicePortBindingProxy _client;
_client.proxy_host = "192.168.0.x"; // A valid network address.
_client.proxy_port = 8080;
_client.proxy_userid = "user";
_client.proxy_passwd = "password";
但是如果我想指向像“http://my_proxy/proxy_script.cfg”这样的 HTTP 代理脚本该怎么办?
谢谢!
How can I setup a GSOAP generated proxy client class to use an automatic HTTP proxy configuration URL?
I know I can configure the HTTP proxy address like this:
AnyWebServicePortBindingProxy _client;
_client.proxy_host = "192.168.0.x"; // A valid network address.
_client.proxy_port = 8080;
_client.proxy_userid = "user";
_client.proxy_passwd = "password";
But what to do if I want to point to an HTTP proxy script like "http://my_proxy/proxy_script.cfg"?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
代理配置脚本实际上是一段javascript代码,根据他的需要返回代理服务器地址。这是为了与实现解析
FindProxyForURL
响应所需逻辑的 Web 浏览器配合使用。我认为如果没有您的干扰,GSOAP 无法做同样的事情。
您必须手动检查您的代理响应(例如,在 SOAP 客户端的开头),并相应地解析和更新您的 gSOAP 代理配置。
A proxy configuration script is actually a javascript code that returns the proxy server address based on his needs. This was meant to work with web browsers that implement the necessary logic to parse the
FindProxyForURL
response.I don't think GSOAP is able to do the same thing without your interference.
You must check your proxy response by hand (in the beginning of the SOAP client, for example) resolve and update your gSOAP proxy configuration accordingly.