我有脚本来获取HTTP内容,我需要baypass代理(直接连接到网络服务器IP)。 是否有可能不更改Windows中的寄存器?此代码正在通过系统中定义的代理进行。 感谢您的建议powershell http不使用代理
此致敬意。
$url='https://10.10.10.10/check';
$webClient = new-object System.Net.WebClient;
$output = $webClient.DownloadString($url)
我有脚本来获取HTTP内容,我需要baypass代理(直接连接到网络服务器IP)。 是否有可能不更改Windows中的寄存器?此代码正在通过系统中定义的代理进行。 感谢您的建议powershell http不使用代理
此致敬意。
$url='https://10.10.10.10/check';
$webClient = new-object System.Net.WebClient;
$output = $webClient.DownloadString($url)
根据您的代理设置为空代理实例的documentation。试试这个:
$url = "https://10.10.10.10/check"
$webClient = New-Object System.Net.WebClient
$webClient.Proxy = [System.Net.GlobalProxySelection]::GetEmptyWebProxy()
$output = $webClient.DownloadString($url)
很好,这是工作!感谢帮助。最好的问候 – user1728814
我不能为我的生活弄清楚如何将C代码翻译成这种语法。非常感谢! – ssaviers
任何带有完整源代码示例的最终解决方案? – Kiquenet