Closed Delapouite closed 8 years ago
test socket with: http://localtunnel.me/
With #21 localtunnel -p 42000
works properly.
Should we make it a CLI option or keep it external?
Making it a CLI option offers some nice additions: as tunnel is created from copycast, we can react on network error to try to recreate the tunnel again and again. Plus, we can automatically generate a nice subdomain like "cc{a few random digits}".
Scenario:
$ copycast --lt
http://127.0.0.1:42000
http://192.168.7.5:42000
… few ms later …
http://cc1234.localtunnel.me
… few seconds later, fuckin wi-fi dead …
[localtunnel] Tunnel closed.
[localtunnel] Failed to reopen tunnel, try again in 5 seconds…
[localtunnel] Failed to reopen tunnel, try again in 10 seconds…
[localtunnel] Failed to reopen tunnel, try again in 15 seconds…
… etc …
[localtunnel] Too many failures, automatic retries disabled, press 'T' to retry
… fuckin wi-fi up again, you press T …
[localtunnel] User request
[localtunnel] OK
The retry thing may not be mandatory at first place, but we should in all cases store the localtunnel subdomain to request the same one each time copycast is launched for this directory. Crash ? Reboot ? Whatever, next day the URL won't change for trainees :)
For cases when the trainer and students are not on the same vlan.