Alujjdnd / Ngrok-LAN

A FabricMC mod that exposes your local LAN server to the internet with Ngrok.
MIT License
31 stars 8 forks source link

Ability to specify custom command #38

Open solonovamax opened 10 months ago

solonovamax commented 10 months ago

Hi,

sorry for the lack of use of the issue templates, I'm on mobile (FastHub) and it doesn't support them

I would like if I could specify a custom command instead of using ngrok.

for example, if I wanted to use my own self-hosted bore server, I could specify the command as

bore local {{port}} --to proxy.solonovamax.gay --secret $BORE_SECRET

where, {{port}} is the local port. however, this presents the issue of knowing the port for the resulting url. so, instead it could be something like

bore local {{localPort}} --to proxy.solonovamax.gay --secret $BORE_SECRET --port {{remotePort}}

where localPort is the local port and remotePort is the remote port, chosen randomly. and, the resulting url can be specified as

proxy.solonovamax.gay:{{remotePort}}

additionally, there can be settings for a maximum and minimum port, as services like bore only accept ports within a certain range.