logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

connect-proxy — connect over SOCKS4/5 proxy

Author

       This  manual  page  was  written  by Philippe Coval rzr@gna.org for the Debian system (but may be used by
       others).  Permission is granted to copy, distribute and/or modify this document under the  terms  of  the
       GNU General Public License, Version 2 any later version published by the Free Software Foundation.

       On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-
       licenses/GPL.

                                                                                                CONNECT-PROXY(1)

Description

connect-proxy open connection over SOCKS4/5 proxies

       Please, note that any HTTP-Proxy tunnel won't work with content-inspection firewall (unless using SSL).

Environment

       SOCKS5_USER, SOCKS5_PASSWORD, HTTP_PROXY_USER, HTTP_PROXY_PASSWORD, CONNECT_PASSWORD, LOGNAME, USER

Name

       connect-proxy — connect over SOCKS4/5 proxy

Options

-H        specifies a hostname and port number of the http proxy server to relay. If port is omitted,  80
                 is  used.  You  can  specify  this value in the environment variable HTTP_PROXY and pass the -h
                 option to use it.

       -S        specifies the hostname and port number of the SOCKS server to relay.  Like -H, port number  can
                 be  omitted  and  the  default is 1080. You can also specify this value pair in the environment
                 variable SOCKS5_SERVER and give the -s option to use it.

       -4        specifies SOCKS relaying and indicates protocol version to use.  It is  valid  only  when  used
                 with '-s' or '-S'.  Default is '-5' (protocol version 5)

       -R        method  to  resolve the hostname. Three keywords ("local", "remote", "both") or dot-notation IP
                 address are acceptable.  The keyword "both" means, "Try local first, then remote".  If  a  dot-
                 notation  IP  address  is  specified,  use this host as nameserver. The default is "remote" for
                 SOCKS5 or "local" for others. On SOCKS4 protocol, remote resolving method ("remote" and "both")
                 requires protocol 4a supported server.

       -p        will forward a local TCP port instead of using the standard input and output.

       -P        same to '-p' except keep remote session. The program repeats  waiting  the  port  with  holding
                 remote  session without disconnecting. To connect the remote session, send EOF to stdin or kill
                 the program.

       -w        timeout in seconds for making connection with TARGET host.

       -d        used for debug. If you fail to connect, use this and check request to and response from server.

See Also

       ssh (1).

Synopsis

connect-proxy  [-dnhst45]  [-Rresolve][-plocal-port][-wsecs][-H[user@]proxy-server[:port]]][-S[user@]socks-server[:port]]][-Tproxy-server[:port]][-ctelnet-proxy-command][host][port]

Usage

       To use proxy, this example is for SOCKS5 connection to connect to "host" at port 25 via SOCKS5 server  on
       "firewall" host.

       connect-proxy-Sfirewallhost25SOCKS5_SERVER=firewall;exportSOCKS5_SERVER;connect-proxy-shost25

       For a HTTP-PROXY connection:

       connect-proxy-Hproxy-server:8080host25HTTP_PROXY=proxy-server:8080;exportHTTP_PROXY;connect-proxy-hhost25

       To forward a local port, for example to use ssh:

       connect-proxy-p5550-Hproxy-server:8080host22ssh-luser

       To use it along ssh transparently:

       # file://~/.ssh/config
       # not using proxy on lan
       Host 192.*
       ProxyCommand connect-proxy %h %p
       # mandatory to access the internet
       Host *
       ProxyCommand connect-proxy -H proxyserver:8080  %h %p

       Or for all users ( /etc/ssh/ssh_config )

Www

See Also