Skip to content

feat(netbird): expose the relay QUIC listener - #76

Open
codechirag5610 wants to merge 1 commit into
netbirdio:mainfrom
codechirag5610:fix/relay-quic
Open

codechirag5610 wants to merge 1 commit into
netbirdio:mainfrom
codechirag5610:fix/relay-quic

Conversation

@codechirag5610

Copy link
Copy Markdown

Closes #21.

Problem

The relay binds a QUIC listener to the same address as its WebSocket listener, over UDP (newListeners). The chart's relay Service carries only the TCP port, so peers can never reach QUIC — the issue's "chart exports only http port for WebSocket".

The listener is conditional upstream: ServerQUICTLSConfig needs a TLS config, so the relay starts QUIC only when it terminates TLS itself. Behind a TLS-terminating proxy it logs Not starting QUIC listener and serves WebSocket alone.

Change

backend.split.relay.service.quic.enabled (default false) adds a quic UDP port to the relay Service on service.port, plus the matching container port. Because the exposure is only useful when the relay really listens, the render fails when QUIC is enabled without config.tls or config.letsencrypt.domains, rather than publishing a port nothing is bound to.

backend:
  split:
    relay:
      config:
        tls: { certFile: /tls/tls.crt, keyFile: /tls/tls.key }
      service:
        type: LoadBalancer
        quic:
          enabled: true

A Service carrying TCP and UDP on one port needs Kubernetes 1.26+ for LoadBalancer.

Tests

  • New render.sh check 24: no UDP port by default; enabling QUIC without relay TLS fails the render; with TLS the Service gets name: quic / protocol: UDP on the WebSocket port and the deployment gets the UDP container port.
  • helm lint --strict, both render.sh suites, all seven example renders and kubeconform pass.
  • Verified on a kind cluster (k8s 1.37). With config.tls set, the relay logs both listeners on one port:
    relay/server/listener/ws/listener.go:64: WS server listening address: :33080
    relay/server/listener/quic/listener.go:39: QUIC server listening on address: :33080
    
    Without TLS the same image logs Not starting QUIC listener: valid TLS config is required for QUIC listener, which is what the guard prevents you from shipping a dead UDP port into. The API server accepted the mixed-protocol Service as both ClusterIP and LoadBalancer.

Supersedes nothing, but it overlaps the tail of tests/render.sh with my #73 and #19 branches; whichever merges later needs its check renumbered.

The relay binds QUIC to its WebSocket port over UDP, but the chart's
Service carried only the TCP port, so peers could never reach it.

backend.split.relay.service.quic.enabled adds the UDP port to the
Service and the matching container port. The relay starts the QUIC
listener only when it terminates TLS itself, so the render fails when
neither config.tls nor config.letsencrypt.domains is set, rather than
publishing a port nothing listens on.

Closes netbirdio#21

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d17f506-572f-4bd1-b04f-8c1596e4a7f4
Commits

Reviewing files that changed from the base of the PR and between 838d587 and 9908f1d.

Files selected for processing: 5

  • charts/netbird/docs/configuration.md
  • charts/netbird/templates/split/relay/deployment.yaml
  • charts/netbird/templates/split/relay/service.yaml
  • charts/netbird/tests/render.sh
  • charts/netbird/values.yaml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codechirag5610

Copy link
Copy Markdown
Author

Ran the repository's own e2e suite against this branch, since the workflows here are waiting on approval:

go test -tags e2e ./netbird/... -count 1 -timeout 30m
ok  github.com/netbirdio/helms/e2e/netbird

Real peers connected through the chart as usual, and the suite cleaned up after itself. helm lint --strict, charts/netbird/tests/render.sh and charts/netbird-ee/tests/render.sh — the three steps of Test netbird Chart — pass too.

This branch has not been deployed

No deployments
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.

relay expose port for quic

1 participant