tailscale-dev / docker-mod

The home for our universal Docker mod
BSD 3-Clause "New" or "Revised" License
63 stars 30 forks source link

Add target service variables to support https+insecure mode #14

Closed campfred closed 8 months ago

campfred commented 1 year ago

Summary

Allows setting specific target mode and specific serving port as they're allowed to be changed in CLI.

What changed

  1. Edited serve/funnel commands in svc-tailscale-up/run script to use the <mode>:<port> <mode>://localhost:<port> syntax when using Serve.
  2. Introduced TAILSCALE_TARGET_MODE and TAILSCALE_TARGET_PORT variables for
  3. Edited README.md to reflect new variables and make it a bit easier to understand the Mode and Port variables descriptions

Justification

To enable supporting use cases like hosting a UniFi controller's web portal on a Tailnet which is normally self-signed https on 8443 (#13) and also to support allowing to set a custom port number within the allowed ones for the endpoint (docs).

Breaking change(s)

TAILSCALE_SERVE_PORT now addresses port number for the endpoint that is exposed on the Tailnet instead of the target service's port number.

campfred commented 1 year ago

Corrected a mistake from my part on an additional commit (c6889470af5e401ff40a2e9002a102e40dcf8462). I forgot the Funnel syntax. My apologies.

campfred commented 1 year ago

Updated variable descriptions that had to do with Tailscale serving to tailnet/Internet to make it clearer on an additional commit (1960ad9fdfa2155c109754ad9d1a6d059a8b3767). It is the result of having some more people test out my changes and providing feedback to me.