Skip to content

Commit d19da67

Browse files
TUN-7021: Fix proxy-dns not starting when cloudflared tunnel is run
This PR starts a separate server for proxy-dns if the configuration is available. This fixes a problem on cloudflared not starting in proxy-dns mode if the url flag (which isn't necessary for proxy-dns) is not provided. Note: This is still being supported for legacy reasons and since proxy-dns is not a tunnel and should not be part of the cloudflared tunnel group of commands.
1 parent 045439f commit d19da67

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmd/cloudflared/tunnel/cmd.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ func TunnelCommand(c *cli.Context) error {
195195
return runClassicTunnel(sc)
196196
}
197197

198+
if c.String("proxy-dns") != "" {
199+
// NamedTunnelProperties are nil since proxy dns server does not need it.
200+
// This is supported for legacy reasons: dns proxy server is not a tunnel and ideally should
201+
// not run as part of cloudflared tunnel.
202+
return StartServer(sc.c, buildInfo, nil, sc.log)
203+
}
204+
198205
return errors.New(tunnelCmdErrorMessage)
199206
}
200207

0 commit comments

Comments
 (0)