Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've spent some time playing around with this question. I now believe the premise that the remote SSH tunnels are all setup to work with the same port on the remote server is mistaken.</p> <p>But after trying out some proof of concept stuff, I think I know vaguely what they're doing. </p> <p>I was assuming that the SSH tunnels were all using the same port because all connections to the subdomain-ed URLs were presumably happening on port 80. However, if you setup <strong>proxy passing</strong> in your webserver, you can forward traffic to a different port on the server.</p> <p>Here's some proof of concept Nginx proxy passing:</p> <pre><code>server { listen 80; server_name xcvs.myserver.com; location / { proxy_pass http://127.0.0.1:5222; } } server { listen 80; server_name csde.myserver.com; location / { proxy_pass http://127.0.0.1:5223; } } </code></pre> <p>So, the traffic to these two different subdomains on port 80 are proxied to different ports, which you can then use to setup the SSH tunnels.</p> <p>There's still a bit of mystery in the setup, though. When you setup a tunnel with a service like localtunnel, you issue a command like:</p> <pre><code>$ localtunnel 3000 </code></pre> <p>I think this is hitting the server, getting back a new port number and subdomain pair, and then issuing the remote SSH tunnel command with those values for you. </p> <p>But, I'm a bit unclear how to automate the creation and mapping of subdomain to port so that the web server knows how to proxy appropriately. I smell a weekend project in the works. :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload