Letitout
Easy `inlets` client execution.
Install / Use
/learn @WoLfulus/LetitoutREADME
Let it out!
<img src="docs/logo.png" />Overview
Let it out makes it easier to quickly expose your local services to the internet without
messing with inlets server tokens, and DNS records.
While we just automate the DNS management on your CloudFlare account and the inlets command,
all the tunneling magic comes from inlets itself. You're still
required to have an exit server up and running in order to expose it to the internet.
Requirements
- Inlets
inletsexecutable installed on your machine - One or more exit server installed
- A domain managed by CloudFlare
Exit servers
You can use any system you want to run exit servers if they are publicly accessible.
The easiest way to do it is using inletsctl to create an exit server, but if you want a quick and easy setup on a provider not supported by inletsctl, here it is how you can do it on a fresh Ubuntu machine (adjust as needed):
- Install inlets
sudo curl -sLS https://get.inlets.dev | sudo shsudo curl -sLO https://raw.githubusercontent.com/inlets/inlets/master/hack/inlets-operator.servicesudo mv inlets-operator.service /etc/systemd/system/inlets.serviceecho AUTHTOKEN=$(head -c 16 /dev/urandom | shasum | cut -d" " -f1) > ~/inletsecho CONTROLPORT=8000 >> ~/inletssudo mv ~/inlets /etc/default/inletssudo systemctl start inletssudo systemctl enable inlets
- Grab your token
source /etc/default/inletsecho $AUTHTOKEN
Installation
TODO:
Configuration
To run let it out you need a configuration file that has your domains and exit servers.
The configuration is done through a .letitout.yml file that can be placed in your home directory or the current working directory when you run letitout. If the file is found in the current working directory, it takes priority over the file placed on your home folder.
Example contents
cloudflare:
mydomain.com:
token: <your_cloudflare_token_with_edit_zone_permission>
anotherdomain.com:
token: <another_cloudflare_token_with_edit_zone_permission>
servers:
my_digitalocean_vps:
address: 123.123.123.123:8000
token: <the_digitalocean_exit_server_token>
some_aws_vps:
address: 213.213.213.213:8000
token: <the_aws_exit_server_token>
some_random_place:
address: 222.222.222.222:8000
token: <the_token_on_random_place>
projects:
apache:
server: my_digitalocean_vps
hostname: sub.mydomain.com
upstream: http://127.0.0.1:80
my_vue_frontend:
server: some_aws_vps
hostname: project2.anotherdomain.com
upstream: http://127.0.0.1:3000
You can configure any number of domains, servers and projects in the configuration file. You just need to make sure projects references a valid exit server. If the hostname cannot be found under CloudFlare section, the DNS management will be skipped.
Running
You can quickly expose your projects by running letitout <project_name> command.
For example, using the example configuration file, running letitout apache will create an A record sub.mydomain.com that points to the DigitalOcean machine IP. Note that these records have CloudFlare proxy enabled by default.
If the exit server IP is an IPv6 address, the record is created as an AAAA type.
Quickly (temporarily) changing settings
If you want to quickly change the hostname, the target server, or the upstream service without editing the configuration file, you can specify it using --hostname <host>, --server <server> or --upstream <upstream>.
Examples
These examples assumes a configuration like this:
Server:
server1at address111.111.111.111server2at address222.222.222.222
Domains:
domain1.comddomain2.com
Projects:
project1on upstreamhttp://localhost:8000with domainproject.domain1.comproject2on upstreamhttp://localhost:3000with domainproject.domain2.com
Expose project1
Command
letitout project1
Result
- Creates an
ADNS recordproject.domain1.compointing to111.111.111.111 - Tunnels
http://localhost:8000toserver1, accessible throughhttps://project.domain1.com
Expose project2
Command
letitout project2
Result
- Creates an
ADNS recordproject.domain2.compointing to222.222.222.222 - Tunnels
http://localhost:3000toserver2, accessible throughhttps://project.domain1.com
Expose project1 on hey.domain2.com
Command
letitout project1 --hostname hey.domain2.com
Result
- Creates an
ADNS recordhey.domain2.compointing to111.111.111.111 - Tunnels
http://localhost:3000toserver1, accessible throughhttps://hey.domain2.com
Backlog
Complete
- [x] Backup DNS record into a TXT record
- [x] Create DNS record pointing to Exit server address
- [x] Support multiple servers, projects and domains
Pending
- [ ] Rollback DNS changed based on TXT backups on exit or command
- [ ] Support more DNS providers
License
MIT
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
345.9kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
