我正在使用Twitter API(twitterizer)开发一个Twitter消息传递实用程序.但由于我在公司代理中,我收到错误'407 Proxy Authentication Required'.在调用API或使用默认代理设置之前,有没有办法验证用户?
PS内部API使用HttpWebRequest.
我的'LocalClient'应用程序位于HTTP代理服务器(ISA)后面的公司LAN中.我做的第一个Azure API调用CloudQueue.CreateIfNotExist()- 导致异常:(407)需要代理身份验证.我试过以下事情:
<System.Net> defaultProxy元素添加到app.config,但它似乎不起作用(参考:http://geekswithblogs.net/mnf/archive/2006/03/08/71663.aspx).根据MSDN,只有在开发存储的情况下,才能在连接字符串中指定HTTP代理服务器(请参阅http://msdn.microsoft.com/en-us/library/ee758697.aspx):
UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri
有没有办法通过代理服务器连接到Azure存储?
服务器端语言nginx webserver支持哪些?例如,apachi-tomcat用于java,wammp用于php.其次它安装在我的电脑上我需要知道如何通过http访问它,我需要把我的应用程序
我有一个简单的目标:使用phantom.js(开箱即用)或casper.js(更好,更容易)加载网页,但使用代理并从列表中旋转它,如果当前的一个是坏的(即网页加载失败或类似的东西).
我知道casper.js有--proxyparam但是它指示用户只指定一个代理并在运行时使用它.
问题#1是:如何以编程方式动态旋转代理?
我做了一些研究,发现了这个节点请求者,但它没有与之集成casper.js.我试图在代码中提取出代理功能但是并没有真正理解它是如何工作的(我猜我不是那么聪明).
所以问题#2:是否有一些简单的代理轮换实现,可以使用phantom.js或者casper.js?
我喜欢使用这种花哨casper.js但是也会phantom.js裸露下来.
我开始研究用C编写的非常基本的HTTP代理服务器(编辑:只是转发我的请求的东西).在这一点上,我很难理解如何继续.
任何帮助都是有益的.
当我运行以下Powershell cmdlet时(来自Azure管理工具Snapin):
get-osversions -subscriptionId **** -certificate (get-item cert:\CurrentUser\MY\******)
Run Code Online (Sandbox Code Playgroud)
我收到以下错误消息:
Get-OSVersions:远程服务器返回意外响应:(407)代理身份验证必需.在行:1 char:15 + get-osversions <<<< -subscriptionId *-certificate(get-item cert:\ CurrentUser\MY*****)+ CategoryInfo:CloseError:(:) [Get-OSVersions],ProtocolException + FullyQualifiedErrorId:Microsoft.Samples.AzureManagementTools.PowerShell.HostedS ervices.GetOSVersionsCommand
Get-OSVersions:对象引用未设置为对象的实例.在行:1 char:15 + get-osversions <<<< -subscriptionId * -certificate (get-item cert:\ CurrentUser\MY***)+ CategoryInfo:CloseError:(:) [Get-OSVersions],NullReferenceException + FullyQualifiedErrorId:Microsoft.Samples.AzureManagementTools.PowerShell.HostedS ervices.GetOSVersionsCommand
似乎这里的互联网代理服务器拒绝脚本所需的访问权限.
我在互联网上看了很多,似乎没有简单的解决方法,因为这个cmdlet没有有效的"-credentials"或代理服务器参数.
我知道有一个'Get-Credential'cmdlet,但我觉得它没有用.您如何将凭证传递给Azure cmdlet?
任何人都可以想到解决这个问题的方法吗?
...除了使用不同的非代理互联网连接?
我很难过.
非常感谢您的时间.
powershell credentials azure proxy-server http-status-code-407
我正在构建一个代理服务器,在收到HTTP CONNECT请求后,我建立了与目标服务器的连接,如果成功返回
HTTP/1.1 200 Connection established
<<empty line>>
Run Code Online (Sandbox Code Playgroud)
在Firefox中,这导致打开隧道并在浏览器中交换,加载并最终传送/呈现数据
在谷歌浏览器中,我立即看到:
ERR_TUNNEL_CONNECTION_FAILED
Run Code Online (Sandbox Code Playgroud)
由于服务器似乎适用于Firefox而不适用于Chrome,因此我只能假设Chrome需要不同的响应.有谁知道我在做错了什么?
编辑:
我发现这里的铬问题描述了相同的症状 - 用户获取ERR_TUNNEL_CONNECTION_FAILED.我启用了--log-net-log命令行参数,并且可以在日志中看到在收到我的200连接建立的代理响应后直接发生ERR_TUNNEL_CONNECTION_FAILED错误.
在请求和响应之间的较高位置,我看到-109错误,对应于ADDRESS_UNREACHABLE.
我在下面提到了我认为net-log的相关部分是:
{"params":{"headers":["Host: mail.google.com","Proxy-Connection: keep-alive","User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"],"line":"CONNECT mail.google.com:443 HTTP/1.1\r\n"},"phase":0,"source":{"id":822,"type":5},"time":"331488980","type":125},
{"params":{"headers":["Host: mail.google.com","Proxy-Connection: keep-alive","User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"],"line":"CONNECT mail.google.com:443 HTTP/1.1\r\n"},"phase":0,"source":{"id":822,"type":5},"time":"331488980","type":129},
{"params":{"byte_count":227},"phase":0,"source":{"id":822,"type":5},"time":"331488980","type":61},
{"phase":2,"source":{"id":822,"type":5},"time":"331488981","type":124},
{"phase":1,"source":{"id":822,"type":5},"time":"331488981","type":126},
{"phase":1,"source":{"id":822,"type":5},"time":"331488981","type":207},
{"params":{"address_family":0,"allow_cached_response":true,"host":"mail.google.com:0","is_speculative":false,"source_dependency":{"id":0,"type":0}},"phase":1,"source":{"id":823,"type":8},"time":"331489008","type":4},
{"params":{"source_dependency":{"id":823,"type":8}},"phase":1,"source":{"id":824,"type":21},"time":"331489008","type":299},
{"params":{"source_dependency":{"id":824,"type":21}},"phase":1,"source":{"id":825,"type":14},"time":"331489008","type":34},
{"params":{"address":"[2001:4860:4860::8888]:53"},"phase":1,"source":{"id":825,"type":14},"time":"331489008","type":70},
{"params":{"net_error":-109},"phase":2,"source":{"id":825,"type":14},"time":"331489008","type":70},
{"phase":2,"source":{"id":825,"type":14},"time":"331489008","type":34},
{"phase":2,"source":{"id":824,"type":21},"time":"331489008","type":299},
{"phase":0,"source":{"id":823,"type":8},"time":"331489008","type":6},
{"phase":2,"source":{"id":823,"type":8},"time":"331489008","type":4},
{"params":{"byte_count":74},"phase":0,"source":{"id":822,"type":5},"time":"331489052","type":63},
{"phase":2,"source":{"id":822,"type":5},"time":"331489052","type":207},
{"params":{"headers":["HTTP/1.1 200 Connection established"]},"phase":0,"source":{"id":822,"type":5},"time":"331489052","type":127},
{"params":{"net_error":-111},"phase":2,"source":{"id":822,"type":5},"time":"331489052","type":126},
Run Code Online (Sandbox Code Playgroud)
如果您需要查看更多日志,我已在此处发布了整个日志
我在公司笔记本电脑中使用Ubuntu VM进行工作,该VM使用代理服务器连接到Internet。经过一些研究,我发现了如何使用pip install代理安装模块。例如,使用以下命令,我可以安装我的virtualenv模块:
sudo pip install --proxy=http://user:pass@<proxy_address>:<portnumber> virtualenv
Run Code Online (Sandbox Code Playgroud)
但是,在创建虚拟环境文件夹之后,将其激活,然后使用以下pip命令安装模块:
pip install --proxy=http://user:pass@<proxy_address>:<portnumber> pyperclip
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/pyperclip/
Run Code Online (Sandbox Code Playgroud)
如果使用sudo,则pip可以下载并安装模块,但使用系统全局软件包而不是在我的虚拟环境中。在我看来,Ubuntu及其代理设置中存在权限问题。
如何解决此问题,以便可以在virtualenv中本地安装模块?
谢谢
我在我的代码中使用代理并获得身份验证挑战.但在"didReceiveChallenge"被调用之前,我正在获得警报,如下图所示
.如果我在警报上单击"取消",则调用"didReceiveChallenge".
let url = NSURL(string: "http://www.google.com")
let request = NSURLRequest(URL: url!)
let config = NSURLSessionConfiguration.ephemeralSessionConfiguration()
let proxyDict:[String:AnyObject] = [kCFNetworkProxiesHTTPEnable as String: true,
hostKey as String:proxy_server,
portKey as String: proxy_port,
userNameKey as String:userName,
passwordKey as String:password]
config.connectionProxyDictionary = proxyDict as [NSObject : AnyObject]
let session = NSURLSession(configuration: config, delegate: self, delegateQueue: NSOperationQueue.mainQueue())
let task = session.dataTaskWithRequest(request, completionHandler: {(data, response, error) in
print(data)
print(error)
print(response)
});
task.resume()
func URLSession(session: NSURLSession, didReceiveChallenge challenge: NSURLAuthenticationChallenge, completionHandler: (NSURLSessionAuthChallengeDisposition, NSURLCredential?) -> Void) {
let credential …Run Code Online (Sandbox Code Playgroud) 我有以下代码。还有一个返回字符串数组的 web api,
const express = require('express');
const proxy = require('express-http-proxy');
var app = express();
app.use('/proxy', proxy('http://localhost:56660/api/values'));
app.listen(3000);
Run Code Online (Sandbox Code Playgroud)
当我尝试执行 localhost:3000/proxy 时,我没有得到响应,但是当我使用 时app.use('/proxy', proxy('www.google.com'));,它会重定向到 google 网站。
请给我建议一个最佳方法/解决方案: 我想创建一个代理服务器,它从浏览器(应用程序)获取 url,修改 url,调用新 url 并将响应发送回浏览器(应用程序)。
proxy-server ×10
azure ×2
node.js ×2
c ×1
c# ×1
casperjs ×1
credentials ×1
express ×1
http ×1
http-proxy ×1
https ×1
ios ×1
javascript ×1
nginx ×1
nsurlsession ×1
phantomjs ×1
pip ×1
powershell ×1
python ×1
swift ×1
twitter ×1
ubuntu ×1
virtualenv ×1
webserver ×1