简体   繁体   English

使用代理和通过代理隧道有什么区别

[英]What is the difference between USING A PROXY and TUNNELING THROUGH A PROXY

Is there any difference between USING A PROXY and TUNNELING THROUGH A PROXY 使用代理和通过代理隧道之间有什么区别

what effect does tunneling through a proxy has on the request, to be precise on Curl request 通过代理进行隧道传输会对请求产生什么影响,确切地说,对Curl请求

    $ch = curl_init();        
    curl_setopt($ch, CURLOPT_URL, $url);            
    curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
    if($use_tunnel == true){
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);                
    curl_setopt($ch, CURLOPT_PROXY, '180.180.94.251');                
    curl_setopt($ch, CURLOPT_PROXYPORT, '8080'); 
    }          
    curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
    //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);           
    //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
    curl_setopt($ch, CURLOPT_IPRESOLVE,CURL_IPRESOLVE_V4);
    curl_setopt($ch, CURLOPT_MAXREDIRS,10);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_COOKIESESSION, true);
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,180);
    curl_setopt($ch,CURLOPT_TIMEOUT,7200);
    $output = curl_exec($ch);

does it make a special difference or make the request more anonymous. 它有什么特别的区别还是使请求更加匿名?

please i need a more technical explanation, no matter how technical it is, please give me deep explanation 请我需要更多的技术说明,无论它的技术水平如何,请给我深刻的解释

Let's say the client wants to send a normal GET. 假设客户想要发送普通的GET。

"tunneling through" means issuing a CONNECT request to the proxy, which sets up a tunnel to the target host, and then the client sends the GET request through that tunnel to the target. “通过隧道”是指向代理发出CONNECT请求,该请求建立到目标主机的隧道,然后客户端通过该隧道向目标发送GET请求。 This is typically how clients do HTTPS over proxies to maintain peer to peer privacy and security. 客户端通常通过代理执行HTTPS来维护对等隐私和安全性。

When "just using" a proxy, the client sends the GET request to the proxy, which then under the hood contacts the remote host and performs the GET and returns the response back. 当“仅使用”代理时,客户端将GET请求发送到代理,然后代理在后台联系远程主机并执行GET并将响应返回。 In this setup, the client can take advantage of caching etc in the proxy but the proxy will also be able to spy on the traffic between the client and the remote host. 在这种设置中,客户端可以利用代理中的缓存等优势,但是代理也将能够监视客户端与远程主机之间的流量。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM