Localtunnel: Difference between revisions
Jump to navigation
Jump to search
Line 81: | Line 81: | ||
| valign="top" | | | valign="top" | | ||
sudo rm /etc/systemd/system/academia-lt.service | |||
systemctl daemon-reload | |||
systemctl reset-failed | |||
|} | |} |
Revision as of 10:26, 25 January 2024
source ~/.nvm/nvm.sh && nvm use node
npm install -g localtunnel
Linux Service
cat << EOF | sudo tee /etc/systemd/system/academia-lt.service >>/dev/null
[Unit]
Description=Academia Localtunnel Daemon
After=syslog.target network.target
[Service]
User=${USER}
Type=simple
Restart=on-failure
ExecStart=lt -p 80 -s academia-chorke
TimeoutStopSec=20
KillMode=process
[Install]
WantedBy=multi-user.target
EOF
|
sudo systemctl daemon-reload
sudo systemctl enable --now academia-lt
systemctl status academia-lt
sudo systemctl disable --now academia-lt
systemctl status academia-lt
sudo systemctl restart academia-lt
systemctl status academia-lt
sudo systemctl stop academia-lt
systemctl status academia-lt
|
| |
Note: No need to update any /etc/hosts entries open https://academia-chorke.loca.lt &>/dev/null & open https://loca.lt/mytunnelpassword &>/dev/null & open https://ipv4.icanhazip.com &>/dev/null & |
Playground
lt --host 127.0.0.1 --port 80 --subdomain academia-chorke lt --port 80 --subdomain academia-chorke |
lt -h 127.0.0.1 -p 80 -s academia-chorke lt -p 80 -s academia-chorke |
| |
curl -k https://loca.lt/mytunnelpassword curl -k https://ipv4.icanhazip.com sudo nginx -t |
sudo rm /etc/systemd/system/academia-lt.service systemctl daemon-reload systemctl reset-failed |
References
| ||