fix 证书
This commit is contained in:
parent
958f9009bc
commit
f252e537db
20
Tun/TunDebug.entitlements
Normal file
20
Tun/TunDebug.entitlements
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.developer.networking.networkextension</key>
|
||||
<array>
|
||||
<string>packet-tunnel-provider</string>
|
||||
</array>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.jihe.punchnetmac</string>
|
||||
</array>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -571,7 +571,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = punchnet/punchnet.entitlements;
|
||||
CODE_SIGN_ENTITLEMENTS = punchnet/punchnetDebug.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
@ -591,10 +591,10 @@
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 15.6;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.jihe.punchnetmac.dev;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.jihe.punchnetmac;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = MacPunchnetTestDev;
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = MacPunchnetTest;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
@ -709,7 +709,7 @@
|
||||
C8A77F352DD1E77B00195617 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = Tun/Tun.entitlements;
|
||||
CODE_SIGN_ENTITLEMENTS = Tun/TunDebug.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
@ -728,10 +728,10 @@
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 15.6;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.jihe.punchnetmac.dev.tun;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.jihe.punchnetmac.tun;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = MacPunchnetTunTestDev;
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = MacPunchnetTunTest;
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
||||
@ -37,7 +37,7 @@ struct SystemConfig {
|
||||
.dev: EnvConfig(
|
||||
serverHost: "test.punchsky.com",
|
||||
stunAssistHost: "test.punchsky.com",
|
||||
tunBundleId: "com.jihe.punchnetmac.dev.tun",
|
||||
tunBundleId: "com.jihe.punchnetmac.tun",
|
||||
localizedDescription: "punchnetmac-dev"
|
||||
),
|
||||
.prod: EnvConfig(
|
||||
|
||||
@ -128,11 +128,13 @@ class VPNManager {
|
||||
let env = SystemConfig.getCurrentEnvConfig()
|
||||
|
||||
for manager in managers {
|
||||
guard let protocolConfiguration = manager.protocolConfiguration as? NETunnelProviderProtocol,
|
||||
protocolConfiguration.providerBundleIdentifier == env.tunBundleId else {
|
||||
// guard let protocolConfiguration = manager.protocolConfiguration as? NETunnelProviderProtocol,
|
||||
// protocolConfiguration.providerBundleIdentifier == env.tunBundleId else {
|
||||
// try await manager.removeFromPreferences()
|
||||
// continue
|
||||
// }
|
||||
// TODO Debug
|
||||
try await manager.removeFromPreferences()
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
let managersAfterCleanup = try await NETunnelProviderManager.loadAllFromPreferences()
|
||||
|
||||
28
punchnet/punchnetDebug.entitlements
Normal file
28
punchnet/punchnetDebug.entitlements
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.developer.networking.networkextension</key>
|
||||
<array>
|
||||
<string>packet-tunnel-provider</string>
|
||||
</array>
|
||||
<key>com.apple.developer.networking.vpn.api</key>
|
||||
<array>
|
||||
<string>allow-vpn</string>
|
||||
</array>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.com.jihe.punchnetmac</string>
|
||||
</array>
|
||||
<key>com.apple.security.files.user-selected.read-only</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.server</key>
|
||||
<true/>
|
||||
<key>keychain-access-groups</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
Loading…
x
Reference in New Issue
Block a user