diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-02-12 19:45:27 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-02-19 14:15:07 +0100 |
| commit | 9c848e6cbb3ee5881fd4d894608d8556b2201084 (patch) | |
| tree | 25446e008e860deb2d46dda1ab98d24c15fad7e6 /internal/api/api.go | |
| parent | 74e36f0ead717105f26087c2cab08b41ba5a7ce8 (diff) | |
WireGuard: Latest proxyguard server API changes
wireguard+proxy profile and ProxyEndpoint instead of TCPEndpoint as
proxyguard now uses HTTP for the initial packet
Diffstat (limited to 'internal/api/api.go')
| -rw-r--r-- | internal/api/api.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/api/api.go b/internal/api/api.go index 2268357..b5c56d8 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -221,8 +221,8 @@ func protocolFromCT(ct string) (protocol.Protocol, error) { switch ct { case "application/x-wireguard-profile": return protocol.WireGuard, nil - case "application/x-wireguard+tcp-profile": - return protocol.WireGuardTCP, nil + case "application/x-wireguard+proxy-profile": + return protocol.WireGuardProxy, nil case "application/x-openvpn-profile": return protocol.OpenVPN, nil } @@ -301,7 +301,7 @@ func (a *API) Connect(ctx context.Context, prof profiles.Profile, protos []proto }, nil } - vpnCfg, proxy, err := wireguard.Config(vpnCfg, wgKey, proto == protocol.WireGuardTCP) + vpnCfg, proxy, err := wireguard.Config(vpnCfg, wgKey, proto == protocol.WireGuardProxy) if err != nil { return nil, err } |
