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

feat: add cloudflared system extension #542

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

maxnrb
Copy link
Contributor

@maxnrb maxnrb commented Dec 7, 2024

This PR adds a new system extension cloudflared

Cloudflare Tunnel securely connects resources to Cloudflare without a public IP. A lightweight daemon (cloudflared) creates outbound-only connections to Cloudflare, allowing safe access to services like HTTP, SSH, remote desktops, and other protocols.

More info: https://github.com/cloudflare/cloudflared/

@maxnrb maxnrb force-pushed the cloudflared-sys-ext branch 6 times, most recently from 6f79c1c to 04d2825 Compare December 7, 2024 15:17
Cloudflare Tunnel securely connects resources to Cloudflare without a public IP.

Signed-off-by: Maxime NARBAUD <[email protected]>
Signed-off-by: Noel Georgi <[email protected]>
@frezbo frezbo force-pushed the cloudflared-sys-ext branch from 04d2825 to 1dd6c36 Compare December 11, 2024 16:15
@frezbo
Copy link
Member

frezbo commented Dec 11, 2024

/m

@talos-bot talos-bot merged commit 1dd6c36 into siderolabs:main Dec 11, 2024
14 checks passed
@maxnrb maxnrb deleted the cloudflared-sys-ext branch December 12, 2024 00:14
@maxnrb
Copy link
Contributor Author

maxnrb commented Dec 12, 2024

Hi @frezbo,

I've just seen your commit, and instead of retrieving the cloudflared binaries directly, you locate the sources and build the binary.

However, cloudflared is built with a version of go ‘modified’ by Cloudflare (https://github.com/cloudflare/go), see the Dockerfile: https://github.com/cloudflare/cloudflared/blob/master/Dockerfile
So I'm afraid that some of the tunnel's functionality won't work (particularly security functionality, as their version patches the TLS stack).

I can push a new PR by building the binary from source with Cloudflare's go executable. What do you think about?

@frezbo
Copy link
Member

frezbo commented Dec 12, 2024

Hi @frezbo,

I've just seen your commit, and instead of retrieving the cloudflared binaries directly, you locate the sources and build the binary.

We usually do that, so we build all binaries with the go version that ships with our toolchain, we pick a different one only for special cases

However, cloudflared is built with a version of go ‘modified’ by Cloudflare (https://github.com/cloudflare/go), see the Dockerfile: https://github.com/cloudflare/cloudflared/blob/master/Dockerfile So I'm afraid that some of the tunnel's functionality won't work (particularly security functionality, as their version patches the TLS stack).

Are you sure https://github.com/cloudflare/cloudflared/blob/master/Dockerfile#L4 this just seems to use upstream golang image

@frezbo
Copy link
Member

frezbo commented Dec 12, 2024

Are you sure https://github.com/cloudflare/cloudflared/blob/master/Dockerfile#L4 this just seems to use upstream golang image

nevermind, saw the lines after that, in that case I guess we can fallback to pre-built binaries, wdyt @smira

@smira
Copy link
Member

smira commented Dec 12, 2024

Are you sure cloudflare/cloudflared@master/Dockerfile#L4 this just seems to use upstream golang image

nevermind, saw the lines after that, in that case I guess we can fallback to pre-built binaries, wdyt @smira

idk, mixed feelings about that. but I guess if someone runs cloudflared, they already trust their security to Cloudflare, so using upstream binaries is fine.

@maxnrb
Copy link
Contributor Author

maxnrb commented Dec 13, 2024

Hi, so finally ?

@frezbo
Copy link
Member

frezbo commented Dec 14, 2024

Hi, so finally ?

yes, we would use the binaries

@maxnrb
Copy link
Contributor Author

maxnrb commented Dec 14, 2024

Okay, I'll push a fix then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backported
Development

Successfully merging this pull request may close these issues.

None yet

4 participants