CLI Overview
Overview of the Exposr command-line interface.
The Exposr CLI is installed as the exposr command. It provides commands for exposing local services, configuring the client, and managing the relay server.
Commands
| Command | Description |
|---|---|
| exposr tcp <local-port> [public-port] | Expose a local TCP service through the relay |
| exposr udp <local-port> [public-port] | Expose a local UDP service through the relay |
| exposr config set-server <ip> | Configure the relay server address |
| exposr server init-token <token> | Initialize the server with an agent token |
| exposr server start | Start the relay server |
Global options
| Option | Default | Description |
|---|---|---|
| --server-host | Saved config | Override the server address for one run |
| --control-port | 9000 | Control channel port |
| --data-port | 9001 | Data channel port |
| --local-host | 127.0.0.1 | Local host address |
Examples
bash
# Expose a local TCP service on the default public port
exposr tcp 3000
# Expose a local TCP service with a specific public port
exposr tcp 3000 21342
# Expose a local UDP service
exposr udp 3000 21342
# Use a different server for one run
exposr tcp 3000 --server-host 10.0.0.5
# Expose a service on port 8080
exposr tcp 8080