No description
  • Go 90.5%
  • Python 6.6%
  • Shell 0.9%
  • HTML 0.7%
  • Makefile 0.5%
  • Other 0.8%
Find a file
Alessandro Frigerio eeac161daa TUN-10800: Consume authentication callback state
This adds callback handling for the browser-bound Quick Tunnel authentication state, consuming the POST to /.cloudflared/qt-auth/callback that the broker sends after login. The handler accepts a bounded application/x-www-form-urlencoded body containing exactly one state and one assertion, verifies the HMAC-signed state cookie, and binds it to the submitted state. 

It fails closed and clears the state cookie once consumption succeeds. On success, the handler returns the broker assertion and the validated return path for later use.
2026-09-15 13:52:36 +00:00
.ci ci: Disable macOS builds while runners are unavailable 2026-09-14 17:47:29 +01:00
.githooks chore: Add pre-push hooks 2026-04-29 13:09:22 +00:00
.github ci: add Semgrep OSS scanning workflow 2026-06-30 09:36:55 +01:00
.mac_resources AUTH-2712 mac package build script and better config file handling when started as a service 2020-06-25 16:44:57 -05:00
carrier TUN-10557: Bump quic-go v0.59.1 2026-08-12 16:12:32 +01:00
cfapi chore: Addressing small fixes and typos 2026-03-05 16:53:48 +00:00
cfio TUN-6035: Reduce buffer size when proxying data 2022-04-11 14:41:33 +00:00
client TUN-10413: Centralize TLS curve configuration in crypto/ and adopt X25519MLKEM768 for QUIC/H2 2026-05-12 07:47:38 +01:00
cmd/cloudflared chore: Mark transport-loglevel deprecated 2026-09-10 10:00:09 -07:00
component-tests TUN-10799: Negotiate protected mode during Quick Tunnel provisioning 2026-09-03 13:03:59 +00:00
config TUN-9858: Remove proxy-dns feature from cloudflared 2026-02-06 12:43:53 +00:00
connection chore: Mark transport-loglevel deprecated 2026-09-10 10:00:09 -07:00
credentials TUN-9755: Set endpoint in tunnel credentials when generating locally managed tunnel with a Fed token 2025-08-27 15:57:58 +00:00
crypto TUN-10413: Centralize TLS curve configuration in crypto/ and adopt X25519MLKEM768 for QUIC/H2 2026-05-12 07:47:38 +01:00
datagramsession TUN-9016: update go to 1.24 2025-06-06 09:05:49 +00:00
diagnostic TUN-10701: Use curves for prechecks 2026-07-20 10:00:35 +00:00
edgediscovery TUN-10822: Remove fetching protocol percentage from remote 2026-08-27 13:29:13 -07:00
features TUN-10525: Add prechecks kill switch 2026-05-13 18:05:11 +00:00
fips TUN-8855: Update PQ curve preferences 2025-01-30 05:02:47 -08:00
flow TUN-8861: Rename Session Limiter to Flow Limiter 2025-01-20 06:33:40 -08:00
hello TUN-7590: Remove usages of ioutil 2023-07-17 19:08:38 +00:00
ingress Revert "TUN-10621: Propagate max wait timeout" 2026-07-09 13:00:02 +01:00
internal/test TUN-7125: Add management streaming logs WebSocket protocol 2023-04-05 16:25:16 +00:00
ipaccess TUN-6016: Push local managed tunnels configuration to the edge 2022-05-06 15:43:24 +00:00
logger chore: Mark transport-loglevel deprecated 2026-09-10 10:00:09 -07:00
management TUN-9583: set proper url and hostname for cloudflared tail command 2025-07-23 20:09:50 +01:00
metrics chore: Remove stale metrics timeout TODO 2026-08-28 14:37:05 +01:00
mocks TUN-10557: Bump quic-go v0.59.1 2026-08-12 16:12:32 +01:00
orchestration TUN-9470: Add OriginDialerService to include TCP 2025-06-30 13:24:16 -07:00
overwatch AUTH-2169 make access login page more generic 2020-06-08 11:20:30 -05:00
packet chore: Addressing small fixes and typos 2026-03-05 16:53:48 +00:00
prechecks TUN-10557: Bump quic-go v0.59.1 2026-08-12 16:12:32 +01:00
proxy VULN-141859: Revert path normalization 2026-08-14 12:17:11 +01:00
quic TUN-10557: Bump quic-go v0.59.1 2026-08-12 16:12:32 +01:00
quicktunnelauth TUN-10800: Consume authentication callback state 2026-09-15 13:52:36 +00:00
release SECENG-13496 update pkg docs for gokeyless to support multiple builds 2026-04-29 05:37:09 -04:00
retry chore: fix linter rules 2025-04-01 18:57:55 +01:00
signal TUN-1562: Refactor connectedSignal to be safe to close multiple times 2019-03-05 15:51:35 -06:00
socks TUN-7590: Remove usages of ioutil 2023-07-17 19:08:38 +00:00
sshgen TUN-8333: Bump go-jose dependency to v4 2024-04-10 09:49:40 -07:00
stream chore: Clean up unused code 2026-08-27 08:38:54 -07:00
supervisor chore: Mark transport-loglevel deprecated 2026-09-10 10:00:09 -07:00
tlsconfig TUN-10725: Remove unused certificate configuration 2026-08-26 12:08:44 +01:00
token AUTH-8883 Fix Access token lock self-deadlock during same-process reauth 2026-09-02 18:04:04 +00:00
tracing add: new go-fuzz targets 2024-11-11 20:45:49 +05:30
tunnelrpc TUN-9016: update go to 1.24 2025-06-06 09:05:49 +00:00
tunnelstate TUN-8728: implement diag/tunnel endpoint 2024-11-25 10:43:32 -08:00
validation TUN-10834: Bump Go toolchains to 1.26.8 2026-09-03 15:24:38 -07:00
watcher TUN-7584: Bump go 1.20.6 2023-07-26 13:52:40 -07:00
websocket TUN-7057: Remove dependency github.com/gorilla/mux 2022-12-24 21:05:51 -07:00
.docker-images TUN-6825: Fix cloudflared:version images require arch hyphens 2022-10-04 15:48:58 +00:00
.docker-images-internal TUN-10748: Add FIPS image variant for Cloudflared tunnel 2026-08-11 16:17:15 +01:00
.dockerignore TUN-10829: Remove vendoring 2026-09-02 16:21:50 -07:00
.gitignore TUN-10829: Remove vendoring 2026-09-02 16:21:50 -07:00
.gitlab-ci.yml TUN-10834: Bump Go toolchains to 1.26.8 2026-09-03 15:24:38 -07:00
.golangci.yaml TUN-10829: Remove vendoring 2026-09-02 16:21:50 -07:00
.vulnignore TUN-9858: Remove proxy-dns feature from cloudflared 2026-02-06 12:43:53 +00:00
AGENTS.md chore: Add notes on breaking changes 2026-09-10 16:03:57 +00:00
catalog-info.yaml GRC-16749: Add fedramp tags to catalog 2025-10-07 11:27:41 +00:00
cfsetup.yaml TUN-9800: Migrate apt internal builds to Gitlab 2025-11-10 14:43:10 +00:00
CHANGES.md TUN-10383: Set edge-ip-version to auto 2026-04-14 16:11:59 +00:00
check-fips.sh TUN-10829: Remove vendoring 2026-09-02 16:21:50 -07:00
cloudflared.wxs Remove extraneous period from Path Environment Variable (#1009) 2023-12-14 16:32:48 +00:00
cloudflared_man_template AUTH-2644: Change install location and add man page 2020-07-06 19:27:25 +00:00
Dockerfile Update gcr.io/distroless/base-debian13:nonroot Docker digest to d199d20 2026-09-08 07:38:16 +00:00
Dockerfile.amd64 Update gcr.io/distroless/base-debian13:nonroot-amd64 Docker digest to 1411d9a 2026-09-08 07:37:56 +00:00
Dockerfile.arm64 TUN-10834: Bump Go toolchains to 1.26.8 2026-09-03 15:24:38 -07:00
Dockerfile.fips.amd64 Update gcr.io/distroless/base-debian13:nonroot-amd64 Docker digest to 1411d9a 2026-09-08 07:37:56 +00:00
Dockerfile.fips.arm64 TUN-10834: Bump Go toolchains to 1.26.8 2026-09-03 15:24:38 -07:00
github_message.py TUN-6823: Update github release message to pull from KV 2022-10-11 15:43:06 +00:00
github_release.py DEVTOOLS-16383: Create GitlabCI pipeline to release Mac builds 2025-04-30 09:57:52 +00:00
go.mod chore: bump gorilla/websocket for GO-2026-6278 2026-08-26 10:52:11 +01:00
go.sum TUN-10829: Remove vendoring 2026-09-02 16:21:50 -07:00
LICENSE TUN-5851: Update all references to point to Apache License 2.0 2022-03-08 17:35:31 +00:00
Makefile TUN-10829: Remove vendoring 2026-09-02 16:21:50 -07:00
postinst.sh TUN-9919: Make RPM postinstall scriplet idempotent 2025-10-15 14:33:43 +00:00
postrm.sh TUN-8290: Remove || true from postrm.sh 2024-03-07 16:22:56 +00:00
README.md chore: Add notes on breaking changes 2026-09-10 16:03:57 +00:00
RELEASE_NOTES Release 2026.9.1 2026-09-10 13:52:23 -07:00
release_pkgs.py TUN-9800: Add pipelines for linux packaging 2025-11-05 10:45:04 +00:00
renovate.json Migrate config renovate.json 2026-06-30 17:19:15 +01:00
wix.json AUTH-2712 mac package build script and better config file handling when started as a service 2020-06-25 16:44:57 -05:00

Cloudflare Tunnel client

Contains the command-line client for Cloudflare Tunnel, a tunneling daemon that proxies traffic from the Cloudflare network to your origins. This daemon sits between Cloudflare network and your origin (e.g. a webserver). Cloudflare attracts client requests and sends them to you via this daemon, without requiring you to poke holes on your firewall --- your origin can remain as closed as possible. Extensive documentation can be found in the Cloudflare Tunnel section of the Cloudflare Docs. All usages related with proxying to your origins are available under cloudflared tunnel help.

You can also use cloudflared to access Tunnel origins (that are protected with cloudflared tunnel) for TCP traffic at Layer 4 (i.e., not HTTP/websocket), which is relevant for use cases such as SSH, RDP, etc. Such usages are available under cloudflared access help.

You can instead use WARP client to access private origins behind Tunnels for Layer 4 traffic without requiring cloudflared access commands on the client side.

Before you get started

Before you use Cloudflare Tunnel, you'll need to complete a few steps in the Cloudflare dashboard: you need to add a website to your Cloudflare account. Note that today it is possible to use Tunnel without a website (e.g. for private routing), but for legacy reasons this requirement is still necessary:

  1. Add a website to Cloudflare
  2. Change your domain nameservers to Cloudflare

Installing cloudflared

Downloads are available as standalone binaries, a Docker image, and Debian, RPM, and Homebrew packages. You can also find releases here on the cloudflared GitHub repository.

User documentation for Cloudflare Tunnel can be found at https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/

Creating Tunnels and routing traffic

Once installed, you can authenticate cloudflared into your Cloudflare account and begin creating Tunnels to serve traffic to your origins.

TryCloudflare

Want to test Cloudflare Tunnel before adding a website to Cloudflare? You can do so with TryCloudflare using the documentation available here.

Breaking Changes

Removal of CLI flags, environment variables, configuration keys, or commands is a breaking change. Such removals must be announced in the Cloudflare Tunnel changelog before the release that removes them.

Deprecated versions

Cloudflare currently supports versions of cloudflared that are within one year of the most recent release. Breaking changes unrelated to feature availability may be introduced that will impact versions released more than one year ago. You can read more about upgrading cloudflared in our developer documentation.

For example, as of January 2023 Cloudflare will support cloudflared version 2023.1.1 to cloudflared 2022.1.1.

Development

Requirements

Build

To build cloudflared locally run make cloudflared

Test

To locally run the tests run make test

Linting

To format the code and keep a good code quality use make fmt and make lint

Mocks

After changes on interfaces you might need to regenerate the mocks, so run make mocks

Git Hooks

To avoid CI errors, you can install pre-push hooks that run linting and tests before each push:

make install-hooks

This will configure git to use the hooks in .githooks/ that run make fmt-check lint test before each push.