Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't disable cloudflared #33

Open
felipeelias opened this issue Feb 12, 2025 · 0 comments
Open

Can't disable cloudflared #33

felipeelias opened this issue Feb 12, 2025 · 0 comments

Comments

@felipeelias
Copy link

Running the command with

curxy --cloudflared false

Still runs the cloudflare tunnel.

I tracked down to this being a boolean argument

    cloudflared: {
      type: Boolean,
      default: true,
      description: "Use cloudflared to tunnel the server",
    },

I believe it's because the cleye does understand that passing a "false" value to a boolean actually means to disable the flag. Any value passed becomes truthy.

A possible solution is

    cloudflared: {
      type: String,
      default: "true",
      description: "Use cloudflared to tunnel the server",
    },

and then checking below for

flags.cloudflared === "true"

The downside is that this becomes a string, in the help we see

Flags:
      --cloudflared <string>           Use cloudflared to tunnel the server (default: "true")

Thoughts? I can make a PR with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant