Docker ProxyTunnel is a workaround image for MacOS SSH users
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Docker ProxyTunnel

Docker ProxyTunnel is a workaround image for MacOS SSH users

The problem

mac$ brew install proxytunnel
(proxytunnel installed)

mac$ ssh
Via ->
error: Socket write error.
ssh_exchange_identification: Connection closed by remote host

The solution

mac$ ./ $HOME/.ssh/proxyconfig/
Via ->'s password: ******
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-116-generic x86_64)

 * Documentation:
 * Management:
 * Support:

5 packages can be updated.
0 updates are security updates.

Last login: Tue Mar 20 13:52:35 2018 from
ubuntu$ logout
Connection to closed.


docker build -t descoped/proxytunnel .

This expects config file to be present in /proxytunnel.

Sample ProxyTunnel


   ProtocolKeepAlives 30
   ProxyCommand /usr/bin/proxytunnel -E -p -d %h:%p
docker run -it -v SSH_CONFIG=$HOME/.ssh/proxyconfig:/root/.ssh -e descoped/proxytunnel
./ `PWD`/proxytunnel

feature request

enable a simpler way to use

docker run -it -e -e PORT=443(default) -e USER=user descoped/proxytunnel

Apache 2.4 configuration

The following modules must be enabled:

LoadModule proxy_http_module modules/
LoadModule proxy_connect_module modules/

        ServerAdmin webmaster@localhost

        RewriteEngine On
        RewriteCond %{REQUEST_METHOD} !^CONNECT [NC]
        RewriteRule ^/(.*)$ - [F,L]

        ProxyRequests On
        ProxyBadHeader Ignore
        ProxyVia Full
        AllowCONNECT 22

        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Deny from all
                #Require local

                Order allow,deny
                Allow from all

        SSLEngine On
        SSLCertificateFile /etc/letsencrypt/live/
        SSLCertificateKeyFile /etc/letsencrypt/live/

        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ErrorLog /var/log/apache2/error.log