[英]Ibrowse Erlang HTTP Client Proxy Authentication within a Domain
My Ibrowse HTTP Client is behind a Network and any HTTP request to the outside has to go through a Proxy. 我的Ibrowse HTTP客户端位于网络后面,任何外部HTTP请求都必须通过代理。 Now, Ibrowse has a good example for this.
现在,Ibrowse就是一个很好的例子。 However, i got a little confused.
但是,我有点困惑。 The Proxy behind which i am running the application uses
Domain Authentication
(this Domain is an Active Directory
kinda setup) whereby usually in a browser we would have to enter settings like this (say the domain is "kyaug"
), 我正在运行应用程序的代理使用
Domain Authentication
(此域是Active Directory
有点设置),通常在浏览器中我们必须输入这样的设置(比如域名为"kyaug"
),
username: kyaug\[YOUR_DOMAIN_USERNAME] password: [Domain Password]This means that
[YOUR_DOMAIN_USERNAME]
is your Domain Username actually.
[YOUR_DOMAIN_USERNAME]
实际上是您的域用户名。
\nibrowse:send_req("http://www.erlang.se/", [], get, [],Now, lets say that my situation is as follows:ibrowse:send_req(“http://www.erlang.se/”,[],get,[],\n [{proxy_user, "XXXXX"},
[{proxy_user,“XXXXX”},\n {proxy_password, "XXXXX"},
{proxy_password,“XXXXX”},\n {proxy_host, "proxy"},
{proxy_host,“proxy”},\n {proxy_port, 8080}], 5000).
{proxy_port,8080}],5000)。\n
\nDomain: kyaug领域:kyaug\nDomain Username: muzaayj
域名用户名:muzaayj\nProxy Server: ppi.kyu.co.ug
代理服务器:ppi.kyu.co.ug\nProxy Port: 3128
代理端口:3128\nDomain Password: xxxxx
域密码:xxxxx \n
Now, When i try thsi below: 现在,当我尝试以下时:
\nOptions = [选项= [\n {proxy_user, "kyaug\\muzaayj"},
{proxy_user,“kyaug \\ muzaayj”},\n {proxy_password, "My Domain Password"},
{proxy_password,“我的域名密码”},\n {proxy_host, "ppi.kyu.co.ug"},
{proxy_host,“ppi.kyu.co.ug”},\n {proxy_port, 3128}
{proxy_port,3128}\n ],
]
ibrowse:send_req("http://www.google.com",[],post,Data,Options,infinity).ibrowse:SEND_REQ( “http://www.google.com”,[],交,数据,选项,无穷大)。\n
The proxy spits back to me an HTML page informing me that PROXY_AUTH_REQUIRED
and many other things about its administrators. 代理向我发回一个HTML页面,告诉我
PROXY_AUTH_REQUIRED
以及有关其管理员的许多其他事情。 Now, i have a feeling that its because i am putting the proxy_user
wrongly. 现在,我有一种感觉,因为我错误地使用了
proxy_user
。 In the above, i am supplying this parameter the way the browsers take it as well, probably behind the scenes, its changed into a different arrangement. 在上面,我提供这个参数的方式与浏览器一样,可能在幕后,它改变成一个不同的安排。 Some one assist in how i can correct this.
有人协助我如何纠正这个问题。 How do browsers send their data to a proxy server for authentication given that the username must be append to the Domain to be used for authentication at the Proxy end ?
如果用户名必须附加到用于在代理端进行身份验证的域,浏览器如何将其数据发送到代理服务器进行身份验证?
您是否在选项中尝试{proxy_user, "muzaayj"}
而不是{proxy_user, "kyaug\\muzaayj"}
?
Have you tried {proxy_user, "kyaug\\\\muzaayj"}
? 你试过
{proxy_user, "kyaug\\\\muzaayj"}
吗? A single backslash escapes the m
back to an m
, but a double backslash becomes a single backslash in the string. 单个反斜杠将
m
转回m
,但双反斜杠变为字符串中的单个反斜杠。
我不熟悉ibrowse,但我认为Windows身份验证方法中的问题(ofc取决于AD配置,但我怀疑是NTLM Auth),ibrowse并不支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.