CONNECT-PROXY(1)

πŸ“¦
version 1.105 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’… CONNECT-PROXY πŸ’…

okay bestie, welcome to the connect-proxy page from the General Commands Manual β€” yes it's a section 1 command, she's a real one, and she's about to carry your whole networking life πŸ’–


✨ NAME ✨

connect-proxy β€” connect over SOCKS4/5 proxy. that's the whole vibe. she connects. through proxies. iconic. πŸ¦‹


✨ SYNOPSIS ✨

connect-proxy [-dnhst45]  [-R resolve ]  [-p local-port ]  [-w secs ]
[-H [user@]proxy-server[:port]] ]  [-S [user@]socks-server[:port]] ]
[-T proxy-server[:port] ]  [-c telnet-proxy-command ]  [host]  [port]

(yes there's a lot of brackets in there, no we are not editing them, that's canon πŸ’€)


✨ DESCRIPTION ✨

so connect-proxy opens a connection over SOCKS4/5 proxies. that's her job. she's employed. πŸ’…

heads up bestie: any HTTP-Proxy tunnel won't work with a content-inspection firewall (unless you're using SSL). like, it's not gonna happen. no cap. 😭

✨ OPTIONS ✨

  • -H β€” tells her the hostname and port number of the http proxy server to relay through. if you skip the port, 80 gets used. you can also put this value in the environment variable HTTP_PROXY and then pass the -h option to use it. lowkey convenient. ✨
  • -S β€” specifies the hostname and port number of the SOCKS server to relay through. just like -H, the port number can be omitted, and the default here is 1080. you can also drop this value pair in the environment variable SOCKS5_SERVER and hand her the -s option to use it. 🫢
  • -4 β€” specifies SOCKS relaying and tells her which protocol version to use. it's only valid when you use it with '-s' or '-S'. the default is '-5' (protocol version 5). so -4 is the "fine, we're doing it old school" button. πŸ‘‘
  • -R β€” the method for resolving the hostname. three keywords β€” "local", "remote", "both" β€” or a dot-notation IP address are all acceptable. the keyword "both" means "Try local first, then remote". if you hand her a dot-notation IP address, she uses that host as the nameserver. the default is "remote" for SOCKS5, or "local" for others. and on the SOCKS4 protocol, the remote resolving method ("remote" and "both") requires a server that supports protocol 4a. fr fr, check your server first. 🌈
  • -p β€” she'll forward a local TCP port instead of using the standard input and output. main character move tbh. πŸ’–
  • -P β€” same as '-p' except she keeps the remote session. the program repeats waiting on the port while holding the remote session, without disconnecting. to connect the remote session, send EOF to stdin or kill the program. 😭 (dramatic but true)
  • -w β€” timeout in seconds for making the connection with the TARGET host. she's not gonna wait forever bestie, she has a life. ⏳
  • -d β€” used for debug. if you fail to connect, use this one and check the request to and the response from the server. it's giving detective energy πŸ”

✨ USAGE ✨

to use a proxy β€” this example is for a SOCKS5 connection to connect to "host" at port 25 via a SOCKS5 server on the "firewall" host:

connect-proxy -S firewall host 25
SOCKS5_SERVER=firewall; export SOCKS5_SERVER; connect-proxy -s host 25

for a HTTP-PROXY connection:

connect-proxy -H proxy-server:8080  host 25
HTTP_PROXY=proxy-server:8080; export HTTP_PROXY; connect-proxy -h host 25

to forward a local port β€” for example, to use ssh:

connect-proxy -p 5550 -H proxy-server:8080 host 22 ssh -l user

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, that's /etc/ssh/ssh_config πŸ’…


✨ ENVIRONMENT ✨

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

that's the whole roster, she reads them all, they're her little helpers 🧚


✨ SEE ALSO ✨

ssh (1).

like obviously. they're besties. 🫢


✨ WWW ✨

http://www.meadowy.org/~gotoh/projects/connect

go visit her website, she'd love that 🌸


✨ AUTHOR ✨

this manual page was written by Philippe Coval rzr@gna.org for the Debian system (but it may be used by others, she's generous like that πŸ’œ). 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. πŸ“œ


and that's the whole page bestie β€” CONNECT-PROXY(1), section 1 of the General Commands Manual, and the footer is just her name again because she's the main character. slay, go connect to something. periodt. πŸ’…βœ¨πŸŽ€