summaryrefslogtreecommitdiff
path: root/internal/api/api.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2024-02-07 14:51:34 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2024-02-19 14:15:07 +0100
commit272f35f3fb35c30d3fcdb523dc38b87a78064520 (patch)
tree779cbe34cbdc49ab1aa1e00f36f1829f37ac4399 /internal/api/api.go
parentf5b78280f951999be7fbd3016894c1e9b4e47a95 (diff)
API: Include regular wireguard profile even when prefer TCP is true
Otherwise breaks servers that only have wireguard support and we pass prefer tcp
Diffstat (limited to 'internal/api/api.go')
-rw-r--r--internal/api/api.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/api/api.go b/internal/api/api.go
index c9f0408..a9ea0c0 100644
--- a/internal/api/api.go
+++ b/internal/api/api.go
@@ -246,9 +246,7 @@ func (a *API) Connect(ctx context.Context, prof profiles.Profile, protos []proto
// Set the public key
pubkey := wgKey.PublicKey()
uv.Set("public_key", pubkey.String())
- if !pTCP {
- hdrs.Add("accept", "application/x-wireguard-profile")
- }
+ hdrs.Add("accept", "application/x-wireguard-profile")
hdrs.Add("accept", "application/x-wireguard+tcp-profile")
case protocol.OpenVPN:
hdrs.Add("accept", "application/x-openvpn-profile")