您尚未登录。

#1 2022-06-03 16:33:44

wuddy
会员
注册时间: 2022-06-03
帖子: 6

终端网络代理问题

我计划通过export http_proxy=xxx,实行终端代理,但是遇到了以下问题

~ ❯ curl -i google.com
HTTP/1.1 301 Moved Permanently
Content-Length: 219
Cache-Control: public, max-age=2592000
Connection: keep-alive
Content-Type: text/html; charset=UTF-8
Date: Fri, 03 Jun 2022 02:13:44 GMT
Expires: Sun, 03 Jul 2022 02:13:44 GMT
Keep-Alive: timeout=4
Location: http://www.google.com/
Proxy-Connection: keep-alive
Server: gws
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
grep proxy -i /etc/environment                                                                                           
export http_proxy="http://127.0.0.1:7890"
export https_proxy="http://127.0.0.1:7890"
export no_proxy="localhost, 127.0.0.1"

不知道问题,麻烦大家帮忙提点意见或建议。谢谢

离线

#2 2022-06-03 16:46:18

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,917
个人网站

Re: 终端网络代理问题

哪里有问题?google.com 访问过去是重定向啊。curl 加 -L 参数才会跟踪重定向的。

离线

#3 2022-06-03 17:11:29

wuddy
会员
注册时间: 2022-06-03
帖子: 6

Re: 终端网络代理问题

依云 说:

哪里有问题?google.com 访问过去是重定向啊。curl 加 -L 参数才会跟踪重定向的。

感谢答复

不太懂。
但是执行-L,结果也很奇怪,也不能ping通(在网页上能正常代理、访问)

