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

persistent cfd quick tunnel #1317

Closed
wants to merge 1 commit into from
Closed

Conversation

0verflowme
Copy link

@0verflowme 0verflowme commented Aug 26, 2024

This PR introduces functionality to allow users to create and manage persistent Cloudflare quick tunnels. While quick tunnels are typically ephemeral, this feature enables users to set up long-lasting tunnels for ongoing projects or applications.

Create a new tunnel:
curl -XPOST https://api.trycloudflare.com/tunnel -H "Content-Type: application/json"

This generates a credential file (cred.json) containing tunnel details:

{
  "TunnelID": "6eed86e6-3359-4439-8561-e7e8c16730b7",
  "name": "qt-iG1nZiARKhXjEkIQ2hfCzKesBCwEKeXq",
  "Hostname": "ill-indoor-global-price.trycloudflare.com",
  "AccountTag": "5ab4e9dfbd435d24068829fda0077963",
  "TunnelSecret": "ruHGVAUTEAXTdAhOMTCJ0o/+EY3kzcsukMC7ktSQ+SQ="
}

Create a configuration file (config.yml):

url: localhost:8080
tunnel: 6eed86e6-3359-4439-8561-e7e8c16730b7
credential-file: /Users/0verflow/cred.json

Run the tunnel:
./cloudflared tunnel --config /Users/0verflow/config.yml run --cred-file /Users/0verflow/cred.json

@GoncaloGarcia
Copy link

Hey @0verflowme! This seems like a good use-case for a normal Cloudflare tunnel.
https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/

@adsrmk
Copy link

adsrmk commented Sep 26, 2024

i dont understand how to use this, and i really need to configure my tunnel to be persistent.

@GoncaloGarcia
Copy link

As mentioned in a previous comment, named tunnels are designed to be persistent and should be used for this purpose.

@adsrmk You can follow this page in order to create a named tunnel https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/

Closing this PR as the functionality is implemented elsewhere.

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

Successfully merging this pull request may close these issues.

3 participants