mirror of
https://github.com/tailscale/tailscale.git
synced 2024-12-01 14:05:39 +00:00
cmd/tailscale/cli: fix inconsistency between serve text and example command
Use the same local port number in both, and be more precise about what is being forwarded Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
parent
654b5a0616
commit
e1fb687104
@ -66,10 +66,12 @@ func newServeCommand(e *serveEnv) *ffcli.Command {
|
|||||||
- To serve simple static text:
|
- To serve simple static text:
|
||||||
$ tailscale serve https:8080 / text:"Hello, world!"
|
$ tailscale serve https:8080 / text:"Hello, world!"
|
||||||
|
|
||||||
- To forward raw TCP packets to a local TCP server on port 5432:
|
- To forward incoming TCP connections on port 2222 to a local TCP server on
|
||||||
|
port 22 (e.g. to run OpenSSH in parallel with Tailscale SSH):
|
||||||
$ tailscale serve tcp:2222 tcp://localhost:22
|
$ tailscale serve tcp:2222 tcp://localhost:22
|
||||||
|
|
||||||
- To forward raw, TLS-terminated TCP packets to a local TCP server on port 80:
|
- To accept TCP TLS connections (terminated within tailscaled) proxied to a
|
||||||
|
local plaintext server on port 80:
|
||||||
$ tailscale serve tls-terminated-tcp:443 tcp://localhost:80
|
$ tailscale serve tls-terminated-tcp:443 tcp://localhost:80
|
||||||
`),
|
`),
|
||||||
Exec: e.runServe,
|
Exec: e.runServe,
|
||||||
|
Loading…
Reference in New Issue
Block a user