Commit Graph

1786 Commits

Author SHA1 Message Date
João "Pisco" Fernandes 2b456b9a79 TUN-9954: Update from go1.24.6 to go1.24.9 2025-10-23 10:54:18 +01:00
Gonçalo Garcia 3a71c1bcd8 TUN-9941: Lookup correct key for RPM signature
* TUN-9941: Lookup correct key for RPM signature

Closes TUN-9941
2025-10-21 15:51:57 +00:00
Gonçalo Garcia 95642486c6 TUN-9941: Fix typo causing r2-release-next deployment to fail
* TUN-9941: Fix typo causing r2-release-next deployment to fail

Closes TUN-9941
2025-10-21 13:11:33 +00:00
Gonçalo Garcia 691550a6f2 TUN-9941: Use new GPG key for RPM builds
* TUN-9941: Use new GPG key for RPM builds

Closes TUN-9941
2025-10-21 09:57:22 +00:00
chungthuang 12c2a8e144 TUN-9916: Fix the cloudflared binary path used in the component test 2025-10-15 14:34:54 +00:00
Gonçalo Garcia d943602d21 TUN-9919: Make RPM postinstall scriplet idempotent
* TUN-9919: Make RPM postinstall scriplet idempotent

Before this commit the postinstall scriptlet isn't idempotent, meaning the users see this error in their upgrade logs:

`ln: failed to create symbolic link '/usr/local/bin/cloudflared': File exists
warning: %post(cloudflared-2025.10.0-1.x86_64) scriptlet failed, exit status 1`

This doesn't break the upgrade (which is why we haven't touched this in 5 years), but adding the -f (force) flag to the symlink command prevents this issue from happening

Closes TUN-9919
2025-10-15 14:33:43 +00:00
Devin Carr e10e072599 Release 2025.10.0 2025-10-14 09:16:36 -07:00
Gonçalo Garcia 686347cf91 chore: Fix upload of RPM repo file during double signing
* chore: Fix upload of RPM repo file during double signing

This commit fixes a variable that was supposed to hold the path of the repo file, but instead was being overwritten with the repo file handle
2025-10-14 09:12:54 +00:00
Devin Carr f45b3a1baf TUN-9882: Bump datagram v3 write channel capacity
Bumping from 16 to 512 gives each flow a bit more buffer if the local OS is having trouble writing to the origin.

Closes TUN-9882
2025-10-13 17:18:22 -07:00
Devin Carr 1ac6c45dad TUN-9883: Add new datagram v3 feature flag
After the previous rollout was reverted, the original `support_datagram_v3_1` is deprecated and replaced with
`support_datagram_v3_2`.

Closes TUN-9883
2025-10-10 13:55:31 -07:00
Gonçalo Garcia d78e64c8cc chore: Fix parameter order when uploading RPM .repo file to R2
* chore: Fix parameter order when uploading RPM .repo file to R2
2025-10-10 15:44:28 +00:00
Gonçalo Garcia 7987d01a6e chore: Fix import of GPG keys when two keys are provided
* chore: Fix import of GPG keys when two keys are provided

We were only retrieving the first output of gpg.list keys because previously we were only running import_gpg_keys once. Now that we run it twice we need to ensure that the key we select from the list matches the one we've imported.
2025-10-10 07:58:55 +00:00
Gonçalo Garcia e1dacbcea8 chore: Force usage of go-boring 1.24
* chore: Force usage of go-boring 1.24
2025-10-09 13:18:29 +00:00
Devin Carr 1cc15c6ffa TUN-9882: Improve metrics for datagram v3
Adds new metrics for:
- Dropped UDP datagrams for reads and write paths
- Dropped ICMP packets for write paths
- Failures that preemptively close UDP flows

Closes TUN-9882
2025-10-08 12:17:23 -07:00
Devin Carr 51c5ef726c TUN-9882: Add write deadline for UDP origin writes
Add a deadline for origin writes as a preventative measure in the case that the kernel blocks any writes for too long.
In the case that the socket exceeds the write deadline, the datagram will be dropped.

Closes TUN-9882
2025-10-07 19:54:42 -07:00
Devin Carr 1fb466941a TUN-9882: Add buffers for UDP and ICMP datagrams in datagram v3
Instead of creating a go routine to process each incoming datagram from the tunnel, a single consumer (the demuxer) will
process each of the datagrams in serial.

Registration datagrams will still be spun out into separate go routines since they are responsible for managing the
lifetime of the session once started via the `Serve` method.

UDP payload datagrams will be handled in separate channels to allow for parallel writing inside of the scope of a
session via a new write loop. This channel will have a small buffer to help unblock the demuxer from dequeueing other
datagrams.

ICMP datagrams will be funneled into a single channel across all possible origins with a single consumer to write to
their respective destinations.

Each of these changes is to prevent datagram reordering from occurring when dequeuing from the tunnel connection. By
establishing a single demuxer that serializes the writes per session, each session will be able to write sequentially,
but in parallel to their respective origins.

