cloudflare / cloudflared

Cloudflare Tunnel client (formerly Argo Tunnel)
https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide
Apache License 2.0
9.23k stars 816 forks source link

Creating route records defined in config file #551

Open w35l3y opened 2 years ago

w35l3y commented 2 years ago

Any chance to call something similar to cloudflared tunnel --config /data/options.yaml run and the command create route records automatically ?

options.yaml

# this is new feature (it is a suggestion!)
route: # does it make sense to be a list ?
  - dns: www.app.com # could it be read from ingress list instead ?
  - dns: www2.app.com # could it be read from ingress list instead ?
  - ld: # load balancer
    name: ...
    pool: ...
  - ip: 10.0.0.0/8

# everything else already exist
no-autoupdate: true
originRequest: {}
metrics: localhost:41705
ingress:
  - service: http://localhost:8123 # homeassistant
    hostname: www.app.com
  - service: http://localhost:3000 # nodejs
    hostname: www2.app.com
  - service: http_status:404
tunnel: my_tunnel
abelinkinbio commented 2 years ago

@w35l3y this is a great idea. We don't have plans for this exactly, but we are actively working on making it ridiculously easy to build, manage, and run tunnels from a dashboard (web UI). Would that help solve some of your issues here?

w35l3y commented 2 years ago

That definitely would make things even easier. Currently, I guide people to access dash.cloudflare.com by themselves. https://github.com/w35l3y/hassio-addons/tree/main/cloudflare_tunnel#readme

abelinkinbio commented 2 years ago

Ah, this is a really cool project. We've made a note of this feature request and will circle back in a few weeks when we release our new orchestration tooling through the dashboard.

alvaro-gh commented 1 year ago

I just bumped into this today. What makes it even more confusing is that the routes need to be defined on the Cloudflare WARP client split tunnel settings too, besides running the route command on the cloudflared server.

angularsen commented 10 months ago

Bumping for visibility