CLI
LocalXpose Command Line Interface
# *nix systems
loclx <COMMAND> <SUBCOMMAND> <FLAG>
# windows
loclx.exe <COMMAND> <SUBCOMMAND> <FLAG>
This command is responsible for user account related functions.
loclx account -h
NAME:
LocalXpose account - account authentication and status
USAGE:
LocalXpose account command [command options]
COMMANDS:
login login using your access token
status check account status
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)
User can grab his access token from the dashboard here https://localxpose.io/dashboard/access. An alternative way to login without issuing account login is by passing the
ACCESS_TOKEN
as environment variable for example: # *nix systems
export ACCESS_TOKEN=your_access_token
# windows
set ACCESS_TOKEN=your_access_token
# then start your authenitcated requests normally
loclx tunnel http
Using
account login
will store the access token securely in your OS keyring store and fallback to a file in $HOME/.access
.Tunnel command is responsible for tunneling functions, you can start HTTP, TLS, TCP or UDP tunnels
loclx tunnel -h
NAME:
LocalXpose tunnel - create (HTTP,TLS,TCP,UDP) tunnel
USAGE:
LocalXpose tunnel command [command options]
COMMANDS:
config, c run tunnels from config yaml file
http, H create http tunnel
tls, T create tls tunnel
tcp, t create tcp tunnel
udp, u create udp tunnel
list, l list all the running tunnels
stop, s stop tunnel
help, h Shows a list of commands or help for one command
OPTIONS:
-r, --raw-mode run the tunnels in a raw mode (default: false)
--help, -h show help (default: false)
The flag
--raw-mode
is will disable terminal UI, it is mostly used in background process and legacy systems like windows 7.loclx tunnel http
loclx tunnel config -f /path/to/config.yaml
loclx tunnel http --subdomain hello --region ap
loclx tunnel http --baisc-auth user:pass --request-header role:internal
loclx tunnel tcp --region eu --port 9999
Domain command is responsible for managing your domain reservations.
loclx domain -h
NAME:
LocalXpose domain - manage your domain reservations
USAGE:
LocalXpose domain command [command options]
COMMANDS:
reserve, r reserve a subdomain or custom domain
list, l list all the reserved domains
status, s verify your dns cname record
delete, d delete a reserved domains
clear, c delete all the reserved domains
letsencrypt, L create Let's Encrypt TLS certificate for your domain
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)
loclx domain reserve --subdomain hello
A subdomain
hello.loclx.io
will be reserved in the region us so then you can use it in your tunnels like loclx tunnel http --reserved-domain hello.loclx.io
loclx domaion reserve --domain "example.com"
Then you can use it in your tunnels like
loclx tunnel http --reserved-domain example.com
, more about domain reservation here.One of the two flags
--subdomain
or --domain
is required but not both.loclx domain letsencrypt --domain example.com
The above will create for you a Lets Encrypt certificate and store it in you
$HOME/.localxpose
.Endpoint command is responsible for managing your endpoints reservations.
loclx endpoint -h
NAME:
LocalXpose endpoint - manage your endpoint reservations
USAGE:
LocalXpose endpoint command [command options]
COMMANDS:
reserve, r reserve an endpoint
list, l list all the reserved endpoints
delete, d delete a reserved endpoint
clear delete all the reserved endpoints
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)
loclx endpoint reserve --port 7788 --region eu
This will reserve an endpoint
eu.loclx.io:7788
that you can use in your tunnels like loclx tunnel tcp --reserved-endpoint eu.loclx.io:7788
. You can read more about endpoint reservations here.Ports allowed are from 1024 to 65535
Service will be managing your LocalXpose background daemon service, so you can install, run, stop, restart and uninstall the service in your operating system.
loclx service -h
NAME:
LocalXpose service - manage localxpose background service
USAGE:
LocalXpose service command [command options]
COMMANDS:
install, i install localxpose as a background service
uninstall, u uninstall localxpose background service
start, s start localxpose background service
stop, p stop localxpose background service
restart, r restart localxpose background service
status, t check localxpose background service status
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help (default: false)
loclx service install --config /path/to/config.yaml
So this will generate a service in your operating system called localxpose.
loclx service start
This will start the tunnels configured in your
config.yaml
that we used earlier in the service installation step.Whenever you need to change some tunnels settings, just stop the service
loclx service stop
and then modify the config.yaml
and then start the service again loclx service start
.
Settings managment like
http-proxy
loclx setting -h
NAME:
LocalXpose setting - manage your settings
USAGE:
LocalXpose setting command [command options]
COMMANDS:
proxy, p setup http proxy
list, l list all current settings
If your environment has proxy server to access the internet, then you need to tell LocalXpose:
loclx setting proxy --set http://USERNAME:[email protected]:3128
loclx setting proxy --unset
Update to the latest LocalXpose version.
loclx update
Last modified 1mo ago