You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download `tunnel-client` wherever you are running the service you want to expose. Let say your service is running on `localhost:8888`. When you run `tunnel-client localhost:8888` it will print a URL you can click on.
12
12
13
-
Static precompiled binaries (Linux, Mac, Windows) are avaliable under CI/CD.
13
+
Static precompiled binaries (Linux, Mac, Windows) are avaliable under CI/CD.
14
14
15
15
The `-hostname <hostname>` option can be provided to request a specific hostname. However, each hostname is temporarily protected by a secret token. The token doesn't matter when using random URLs, but you should specify `-token <token>` if you want to use the same url multiple times.
16
16
17
-
##Limitations
17
+
### SSH
18
18
19
-
`tunnel-client` only works with plain text protocols (HTTP). Whatever you expose will be encrypted during all segements of transfer. You technically could expose any TCP port, but it would require a custom frontend which could interpet tls wrapped traffic.
19
+
You can use `socat` to unwrap the TLS layer and connect to an SSH server (or any other binary protocol).
20
+
21
+
Example steps:
22
+
23
+
1. Start the tunnel client on the server you want to connect to:
You could also use the `ProxyCommand` directive in an `ssh_config`:
39
+
40
+
```
41
+
Host my-ssh-server
42
+
HostName my-ssh-server.example.invalid
43
+
Port 443
44
+
ProxyCommand socat - openssl-connect:%h:%p
45
+
```
20
46
21
47
## Design
22
48
23
49
TLS Server Name Indication (SNI) is what enables the whole system. Basically when you connect to a TLS server, you indicate which name you are trying to contact in clear text. We can route frontend and backend connections based on what SNI they provide.
24
50
25
-
When you run `tunnel-client`, it will make a number of preemptive connections to `tunnel-server`. The connections sit idle until a client connects. If the connection is used/disconnected/killed, `tunnel-client` automatically opens additional connections to continually service traffic. Many clients should be able to connect.
51
+
When you run `tunnel-client`, it will make a number of preemptive connections to `tunnel-server`. The connections sit idle until a client connects. If the connection is used/disconnected/killed, `tunnel-client` automatically opens additional connections to continually service traffic. Many clients should be able to connect.
0 commit comments