PHP SOCKS5 Agent

Source: Internet
Author: User
Bought Alfred Powerpack, but could not use Alfredtweet plugin tweet.
I use ssh-d to turn over the wall, no VPN.
I looked at the source code of the plugin, I would like to use the PHP Curl module SOCKS5 to go over the wall. In theory the scheme is feasible, but it has been uncertain.
My approach is to:

1):   ssh-qtfnn-d 7070 username@host 2):   curl_setopt ($ci, Curlopt_httpproxytunnel, TRUE);   curl_setopt ($ci, Curlopt_proxy, ' 127.0.0.1:7070 ');   curl_setopt ($ci, Curlopt_proxytype, CURLPROXY_SOCKS5);   curl_setopt ($ci, Curlopt_url, $url);   $response = curl_exec ($CI);

Is it OK to write like this? Why can't I keep it up?

Reply content:

Bought Alfred Powerpack, but could not use Alfredtweet plugin tweet.
I use ssh-d to turn over the wall, no VPN.
I looked at the source code of the plugin, I would like to use the PHP Curl module SOCKS5 to go over the wall. In theory the scheme is feasible, but it has been uncertain.
My approach is to:

1):   ssh-qtfnn-d 7070 username@host 2):   curl_setopt ($ci, Curlopt_httpproxytunnel, TRUE);   curl_setopt ($ci, Curlopt_proxy, ' 127.0.0.1:7070 ');   curl_setopt ($ci, Curlopt_proxytype, CURLPROXY_SOCKS5);   curl_setopt ($ci, Curlopt_url, $url);   $response = curl_exec ($CI);

Is it OK to write like this? Why can't I keep it up?

ssh-cfng-d 127.0.0.1:7070 Username@host
                                         

Curl_error See what the error message is.

$response = Curl_exe ($ch); $error = Curl_error ($ch); Curl_close ($ch); Var_dump ($error);

* About-to-connect () to proxy 127.0.0.1 Port 7070 (#0) *   Trying 127.0.0.1 ... * connected* Failed to receive SOCKS5 conn ECT request ack.* Closing connection #0bool (FALSE)
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.