File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 153153 description = "Disable the TCP Listeners on tsnet and tailscaled" ;
154154 } ;
155155
156+ serverURL = mkOption {
157+ type = nullOr str ;
158+ default = null ;
159+ description = "Server URL to use instead of the tailscale FDQN" ;
160+ } ;
161+
156162 enableFunnel = mkOption {
157163 type = bool ;
158164 default = false ;
240246 args = lib . cli . toGNUCommandLineShell { mkOptionName = k : "-${ k } " ; } {
241247 hostname = cfg . settings . hostName ;
242248 port = cfg . settings . port ;
249+ server-url = cfg . settings . serverURL ;
243250 local-port = cfg . settings . localPort ;
244251 use-local-tailscaled = cfg . settings . useLocalTailscaled ;
245252 unix-socket = cfg . settings . unixSocket ;
Original file line number Diff line number Diff line change 4343 flagDisableTCP = flag .Bool ("disable-tcp" , false , "disable the tcp listener on tsnet/tailscaled" )
4444 flagFunnel = flag .Bool ("funnel" , false , "use Tailscale Funnel to make tsidp available on the public internet" )
4545 flagHostname = flag .String ("hostname" , "idp" , "tsnet hostname to use instead of idp" )
46+ flagServerURL = flag .String ("server-url" , "" , "server url to use instead of the tailscale FDQN." )
4647 flagDir = flag .String ("dir" , "" , "tsnet state directory; a default one will be created if not provided" )
4748 flagEnableSTS = flag .Bool ("enable-sts" , false , "enable OIDC STS token exchange support" )
4849
@@ -181,7 +182,11 @@ func main() {
181182 * flagEnableSTS ,
182183 )
183184
184- srv .SetServerURL (strings .TrimSuffix (st .Self .DNSName , "." ), * flagPort )
185+ if * flagServerURL != "" {
186+ srv .SetServerURL (* flagServerURL , * flagPort )
187+ } else {
188+ srv .SetServerURL (strings .TrimSuffix (st .Self .DNSName , "." ), * flagPort )
189+ }
185190
186191 // Load funnel clients from disk if they exist, regardless of whether funnel is enabled
187192 // This ensures OIDC clients persist across restarts
You can’t perform that action at this time.
0 commit comments