r/CloudFlare: Local tunnel with text service address instead of port?

💡
This article archives a conversation, which took place in a subreddit post (original source linked below) and to which I contributed a solution or answer (with the u/MasterofSynapse handle), in a Q&A format.

Original Reddit post: https://www.reddit.com/r/CloudFlare/comments/y4zehr/local_tunnel_with_text_service_address_instead_of/

Question

Hey, is there a way to create a service in a local tunnel that points for example to the local address localhost/someservice instead of localhost:8080 ?

I would like to skip the config changes that I would have to otherwise do if I have to change the address of the service on the host machine.

Thanks!

Answer

All services have ports. And just because you can't add a path to the service URL within the Tunnel config doesn't mean you can't access the path itself afterwards.

I explained it in another comment in this subreddit, have a look, that should detail what you have to do: https://epsilonsynapse.com/reddit-ama/r-cloudflare-wy9skk/