From 5fc21ca40dabf6873fe04ab788d675330512af4d Mon Sep 17 00:00:00 2001 From: Amir Mohammadi Date: Thu, 11 Jan 2024 15:10:26 +0330 Subject: [PATCH] better fix for vpn connecting --- .../xcschemes/SingBoxPacketTunnel.xcscheme | 96 +++++++++++++++++++ ios/Runner/VPN/VPNManager.swift | 2 +- 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 ios/Runner.xcodeproj/xcshareddata/xcschemes/SingBoxPacketTunnel.xcscheme diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/SingBoxPacketTunnel.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/SingBoxPacketTunnel.xcscheme new file mode 100644 index 000000000..616e8f4a4 --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/SingBoxPacketTunnel.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/VPN/VPNManager.swift b/ios/Runner/VPN/VPNManager.swift index 323485b84..0146459a8 100644 --- a/ios/Runner/VPN/VPNManager.swift +++ b/ios/Runner/VPN/VPNManager.swift @@ -94,7 +94,7 @@ class VPNManager: ObservableObject { } let newManager = NETunnelProviderManager() let `protocol` = NETunnelProviderProtocol() - `protocol`.providerBundleIdentifier = "\(Bundle.main.baseBundleIdentifier).SingBoxPacketTunnel" + `protocol`.providerBundleIdentifier = "com.hiddify.ios.SingBoxPacketTunnel" `protocol`.serverAddress = "localhost" newManager.protocolConfiguration = `protocol` newManager.localizedDescription = "Hiddify"