cloudflared-mirror/connection
Devin Carr 92e0f5fcf9 TUN-8688: Correct UDP bind for IPv6 edge connectivity on macOS
For macOS, we want to set the DF bit for the UDP packets used by the QUIC
connection; to achieve this, you need to explicitly set the network
to either "udp4" or "udp6". When determining which network type to pick
we need to use the edge IP address chosen to align with what the local
IP family interface we will use. This means we want cloudflared to bind
to local interfaces for a random port, so we provide a zero IP and 0 port
number (ex. 0.0.0.0:0). However, instead of providing the zero IP, we
can leave the value as nil and let the kernel decide which interface and
pick a random port as defined by the target edge IP family.

This was previously broken for IPv6-only edge connectivity on macOS and
all other operating systems should be unaffected because the network type
was left as default "udp" which will rely on the provided local or remote
IP for selection.

Closes TUN-8688
2024-10-18 14:38:05 -07:00
..
connection.go TUN-8424: Refactor capnp registration server 2024-05-24 11:40:10 -07:00
connection_test.go TUN-7558: Flush on Writes for StreamBasedOriginProxy 2023-07-06 14:22:29 +00:00
control.go TUN-8621: Prevent QUIC connection from closing before grace period after unregistering 2024-10-07 10:51:21 -05:00
errors.go chore: Remove h2mux code 2024-10-15 13:10:30 -07:00
event.go TUN-6617: Dont fallback to http2 if QUIC conn was successful. 2022-08-12 08:40:03 +00:00
header.go chore: Remove h2mux code 2024-10-15 13:10:30 -07:00
header_test.go chore: Remove h2mux code 2024-10-15 13:10:30 -07:00
http2.go chore: Remove h2mux code 2024-10-15 13:10:30 -07:00
http2_test.go TUN-8621: Prevent QUIC connection from closing before grace period after unregistering 2024-10-07 10:51:21 -05:00
json.go TUN-3467: Serialize cf-cloudflared-response-meta during package initialization using jsoniter 2020-11-11 15:11:42 +00:00
metrics.go chore: Remove h2mux code 2024-10-15 13:10:30 -07:00
observer.go TUN-7131: Add cloudflared log event to connection messages and enable streaming logs 2023-04-12 14:41:11 -07:00
observer_test.go TUN-6583: Remove legacy --ui flag 2022-07-20 16:17:29 -07:00
protocol.go chore: Remove h2mux code 2024-10-15 13:10:30 -07:00
protocol_test.go TUN-6938: Force h2mux protocol to http2 for named tunnels 2023-02-06 11:06:02 -08:00
quic.go TUN-8688: Correct UDP bind for IPv6 edge connectivity on macOS 2024-10-18 14:38:05 -07:00
quic_test.go TUN-8688: Correct UDP bind for IPv6 edge connectivity on macOS 2024-10-18 14:38:05 -07:00
tunnelsforha.go TUN-3471: Add structured log context to logs 2021-01-05 20:21:16 +00:00