CORKSCREW(1)

πŸ“¦
version 2.0_git20190118 Β· 5 versions
, in alpine 3.24, fedora 43, fedora 44

πŸ’« CORKSCREW(1) β€” General Commands Manual πŸ’«

okay bestie, gather round, because this little icon of a tool is about to become your new fave. it's called corkscrew, it lives in the General Commands Manual section (that's section 1, the "commands you actually type" section, iykyk), and it's literally the key that pops your TCP connections through an HTTP proxy like a little bottle opener. hence the name. obsessed. 🍾✨


✨ NAME ✨

corkscrew β€” tunnel TCP connections through HTTP proxies πŸŒ€


🌸 SYNOPSIS 🌸

corkscrew proxy proxyport targethost targetport [ authfile ]

that's it. that's the whole vibe. four required little friends and one optional one. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this manual page documents briefly the corkscrew command. and here's the tea: this man page was written for the Debian distribution because the original program does not have a manual page. so bestie, we wrote one. you're welcome. 😌

corkscrew is a simple tool to tunnel TCP connections through an HTTP proxy supporting the CONNECT method. it reads stdin and writes to stdout during the connection, just like netcat. no cap. πŸ”₯

and what's it for? for instance, you can use it to connect to an SSH server running on a remote 443 port through a strict HTTPS proxy. yes, that 443. the port that makes firewalls say "oh, that's fine, that's just HTTPS." genius behaviour. main character energy fr fr. πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

  • proxy β€” the name of the host that's running the HTTP proxy. like, who's holding the door for you. πŸšͺ
  • proxyport β€” the port you connect to on the proxy.
  • target β€” the host you actually wanna reach, through the proxy.
  • targetport β€” the port you connect to on the target host.
ngl the SYNOPSIS calls the third one targethost and this section calls it target β€” that's just how it is, they're the same thing, don't stress. 🫢

πŸ’– COMMON USAGE πŸ’–

the common usage of corkscrew (and honestly the iconic usage) is to drop this line into your ssh_config:

ProxyCommand corkscrew proxy proxyport %h %p

and that's it. that will let your ssh connection go through the proxy with the help of corkscrew. set it and forget it, bestie. ssh just ✨works✨ now. 🌈


πŸ” AUTH FILE πŸ”

the auth file is made of one single line containing your username and password in the form:

username:password

one line. that's the whole file. don't get fancy with it. πŸ™ˆ

and you should add the path to your auth file in the proxy command described above:

ProxyCommand corkscrew proxy proxyport %h %p auth-file

so corkscrew can hand over your creds when the proxy asks, no manual typing required. slay. πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€


🌟 AUTHOR 🌟

corkscrew was written by Pat Padgett <agroman@agroman.net>. Thomas Seyrat <tomasera@debian.org> is the debian maintainer for this package. and this manual page was written by Laurent Fousse <laurent@komite.net>, for the Debian GNU/Linux system (but may be used by others). give them their flowers, they earned them. πŸ’


okay that's the whole page, and the cute sign-off is: this one comes from the General Commands Manual source, version vibes dated November 22, 2003 β€” vintage but still serving. periodt. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from