无法在命令 line/powershell windows 7 中 ping 任何站点
unable to ping any sites in command line/powershell windows 7
windows 命令行是否需要任何代理设置才能 ping 网站?
我可以在我的浏览器中访问所有网站,但是当我尝试从命令行或 powershell ping 同一个网站时,我收到 "Request timed out" 错误。如何解决这个错误?
我在IE浏览器中设置了自动代理检测脚本,因为网络是公司局域网。尝试了网络中提供的大多数解决方案,但没有任何运气。
因此我无法 运行 厨师命令安装 gems 并收到错误 Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT:
A connection attempt failed because the connected party did not properly respon
d after a period of time, or established connection failed because connected hos
t has failed to respond. - connect(2) for "api.rubygems.org" port 443 (https://a
pi.rubygems.org/specs.4.8.gz)
获得 ping 回复或 HTTP 响应是完全不同的两件事。也就是说,任何服务器都可以随心所欲地尊重其中任何一个。此外,路由上可能存在更改结果的代理和防火墙。即使服务器愿意响应 ping,企业防火墙也可能会阻止它。
通过环境变量设置 Chef 的代理设置,您可能会取得一些成功,as per documentation. As how to find out the proxy settings, ask your network admin. If that doesn't work, retrieve the proxy settings from IE's registry key。如果 link rot,函数如下:
function Get-InternetProxy {
<#
.SYNOPSIS
Determine the internet proxy address
.DESCRIPTION
This function allows you to determine the the internet proxy address used by your computer
.EXAMPLE
Get-InternetProxy
.Notes
Author : Antoine DELRUE
WebSite: http://obilan.be
#>
$proxies = (Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings').proxyServer
if ($proxies) {
if ($proxies -ilike "*=*") {
$proxies -replace "=","://" -split(';') | Select-Object -First 1
} else {
"http://" + $proxies
}
}
}
windows 命令行是否需要任何代理设置才能 ping 网站?
我可以在我的浏览器中访问所有网站,但是当我尝试从命令行或 powershell ping 同一个网站时,我收到 "Request timed out" 错误。如何解决这个错误?
我在IE浏览器中设置了自动代理检测脚本,因为网络是公司局域网。尝试了网络中提供的大多数解决方案,但没有任何运气。
因此我无法 运行 厨师命令安装 gems 并收到错误 Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT:
A connection attempt failed because the connected party did not properly respon
d after a period of time, or established connection failed because connected hos
t has failed to respond. - connect(2) for "api.rubygems.org" port 443 (https://a
pi.rubygems.org/specs.4.8.gz)
获得 ping 回复或 HTTP 响应是完全不同的两件事。也就是说,任何服务器都可以随心所欲地尊重其中任何一个。此外,路由上可能存在更改结果的代理和防火墙。即使服务器愿意响应 ping,企业防火墙也可能会阻止它。
通过环境变量设置 Chef 的代理设置,您可能会取得一些成功,as per documentation. As how to find out the proxy settings, ask your network admin. If that doesn't work, retrieve the proxy settings from IE's registry key。如果 link rot,函数如下:
function Get-InternetProxy {
<#
.SYNOPSIS
Determine the internet proxy address
.DESCRIPTION
This function allows you to determine the the internet proxy address used by your computer
.EXAMPLE
Get-InternetProxy
.Notes
Author : Antoine DELRUE
WebSite: http://obilan.be
#>
$proxies = (Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings').proxyServer
if ($proxies) {
if ($proxies -ilike "*=*") {
$proxies -replace "=","://" -split(';') | Select-Object -First 1
} else {
"http://" + $proxies
}
}
}