mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add server flag to force DERP to use always websockets (#9238)
This commit is contained in:
@@ -31,7 +31,7 @@ func TestNetcheck(t *testing.T) {
|
||||
require.NoError(t, json.Unmarshal(b, &report))
|
||||
|
||||
assert.True(t, report.Healthy)
|
||||
require.Len(t, report.Regions, 1+5) // 1 built-in region + 5 STUN regions by default
|
||||
require.Len(t, report.Regions, 1+1) // 1 built-in region + 1 test-managed STUN region
|
||||
for _, v := range report.Regions {
|
||||
require.Len(t, v.NodeReports, len(v.Region.Nodes))
|
||||
}
|
||||
|
||||
+7
@@ -172,6 +172,13 @@ backed by Tailscale and WireGuard.
|
||||
URL to fetch a DERP mapping on startup. See:
|
||||
https://tailscale.com/kb/1118/custom-derp-servers/.
|
||||
|
||||
--derp-force-websockets bool, $CODER_DERP_FORCE_WEBSOCKETS
|
||||
Force clients and agents to always use WebSocket to connect to DERP
|
||||
relay servers. By default, DERP uses `Upgrade: derp`, which may cause
|
||||
issues with some reverse proxies. Clients may automatically fallback
|
||||
to WebSocket if they detect an issue with `Upgrade: derp`, but this
|
||||
does not work in all situations.
|
||||
|
||||
--derp-server-enable bool, $CODER_DERP_SERVER_ENABLE (default: true)
|
||||
Whether to enable or disable the embedded DERP relay server.
|
||||
|
||||
|
||||
+6
@@ -136,6 +136,12 @@ networking:
|
||||
# this change has been made, but new connections will still be proxied regardless.
|
||||
# (default: <unset>, type: bool)
|
||||
blockDirect: false
|
||||
# Force clients and agents to always use WebSocket to connect to DERP relay
|
||||
# servers. By default, DERP uses `Upgrade: derp`, which may cause issues with some
|
||||
# reverse proxies. Clients may automatically fallback to WebSocket if they detect
|
||||
# an issue with `Upgrade: derp`, but this does not work in all situations.
|
||||
# (default: <unset>, type: bool)
|
||||
forceWebSockets: false
|
||||
# URL to fetch a DERP mapping on startup. See:
|
||||
# https://tailscale.com/kb/1118/custom-derp-servers/.
|
||||
# (default: <unset>, type: string)
|
||||
|
||||
Reference in New Issue
Block a user