Closes TUN-9882
2025-10-07 16:14:01 -07:00
João Oliveirinha fff1fc7390 GRC-16749: Add fedramp tags to catalog
* GRC-16749: Add fedramp tags to catalog
2025-10-07 11:27:41 +00:00
Gonçalo Garcia 9551f2a381 TUN-9776: Support signing Debian packages with two keys for rollover
* TUN-9776: Support signing Debian packages with two keys for rollover

Debian Trixie doesn't support the SHA-1 algo for GPG keys.

This commit leverages the ability of providing two keys in the reprepro configuration in order to have two signatures in InRelease and Release.gpg files.

This allows users that have the old key to continue fetching the binaries with the old key while allowing us to provide a new key that can be used in Trixie.

Unfortunately current versions of RPM (since 2002) don't support double signing, so we can't apply the same logic for RPM

Closes TUN-9776
2025-09-29 14:48:12 +00:00
João "Pisco" Fernandes 71448c1f7f TUN-9800: Add pipeline to sync between gitlab and github repos 2025-09-22 16:34:33 +01:00
João "Pisco" Fernandes 80b1634515 Release 2025.9.1 2025-09-22 13:02:11 +01:00
João "Pisco" Fernandes 4ac0c1f2d7 TUN-9852: Remove fmt.Println from cloudflared access command 2025-09-22 12:01:48 +01:00
João "Pisco" Fernandes 4dafc15f22 TUN-9855: Create script to ignore vulnerabilities from govuln check 2025-09-22 12:01:38 +01:00
João "Pisco" Fernandes 92ef55650f Release 2025.9.0 2025-09-17 17:29:52 +01:00
Gonçalo Garcia 9e94122d2b TUN-9820: Add support for FedRAMP in originRequest Access config
* TUN-9820: Add support for FedRAMP in originRequest Access config

Closes TUN-9820
2025-09-15 11:11:23 +00:00
João "Pisco" Fernandes 173396be90 TUN-9800: Migrate cloudflared-ci pipelines to Gitlab CI
## Summary

This commit migrates the cloduflared ci pipelines, that built, tested and component tested the linux binaries to gitlab ci.

The only thing that is remaining to move from teamcity to gitlab are now the release pipelines that run on master.

Relates to TUN-9800
2025-09-11 11:33:24 +01:00
João "Pisco" Fernandes d9e13ab2ab TUN-9803: Add windows builds to gitlab-ci 2025-09-10 11:23:41 +01:00
Gonçalo Garcia 9e6d58aaea TUN-9755: Set endpoint in tunnel credentials when generating locally managed tunnel with a Fed token
* TUN-9755: Set endpoint in tunnel credentials when generating locally managed tunnel with a Fed token

Closes TUN-9755
2025-08-27 15:57:58 +00:00
João "Pisco" Fernandes f9c2bd51ae Release 2025.8.1 2025-08-21 10:53:31 +01:00
Devin Carr 41dffd7f3c CUSTESC-53681: Correct QUIC connection management for datagram handlers
Corrects the pattern of using errgroup's and context cancellation to simplify the logic for canceling extra routines for the QUIC connection. This is because the extra context cancellation is redundant with the fact that the errgroup also cancels it's own provided context when a routine returns (error or not).

For the datagram handler specifically, since it can respond faster to a context cancellation from the QUIC connection, we wrap the error before surfacing it outside of the QUIC connection scope to the supervisor. Additionally, the supervisor will look for this error type to check if it should retry the QUIC connection. These two operations are required because the supervisor does not look for a context canceled error when deciding to retry a connection. If a context canceled from the datagram handler were to be returned up to the supervisor on the initial connection, the cloudflared application would exit. We want to ensure that cloudflared maintains connection attempts even if any of the services on-top of a QUIC connection fail (datagram handler in this case).

Additional logging is also introduced along these paths to help with understanding the error conditions from the specific handlers on-top of a QUIC connection.

Related CUSTESC-53681

Closes TUN-9610
2025-08-19 16:10:00 -07:00
Kyle Hiller 8825ceecb5 AUTH-7480 update fed callback url for login helper
* AUTH-7480 update fed callback url for login helper
2025-08-19 18:54:31 +00:00
Kevin Marshall 50104548cf AUTH-7260: Add support for login interstitial auto closure
Adds a switch `--auto-close` which automatically closes Access login interstitial windows/tabs immediately after the user chooses Approve or Deny.
2025-08-12 20:41:12 +00:00
GoncaloGarcia 08efe4c103 Release 2025.8.0 2025-08-08 15:07:54 +01:00
João "Pisco" Fernandes 6c3df26b3c vuln: Fix GO-2025-3770 vulnerability 2025-08-07 16:40:53 +01:00
Luis Neto 1cedefa1c2 TUN-9583: set proper url and hostname for cloudflared tail command
This commit adds support for FedRAMP environments. Cloudflared will
now dynamically configure the management hostname and API URL, switching 
to FedRAMP-specific values like `management.fed.argotunnel.com` and `https://api.fed.cloudflare.com/client/v4`
when a FedRAMP endpoint is detected.

Key to this is an enhanced `ParseToken` function, which now includes an `IsFed()`
method to determine if a management token's issuer is `fed-tunnelstore`. This allows
cloudflared to correctly identify and operate within a FedRAMP context, ensuring 
proper connectivity.

