package cloudflared import "strings" // InProcessSupported reports whether this build can spawn cloudflared in-process. func InProcessSupported() bool { return inProcessSupported } // ShouldStartInProcess returns true when the server should launch cloudflared itself. // Set AF_TUNNEL_EXTERNAL=1 when an external connector (e.g. LAUNCH.bat) already owns the tunnel. func ShouldStartInProcess(tunnelExternal bool, token string) bool { return strings.TrimSpace(token) != "" && !tunnelExternal }