1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-16 00:15:24 +08:00

TUN-4521: Modify cloudflared to use zoneless-tunnels-worker for free tunnels

This commit is contained in:
Rishabh Bector
2021-06-21 19:31:24 -05:00
committed by Nuno Diegues
parent 8d99e92852
commit 3eb9efd9f0
3 changed files with 101 additions and 3 deletions

View File

@@ -163,6 +163,12 @@ func TunnelCommand(c *cli.Context) error {
return fmt.Errorf("Use `cloudflared tunnel run` to start tunnel %s", ref)
}
// Unauthenticated named tunnel on <random>.<quick-tunnels-service>.com
// For now, default to legacy setup unless quick-service is specified
if c.String("hostname") == "" && c.String("quick-service") != "" {
return RunQuickTunnel(sc)
}
// Start a classic tunnel
return runClassicTunnel(sc)
}
@@ -616,6 +622,11 @@ func tunnelFlags(shouldHide bool) []cli.Flag {
Value: false,
Hidden: shouldHide,
}),
altsrc.NewStringFlag(&cli.StringFlag{
Name: "quick-service",
Usage: "URL for a service which manages unauthenticated 'quick' tunnels.",
Hidden: true,
}),
selectProtocolFlag,
overwriteDNSFlag,
}...)