简体   繁体   English

域中的Ibrowse Erlang HTTP客户端代理身份验证

[英]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]实际上是您的域用户名。

Now in the Ibrowse, an example that looks like this comes along: 现在在Ibrowse,一个看起来像这样的例子出现了:
\nibrowse:send_req("http://www.erlang.se/", [], get, [], 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
Now, lets say that my situation is as follows: 现在,让我说我的情况如下:

\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.

相关问题 跨域 HTTP POST 认证 - Cross domain HTTP POST authentication 是否确保Erlang中的SSL包含在每个进程/客户端/连接中? - Is SSL in Erlang guaranteed to be contained within each process/client/connection? 客户端身份验证方案“Anonymous”禁止HTTP请求 - The HTTP request was forbidden with client authentication scheme 'Anonymous' 客户端身份验证方案“Anonymous”禁止HTTP请求 - The HTTP request was forbidden with client authentication scheme 'Anonymous' HTTP 基本身份验证而不是 TLS 客户端认证 - HTTP Basic Authentication instead of TLS client certification 认证代理 - Authentication proxy 客户端是否可以在摘要HTTP身份验证中选择质询(立即)? - Is the client allowed to choose challenge (nonce) in Digest HTTP authentication? 客户端证书映射身份验证期间出现HTTP错误401.2和登录错误0x80090325 - HTTP Error 401.2 and Login Error 0x80090325 During Client Certificate Mapping Authentication IIS托管具有SSL安全性的WCF-“ HTTP请求被客户端身份验证方案'Anonymous'禁止”错误 - IIS hosted WCF with SSL security -“The HTTP request was forbidden with client authentication scheme 'Anonymous'” error “使用PHP进行HTTP身份验证”的好处 - benefits of “HTTP authentication with PHP”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM