Opening a Tunnel
How to expose your local server to the internet
Once you are authenticated, you can start exposing your local services to the internet.
Basic Usage
To expose a local server running on a specific port (e.g., 3000), simply run:
outray 3000You will see an output similar to this:
Connecting to OutRay...
Linked to your local port 3000
Tunnel ready: https://random-name.tunnel.outray.app
Keep this running to keep your tunnel active.Now, anyone with the public URL can access your local server.
Using Configuration Files
For managing multiple tunnels, you can use a TOML configuration file. Create an outray/config.toml file in your project directory:
[tunnel.web]
protocol = "http"
local_port = 3000
[tunnel.api]
protocol = "http"
local_port = 8000Then start all tunnels at once:
outray startYou can validate your config file before starting:
outray validate-configSee the CLI Reference for complete configuration options.
Inspecting Traffic
OutRay provides a real-time view of requests and responses in your terminal. As requests come in, you will see the method, path, and status code.
Stopping the Tunnel
To stop the tunnel, simply press Ctrl+C in your terminal. This will close the connection and the public URL will no longer be accessible.