curl -L google.com                                                                             ✔ 
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="zh-HK"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/logos/doodles/2022/dragon-boat-festival-2022-6753651837109429-law.gif" itemprop="image"><meta content="&#31471;&#21320;&#31680; 2022" property="twitter:title"><meta content="&#31471;&#21320;&#31680;&#24555;&#27138;! #GoogleDoodle" property="twitter:description"><meta content="&#31471;&#21320;&#31680;&#24555;&#27138;! #GoogleDoodle" property="og:description"><meta content="summary_large_image" property="twitter:card"><meta content="@GoogleDoodles" property="twitter:site"><meta content="https://www.google.com/logos/doodles/2022/dragon-boat-festival-2022-6753651837109429-2xa.gif" property="twitter:image"><meta content="https://www.google.com/logos/doodles/2022/dragon-boat-festival-2022-6753651837109429-2xa.gif" property="og:image"><meta content="920" property="og:image:width"><meta content="420" property="og:image:height"><meta content="https://www.google.com/logos/doodles/2022/dragon-boat-festival-2022-6753651837109429-2xa.gif" property="og:url"><meta content="video.other" property="og:type"><title>Google</title><script nonce="QZDhkU0_LIIwkVBVszWs0Q">(function(){window.google={kEI:'jM-ZYt2DDY6C0wSy8JOoBw',kEXPI:'0,1302536,56873,6058,207,4804,2316,383,246,5,1354,4013,1123753,1197710,380780,16115,28684,17572,4858,1362,283,9007,3024,2820,1931,12834,4998,13228,3847,10622,7432,14681,628,5081,1593,1279,2742,149,1103,840,6297,108,3406,606,2023,1777,520,14670,3227,2845,7,5599,11851,8101,8221,1849,2614,3784,9358,3,576,6460,148,13975,4,1528,2304,32112,2658,7356,13659,13795,7428,5815,2542,4094,4052,3,3541,1,42154,2,14022,6248,7868,11623,5679,1021,2380,2719,18278,2,6,7736,4568,6259,23418,1246,5841,14968,4332,12,6077,1395,445,2,2,1,10790,13836,2006,7701,454,2566,3835,181,799,3042,11638,2162,5179,3421,2,6,12955,770,4936,3466,53,554,24,6316,547,544,347,2050,2,351,5333,210,3406,1974,830,5775,3085,975,989,610,220,22,2515,29,40,382,1105,1944,1225,1481,380,1060,2,1077,235,1612,90,45,1,960,32,1268,2259,282,268,621,70,2,46,419,1155,218,2,4612,1347,5406238,3446,13,8799791,3311,141,795,19735,1,303,44,120,23650588,299776,4042143,4899,159,1358,10977,139,1104,2556,850,936900',kBL:'G5Qq'};google.sn='webhp';google.kHL='zh-HK';})();(function(){
var f=this||self;var h,k=[];function l(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||h}function m(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b}
function n(a,b,c,d,g){var e="";c||-1!==b.search("&ei=")||(e="&ei="+l(d),-1===b.search("&lei=")&&(d=m(d))&&(e+="&lei="+d));d="";!c&&f._cshid&&-1===b.search("&cshid=")&&"slh"!==a&&(d="&cshid="+f._cshid);c=c||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+"&zx="+Date.now()+d;/^http:/i.test(c)&&"https:"===window.location.protocol&&(google.ml&&google.ml(Error("a"),!1,{src:c,glmm:1}),c="");return c};h=google.kEI;google.getEI=l;google.getLEI=m;google.ml=function(){return null};google.log=function(a,b,c,d,g){if(c=n(a,b,c,d,g)){a=new Image;var e=k.length;k[e]=a;a.onerror=a.onload=a.onabort=function(){delete k[e]};a.src=c}};google.logUrl=n;}).call(this);(function(){
google.y={};google.sy=[];google.x=function(a,b){if(a)var c=a.id;else{do c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.sx=function(a){google.sy.push(a)};google.lm=[];google.plm=function(a){google.lm.push.apply(google.lm,a)};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};google.bx=!1;google.lx=function(){};}).call(this);google.f={};(function(){
document.documentElement.addEventListener("submit",function(b){var a;if(a=b.target){var c=a.getAttribute("data-submitfalse");a="1"===c||"q"===c&&!a.elements.q.value?!0:!1}else a=!1;a&&(b.preventDefault(),b.stopPropagation())},!0);document.documentElement.addEventListener("click",function(b){var a;a:{for(a=b.target;a&&a!==document.documentElement;a=a.parentElement)if("A"===a.tagName){a="1"===a.getAttribute("data-nohref");break a}a=!1}a&&b.preventDefault()},!0);}).call(this);</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important}
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}.h{color:#1558d6}em{color:#c5221f;font-style:normal;font-weight:normal}a em{text-decoration:underline}.lst{height:25px;width:496px}.gsfi,.lst{font:18px arial,sans-serif}.gsfs{font:17px arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0 4px;margin-left:4px}input{font-family:inherit}body{background:#fff;color:#000}a{color:#4b11a8;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#1558d6}a:visited{color:#4b11a8}.sblc{padding-top:5px}.sblc a{display:block;margin:2px 0;margin-left:13px;font-size:11px}.lsbb{background:#f8f9fa;border:solid 1px;border-color:#dadce0 #70757a #70757a #dadce0;height:30px}.lsbb{display:block}#WqQANb a{display:inline-block;margin:0 12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#dadce0}.lst:focus{outline:none}</style><script nonce="QZDhkU0_LIIwkVBVszWs0Q">(function(){window.google.erd={jsr:1,bv:1592,de:true};
var f=this||self;var g,h=null!=(g=f.mei)?g:1,m,n=null!=(m=f.sdo)?m:!0,p=0,q,r=google.erd,u=r.jsr;google.ml=function(a,b,d,k,c){c=void 0===c?2:c;b&&(q=a&&a.message);if(google.dl)return google.dl(a,c,d),null;if(0>u){window.console&&console.error(a,d);if(-2===u)throw a;b=!1}else b=!a||!a.message||"Error loading script"===a.message||p>=h&&!k?!1:!0;if(!b)return null;p++;d=d||{};var e=c;c=encodeURIComponent;b="/gen_204?atyp=i&ei="+c(google.kEI);google.kEXPI&&(b+="&jexpid="+c(google.kEXPI));b+="&srcpg="+c(google.sn)+"&jsr="+c(r.jsr)+"&bver="+c(r.bv)+("&jsel="+e);e=a.lineNumber;void 0!==e&&(b+="&line="+
e);var l=a.fileName;l&&(b+="&script="+c(l),e&&l===window.location.href&&(e=document.documentElement.outerHTML.split("\n")[e],b+="&cad="+c(e?e.substring(0,300):"No script found.")));for(var t in d)b+="&",b+=c(t),b+="=",b+=c(d[t]);b=b+"&emsg="+c(a.name+": "+a.message);b=b+"&jsst="+c(a.stack||"N/A");12288<=b.length&&(b=b.substr(0,12288));a=b;k||google.log(0,"",a);return a};window.onerror=function(a,b,d,k,c){q!==a&&(a=c instanceof Error?c:Error(a),void 0===d||"lineNumber"in a||(a.lineNumber=d),void 0===b||"fileName"in a||(a.fileName=b),google.ml(a,!1,void 0,!1,"SyntaxError"===a.name||"SyntaxError"===a.message.substring(0,11)?2:0));q=null;n&&p>=h&&(window.onerror=null)};})();</script></head><body bgcolor="#fff"><script nonce="QZDhkU0_LIIwkVBVszWs0Q">(function(){var src='/images/nav_logo229.png';var iesg=false;document.body.onload = function(){window.n && window.n();if (document.images){new Image().src=src;}
if (!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><div id="mngb"><div id=gbar><nobr><b class=gb1>&#25628;&#23563;</b> <a class=gb1 href="http://www.google.com.hk/imghp?hl=zh-TW&tab=wi">&#22294;&#29255;</a> <a class=gb1 href="http://maps.google.com.hk/maps?hl=zh-TW&tab=wl">&#22320;&#22294;</a> <a class=gb1 href="https://play.google.com/?hl=zh-TW&tab=w8">Play</a> <a class=gb1 href="http://www.youtube.com/?gl=HK&tab=w1">YouTube</a> <a class=gb1 href="https://news.google.com/?tab=wn">&#26032;&#32862;</a> <a class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=wo">&#38642;&#31471;&#30828;&#30879;</a> <a class=gb1 style="text-decoration:none" href="https://www.google.com.hk/intl/zh-TW/about/products?tab=wh"><u>&#26356;&#22810;</u> &raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.com.hk/history/optout?hl=zh-TW" class=gb4>&#32178;&#38913;&#35352;&#37636;</a> | <a  href="/preferences?hl=zh-TW" class=gb4>&#35373;&#23450;</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=zh-TW&passive=true&continue=http://www.google.com/&ec=GAZAAQ" class=gb4>&#30331;&#20837;</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div></div><center><br clear="all" id="lgpd"><div id="lga"><a href="/search?ie=UTF-8&amp;q=%E7%AB%AF%E5%8D%88%E7%AF%80&amp;oi=ddle&amp;ct=207425454&amp;hl=zh-HK&amp;sa=X&amp;ved=0ahUKEwjd-bS595D4AhUOwZQKHTL4BHUQPQgD"><img alt="&#31471;&#21320;&#31680; 2022" border="0" height="210" src="/logos/doodles/2022/dragon-boat-festival-2022-6753651837109429-law.gif" title="&#31471;&#21320;&#31680; 2022" width="460" id="hplogo"><br></a><br></div><form action="/search" name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td width="25%">&nbsp;</td><td align="center" nowrap=""><input name="ie" value="ISO-8859-1" type="hidden"><input value="zh-HK" name="hl" type="hidden"><input name="source" type="hidden" value="hp"><input name="biw" type="hidden"><input name="bih" type="hidden"><div class="ds" style="height:32px;margin:4px 0"><input class="lst" style="margin:0;padding:5px 8px 0 6px;vertical-align:top;color:#000" autocomplete="off" value="" title="Google &#25628;&#23563;" maxlength="2048" name="q" size="57"></div><br style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb" value="Google &#25628;&#23563;" name="btnG" type="submit"></span></span><span class="ds"><span class="lsbb"><input class="lsb" id="tsuid1" value="&#22909;&#25163;&#27683;" name="btnI" type="submit"><script nonce="QZDhkU0_LIIwkVBVszWs0Q">(function(){var id='tsuid1';document.getElementById(id).onclick = function(){if (this.form.q.value){this.checked = 1;if (this.form.iflsig)this.form.iflsig.disabled = false;}
else top.location='/doodles/';};})();</script><input value="AJiK0e8AAAAAYpndnBe1U4DtTZzRq2EqOTWhGfoCHmXU" name="iflsig" type="hidden"></span></span></td><td class="fl sblc" align="left" nowrap="" width="25%"><a href="/advanced_search?hl=zh-HK&amp;authuser=0">&#36914;&#38542;&#25628;&#23563;</a></td></tr></table><input id="gbv" name="gbv" type="hidden" value="1"><script nonce="QZDhkU0_LIIwkVBVszWs0Q">(function(){
var a,b="1";if(document&&document.getElementById)if("undefined"!=typeof XMLHttpRequest)b="2";else if("undefined"!=typeof ActiveXObject){var c,d,e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];for(c=0;d=e[c++];)try{new ActiveXObject(d),b="2"}catch(h){}}a=b;if("2"==a&&-1==location.search.indexOf("&gbv=2")){var f=google.gbvu,g=document.getElementById("gbv");g&&(g.value=a);f&&window.setTimeout(function(){location.href=f},0)};}).call(this);</script></form><div id="gac_scont"></div><div style="font-size:83%;min-height:3.5em"><br><div id="prm"><style>.szppmdbYutt__middle-slot-promo{font-size:small;margin-bottom:32px}.szppmdbYutt__middle-slot-promo a.ZIeIlb{display:inline-block;text-decoration:none}.szppmdbYutt__middle-slot-promo img{border:none;margin-right:5px;vertical-align:middle}</style><div class="szppmdbYutt__middle-slot-promo" data-ved="0ahUKEwjd-bS595D4AhUOwZQKHTL4BHUQnIcBCAQ"><a class="NKcBbd" href="https://www.google.com/url?q=https://artsandculture.google.com/story/CwVxwG2VdR6NLw%3Fhl%3Dzh-TW%26utm_source%3Dgoogle%26utm_medium%3Dhppromo%26utm_campaign%3Ddragonboatfestival&amp;source=hpp&amp;id=19029640&amp;ct=3&amp;usg=AOvVaw23PANZVH-FoRybsNppWFWx&amp;sa=X&amp;ved=0ahUKEwjd-bS595D4AhUOwZQKHTL4BHUQ8IcBCAU" rel="nofollow">&#31471;&#21320;&#31680;&#30340;&#27511;&#21490;&#21644;&#20659;&#35498;</a></div></div><div id="gws-output-pages-elements-homepage_additional_languages__als"><style>#gws-output-pages-elements-homepage_additional_languages__als{font-size:small;margin-bottom:24px}#SIvCob{color:#3c4043;display:inline-block;line-height:28px;}#SIvCob a{padding:0 3px;}.H6sW5{display:inline-block;margin:0 2px;white-space:nowrap}.z4hgWe{display:inline-block;margin:0 2px}</style><div id="SIvCob">Google &#36879;&#36942;&#20197;&#19979;&#35486;&#35328;&#25552;&#20379;&#65306;  <a href="http://www.google.com/setprefs?sig=0_roeYOdy82ibuv98eKaaNwwZXuxE%3D&amp;hl=zh-CN&amp;source=homepage&amp;sa=X&amp;ved=0ahUKEwjd-bS595D4AhUOwZQKHTL4BHUQ2ZgBCAc">&#20013;&#25991;(&#31616;&#20307;)</a>    <a href="http://www.google.com/setprefs?sig=0_roeYOdy82ibuv98eKaaNwwZXuxE%3D&amp;hl=en&amp;source=homepage&amp;sa=X&amp;ved=0ahUKEwjd-bS595D4AhUOwZQKHTL4BHUQ2ZgBCAg">English</a>  </div></div></div><span id="footer"><div style="font-size:10pt"><div style="margin:19px auto;text-align:center" id="WqQANb"><a href="/intl/zh-TW/about.html">&#38364;&#26044; Google</a><a href="http://www.google.com/setprefdomain?prefdom=HK&amp;prev=http://www.google.com.hk/&amp;sig=K_B_AtLaYNJe_pc1kRbWqconDuG_s%3D">Google.com.hk</a></div></div><p style="font-size:8pt;color:#70757a">&copy; 2022 - <a href="/intl/zh-TW/policies/privacy/">&#31169;&#38577;&#27402;&#25919;&#31574;</a> - <a href="/intl/zh-TW/policies/terms/">&#26781;&#27454;</a></p></span></center><script nonce="QZDhkU0_LIIwkVBVszWs0Q">(function(){window.google.cdo={height:757,width:1440};(function(){
var a=window.innerWidth,b=window.innerHeight;if(!a||!b){var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();</script> <script nonce="QZDhkU0_LIIwkVBVszWs0Q">(function(){google.xjs={ck:'',cs:'',excm:[]};})();</script>  <script nonce="QZDhkU0_LIIwkVBVszWs0Q">(function(){var u='/xjs/_/js/k\x3dxjs.hp.en.4PMoMJNH9MA.O/am\x3dAOAJAEACkA/d\x3d1/ed\x3d1/rs\x3dACT90oH91rjhecWgqdld5p_nobaMZUv9Sg/m\x3dsb_he,d';
var d=this||self,e=function(a){return a};
var g;var l=function(a,b){this.g=b===h?a:""};l.prototype.toString=function(){return this.g+""};var h={};function n(){var a=u;google.lx=function(){p(a);google.lx=function(){}};google.bx||google.lx()}
function p(a){google.timers&&google.timers.load&&google.tick&&google.tick("load","xjsls");var b=document;var c="SCRIPT";"application/xhtml+xml"===b.contentType&&(c=c.toLowerCase());c=b.createElement(c);if(void 0===g){b=null;var k=d.trustedTypes;if(k&&k.createPolicy){try{b=k.createPolicy("goog#html",{createHTML:e,createScript:e,createScriptURL:e})}catch(q){d.console&&d.console.error(q.message)}g=b}else g=b}a=(b=g)?b.createScriptURL(a):a;a=new l(a,h);c.src=a instanceof l&&a.constructor===l?a.g:"type_error:TrustedResourceUrl";var f,m;(f=(a=null==(m=(f=(c.ownerDocument&&c.ownerDocument.defaultView||window).document).querySelector)?void 0:m.call(f,"script[nonce]"))?a.nonce||a.getAttribute("nonce")||"":"")&&c.setAttribute("nonce",f);document.body.appendChild(c);google.psa=!0};google.xjsu=u;setTimeout(function(){n()},0);})();function _DumpException(e){throw e;}
function _F_installCss(c){}
(function(){google.jl={attn:false,blt:'none',chnk:0,dw:false,dwu:true,emtn:0,end:0,ine:false,injs:'none',injt:0,injth:0,injv2:false,lls:'default',pdt:0,rep:0,snet:true,strt:0,ubm:false,uwp:true};})();(function(){var pmc='{\x22d\x22:{},\x22sb_he\x22:{\x22agen\x22:true,\x22cgen\x22:true,\x22client\x22:\x22heirloom-hp\x22,\x22dh\x22:true,\x22dhqt\x22:true,\x22ds\x22:\x22\x22,\x22ffql\x22:\x22zh-TW\x22,\x22fl\x22:true,\x22host\x22:\x22google.com\x22,\x22isbh\x22:28,\x22msgs\x22:{\x22cibl\x22:\x22&#28165;&#38500;&#25628;&#23563;\x22,\x22dym\x22:\x22&#20320;&#26159;&#19981;&#26159;&#35201;&#26597;&#65306;\x22,\x22lcky\x22:\x22&#22909;&#25163;&#27683;\x22,\x22lml\x22:\x22&#30637;&#35299;&#35443;&#24773;\x22,\x22oskt\x22:\x22&#36664;&#20837;&#24037;&#20855;\x22,\x22psrc\x22:\x22&#24050;&#24478;&#24744;&#30340;&#12300;\\u003Ca href\x3d\\\x22/history\\\x22\\u003E&#32178;&#38913;&#35352;&#37636;\\u003C/a\\u003E&#12301;&#20013;&#31227;&#38500;&#36889;&#31558;&#25628;&#23563;&#35352;&#37636;\x22,\x22psrl\x22:\x22&#31227;&#38500;\x2

离线

#4 2022-06-03 18:39:26

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,917
个人网站

Re: 终端网络代理问题

结果非常正常啊。 http 代理只支持 http 和 https(有些也能代理别的 tcp 协议),但没有支持 icmp 的。ping 使用 icmp 协议,所以不走代理。

离线

#5 2022-06-03 19:14:36

wuddy
会员
注册时间: 2022-06-03
帖子: 6

Re: 终端网络代理问题

依云 说:

结果非常正常啊。 http 代理只支持 http 和 https(有些也能代理别的 tcp 协议),但没有支持 icmp 的。ping 使用 icmp 协议,所以不走代理。

谢谢答复。

我一直以为能够ping通才算是代理成功了;但是现在一直ping不通(之前我记得可以)

还有就是 `url www.google.com` 结果很奇怪(像是一个intermediate page ),我也不知道到底成功没?

然后check了一下如何衡量终端代理是否成功的方法;用wget;结果显示代理正常

wget google.com                                                                                ✔ 
--2022-06-03 19:11:09--  [url]http://google.com/[/url]
Connecting to 127.0.0.1:7890... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: [url]http://www.google.com/[/url] [following]
--2022-06-03 19:11:09--  [url]http://www.google.com/[/url]
Reusing existing connection to 127.0.0.1:7890.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html.7’

index.html.7                    [ <=>                                      ]  16.48K  --.-KB/s    in 0s      

2022-06-03 19:11:09 (67.9 MB/s) - ‘index.html.7’ saved [16875]

最后,所以ping一定是不成功的吗?(我印象里是可以ping通的)

最近编辑记录 wuddy (2022-06-03 19:16:20)

离线

#6 2022-06-03 19:19:13

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,917
个人网站

Re: 终端网络代理问题

HTTP 代理一定不支持 ping 命令的。要支持 ping 命令,你需要使用(真正的)VPN(比如 OpenVPN、PPTP、L2TP)。

你有兴趣可以找本网络教科书了解一下。

离线

#7 2022-06-03 19:25:19

wuddy
会员
注册时间: 2022-06-03
帖子: 6

Re: 终端网络代理问题

依云 说:

HTTP 代理一定不支持 ping 命令的。要支持 ping 命令,你需要使用(真正的)VPN(比如 OpenVPN、PPTP、L2TP)。

你有兴趣可以找本网络教科书了解一下。

好的,感觉确实需要慢慢了解一下。刚刚使用manjaro,甚至对linux都不太熟,感觉到了什么都可以动的自由,也感觉到了什么都不敢动的慎微。

再次感谢您的答复。

祝好!

离线

页脚