From 101470d17c2a6a4e5f6d9772f5062defed9e9557 Mon Sep 17 00:00:00 2001 From: Conrad Kramer Date: Sat, 13 May 2023 12:20:10 -0400 Subject: [PATCH] Fix requesting VPN permission on macOS The protocol configuration is copied when set, so it should be set after it is configured --- Apple/App/Tunnel.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Apple/App/Tunnel.swift b/Apple/App/Tunnel.swift index e782eff..ae185a4 100644 --- a/Apple/App/Tunnel.swift +++ b/Apple/App/Tunnel.swift @@ -91,9 +91,9 @@ class Tunnel: ObservableObject { let manager = NETunnelProviderManager() let proto = NETunnelProviderProtocol() proto.providerBundleIdentifier = bundleIdentifier - manager.protocolConfiguration = proto - configure(manager, proto) + + manager.protocolConfiguration = proto try await manager.save() } }