#tcp-connection #proxy #proxies #host #basic-authentication #http #kerberos

bin+lib hconnect

A tool to establish a TCP connection to a host behind a proxy

2 unstable releases

0.2.0 Dec 17, 2023
0.1.0 Mar 7, 2022

#3 in #proxies

36 downloads per month

Custom license

322 lines


hconnect can establish a TCP connection to a host behind a proxy. It is similar to corkscrew or nc -Xconnect -x..., but can authenticate against a proxy using the basic or negotiate via Kerberos (using the GSS-API Linux and macOS or SSPI on Windows) authorization method


The following command will establish a TCP connection with the host behind the proxy proxy.exmaple.com listening on port 8080. When the proxy responds with 407 Proxy Authentication Required, when the file ~/.netrc exists hconnect will consult it for an entry for the given post host. If no such entry can be found or the file does not exists, hconnect will try to generate a Kerberos token.

hconnect --proxy proxy.example.com:8080 %h:%p


Place the following fragment in your ~/.ssh/config file:

ProxyCommand hconnect --proxy proxy.example.com:8080 %h:%p


This source code is under the MIT license with the exceptions mentioned in "Third party source code in this repository".


~590K SLoC