GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cloudflare/cloudflared: Cloudflare Tunnel client

BranchesTags
Open more actions menu

Latest commit

 

History

2,007 Commits
2,007 Commits

Folders and files

NameName
Last commit message
Last commit date
.ci
.ci
 
 
.githooks
.githooks
 
 
.github
.github
 
 
.mac_resources
.mac_resources
 
 
carrier
carrier
 
 
cfapi
cfapi
 
 
cfio
cfio
 
 
client
client
 
 
cmd/cloudflared
cmd/cloudflared
 
 
component-tests
component-tests
 
 
config
config
 
 
connection
connection
 
 
credentials
credentials
 
 
crypto
crypto
 
 
datagramsession
datagramsession
 
 
diagnostic
diagnostic
 
 
edgediscovery
edgediscovery
 
 
features
features
 
 
flow
flow
 
 
hello
hello
 
 
ingress
ingress
 
 
internal/test
internal/test
 
 
ipaccess
ipaccess
 
 
logger
logger
 
 
management
management
 
 
metrics
metrics
 
 
mocks
mocks
 
 
orchestration
orchestration
 
 
overwatch
overwatch
 
 
packet
packet
 
 
prechecks
prechecks
 
 
proxy
proxy
 
 
quic
quic
 
 
quicktunnelauth
quicktunnelauth
 
 
release
release
 
 
retry
retry
 
 
signal
signal
 
 
socks
socks
 
 
sshgen
sshgen
 
 
stream
stream
 
 
supervisor
supervisor
 
 
tlsconfig
tlsconfig
 
 
token
token
 
 
tracing
tracing
 
 
tunnelrpc
tunnelrpc
 
 
tunnelstate
tunnelstate
 
 
validation
validation
 
 
watcher
watcher
 
 
websocket
websocket
 
 
.docker-images
.docker-images
 
 
.docker-images-internal
.docker-images-internal
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
.gitlab-ci.yml
.gitlab-ci.yml
 
 
.golangci.yaml
.golangci.yaml
 
 
.vulnignore
.vulnignore
 
 
AGENTS.md
AGENTS.md
 
 
CHANGES.md
CHANGES.md
 
 
Dockerfile
Dockerfile
 
 
Dockerfile.amd64
Dockerfile.amd64
 
 
Dockerfile.arm64
Dockerfile.arm64
 
 
Dockerfile.internal.amd64
Dockerfile.internal.amd64
 
 
Dockerfile.internal.arm64
Dockerfile.internal.arm64
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
RELEASE_NOTES
RELEASE_NOTES
 
 
catalog-info.yaml
catalog-info.yaml
 
 
cfsetup.yaml
cfsetup.yaml
 
 
check-fips.sh
check-fips.sh
 
 
cloudflared.wxs
cloudflared.wxs
 
 
cloudflared_man_template
cloudflared_man_template
 
 
github_message.py
github_message.py
 
 
github_release.py
github_release.py
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 
postinst.sh
postinst.sh
 
 
postrm.sh
postrm.sh
 
 
release_pkgs.py
release_pkgs.py
 
 
renovate.json
renovate.json
 
 
wix.json
wix.json
 
 

Repository files navigation

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.

  • You can install on macOS via Homebrew or by downloading the latest Darwin amd64 release
  • Binaries, Debian, and RPM packages for Linux can be found here
  • A Docker image of cloudflared is available on DockerHub
  • You can install on Windows machines with the steps here
  • To build from source, install the required version of go, mentioned in the Development section below. Then you can run make cloudflared.

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.

  • Create a Tunnel with these instructions
  • Route traffic to that Tunnel:
    • Via public DNS records in Cloudflare
    • Or via a public hostname guided by a Cloudflare Load Balancer
    • Or from WARP client private traffic

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

  • GNU Make
  • capnp
  • go >= 1.27.4
  • Optional tools:
    • capnpc-go
    • goimports
    • golangci-lint
    • gomocks

Updating Go

The go directive in go.mod must specify the full major.minor.patch version (for example, go 1.27.4). Do not omit the patch version, including .0 releases. This is the exact Go version used to build and test cloudflared: the Makefile exports GOTOOLCHAIN=go<version> from it, so make downloads that toolchain whenever the installed Go is older or newer. Tools that make runs with go run pkg@version also use this toolchain. A toolchain directive in go.mod is ignored; do not add one. To use the installed Go instead, run make <target> GOTOOLCHAIN=local.

When upgrading Go, update the go directive and all corresponding version references in .gitlab-ci.yml, .ci/image/Dockerfile, .github/workflows/check.yaml, and the Dockerfiles. Update the Linux CI builder image and digest in .ci/linux.gitlab-ci.yml to match; its golangVersion selects the major/minor image family. On macOS and Windows a mismatch only costs a toolchain download. Builds that use GOTOOLCHAIN=local fail if their Go is older than go.mod and use their own Go if it is newer.

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.

About

Cloudflare Tunnel client

developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/

Topics

cloudflarecloudflare-tunnelreverse-proxyzero-trust-network-access

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

16.6k stars

Watchers

143 watching

Forks

1.5k forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.