TCP & UDP Tunnels
Open non-HTTP services over TCP or UDP with the OutRay CLI.
OutRay can tunnel raw TCP and UDP traffic so you can share things like SSH, databases, syslog, or game servers.
outray tcp 22 --remote-port 2222
What happens
- We try to bind the requested remote port; if it’s taken, you’ll see the assigned port in the output.
- External TCP clients connect to the assigned port; traffic is piped to your local port.
Flags that matter
<port>: local TCP service to forward to.--remote-port <port>(optional): ask for a specific public port in the TCP pool (defaults 20000-30000). If it’s busy, we assign another.
outray udp 514 --remote-port 1514
What happens
- We try to bind the requested UDP port; if busy, you’ll get the assigned port (UDP pool defaults 30001-40000).
- External UDP packets to the assigned port are forwarded to your local UDP service; your responses are relayed back.
Flags that matter
-
<port>(positional): local UDP service to forward to. -
--remote-port <port>(optional): ask for a specific public port in the UDP pool. -
Port already in use: retry without
--remote-portto let OutRay pick one, or choose another. -
No responses (UDP): ensure your local service replies; the CLI relays responses automatically once it receives them.