Closes TUN-9583
2025-07-23 20:09:50 +01:00
João "Pisco" Fernandes ddf4e6d854 TUN-9542: Remove unsupported Debian-based releases
## Summary
This commit removes configurations and references for Debian-based releases that are no longer supported in the build and packaging processes.
For Ubuntu versions for most of them only PRO users still have support, so we might decide remove some of them as well. Information available in:
- Debian Releases: https://wiki.debian.org/LTS (we no longer support bullseye at Cloudflare)
- Ubuntu Releases: https://ubuntu.com/about/release-cycle

Closes TUN-9542
2025-07-07 11:56:02 +01:00
João "Pisco" Fernandes 8e7955ae89 Release 2025.7.0 2025-07-03 17:14:44 +01:00
João "Pisco" Fernandes ae197908be TUN-9540: Use numeric user id for Dockerfiles
## Summary
This commit changes the USER instruction in our Dockerfiles from using
the string "nonroot" to its numeric ID "65532".

This change is necessary because Kubernetes does not support string-based
user IDs in security contexts, requiring numeric IDs instead. The nonroot
user maps to 65532 in distroless images.
2025-07-03 11:31:04 +01:00
Devin Carr 6ec699509d TUN-9511: Add metrics for virtual DNS origin
Closes TUN-9511
2025-07-01 13:26:34 -07:00
João "Pisco" Fernandes 242fccefa4 TUN-9531: Bump go-boring from 1.24.2 to 1.24.4 2025-07-01 12:25:34 +01:00
Luis Neto d0a6318334 TUN-9161: Remove P256Kyber768Draft00PQKex curve from nonFips curve preferences
Remove P256Kyber768Draft00PQKex curve from nonFips curve preferences and add tests to verify that the advertised curves are the same as the curve preferences we set.

Closes TUN-9161
2025-07-01 12:24:59 +01:00
Devin Carr 398da8860f TUN-9473: Add --dns-resolver-addrs flag
To help support users with environments that don't work well with the
DNS local resolver's automatic resolution process for local resolver
addresses, we introduce a flag to provide them statically to the
runtime. When providing the resolver addresses, cloudflared will no
longer lookup the DNS resolver addresses and use the user input
directly.

When provided with a list of DNS resolvers larger than one, the resolver
service will randomly select one at random for each incoming request.

Closes TUN-9473
2025-06-30 15:20:32 -07:00
Devin Carr 70ed7ffc5f TUN-9470: Add OriginDialerService to include TCP
Adds an OriginDialerService that takes over the roles of both DialUDP and DialTCP 
towards the origin. This provides the possibility to leverage dialer "middleware"
to inject virtual origins, such as the DNS resolver service.

DNS Resolver service also gains access to the DialTCP operation to service TCP
DNS requests.

Minor refactoring includes changes to remove the needs previously provided by
the warp-routing configuration. This configuration cannot be disabled by cloudflared
so many of the references have been adjusted or removed.

Closes TUN-9470
2025-06-30 13:24:16 -07:00
Devin Carr 9ca8b41cf7 TUN-9472: Add virtual DNS service
Adds a new reserved service to route UDP requests towards the local DNS
resolver.

Closes TUN-9472
2025-06-27 13:09:29 -07:00
Devin Carr b4a98b13fe TUN-9469: Centralize UDP origin proxy dialing as ingress service
Introduces a new `UDPOriginProxy` interface and `UDPOriginService`
to standardize how UDP connections are dialed to origins. Allows for
future overrides of the ingress service for specific dial destinations.

Simplifies dependency injection for UDP dialing throughout both datagram
v2 and v3 by using the same ingress service. Previous invocations called
into a DialUDP function in the ingress package that was a light
wrapper over `net.DialUDP`. Now a reference is passed into both datagram
controllers that allows more control over the DialUDP method.

Closes TUN-9469
2025-06-23 18:01:15 +00:00
João "Pisco" Fernandes 64fdc52855 Release 2025.6.1 2025-06-17 10:42:18 +01:00
Devin Carr a65da54933 TUN-9371: Add logging format as JSON
Closes TUN-9371
2025-06-16 21:25:13 +00:00
João "Pisco" Fernandes 43a3ba347b TUN-9495: Remove references to cloudflare-go
## Summary
When bumping cloudflared to use go1.24, we no longer need cloudflare-go,
since most of the PQ and FIPS compliant curves are already available in go 1.24.
Therefore, we can remove everything related with installing our go toolchain.
2025-06-16 14:51:22 +00:00
João Oliveirinha 47085ee0c9 TUN-9467: add vulncheck to cloudflared
* TUN-9467: add vulncheck to cloudflared
2025-06-16 14:50:28 +00:00
João Oliveirinha a408612f26 TUN-9467: bump coredns to solve CVE
* TUN-9467: bump coredns to solve CVE
2025-06-12 10:46:10 +00:00
João "Pisco" Fernandes f8d12c9d39 Release 2025.6.0 2025-06-11 10:51:37 +01:00