Skip to content

Commit 49e5d6c

Browse files
authored
Bump Network Extension Version (#227)
* macos: improve logging * macos: bump network extension version
1 parent cb83481 commit 49e5d6c

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

mitmproxy-macos/redirector/macos-redirector.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@
437437
"$(inherited)",
438438
"@executable_path/../Frameworks",
439439
);
440-
MARKETING_VERSION = 1.0;
440+
MARKETING_VERSION = 2.0;
441441
PRODUCT_BUNDLE_IDENTIFIER = "org.mitmproxy.macos-redirector";
442442
PRODUCT_NAME = "Mitmproxy Redirector";
443443
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -472,7 +472,7 @@
472472
"$(inherited)",
473473
"@executable_path/../Frameworks",
474474
);
475-
MARKETING_VERSION = 1.0;
475+
MARKETING_VERSION = 2.0;
476476
PRODUCT_BUNDLE_IDENTIFIER = "org.mitmproxy.macos-redirector";
477477
PRODUCT_NAME = "Mitmproxy Redirector";
478478
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -502,7 +502,7 @@
502502
"@executable_path/../Frameworks",
503503
"@executable_path/../../../../Frameworks",
504504
);
505-
MARKETING_VERSION = 1.0;
505+
MARKETING_VERSION = 2.0;
506506
PRODUCT_BUNDLE_IDENTIFIER = "org.mitmproxy.macos-redirector.network-extension";
507507
PRODUCT_NAME = "$(inherited)";
508508
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -534,7 +534,7 @@
534534
"@executable_path/../Frameworks",
535535
"@executable_path/../../../../Frameworks",
536536
);
537-
MARKETING_VERSION = 1.0;
537+
MARKETING_VERSION = 2.0;
538538
PRODUCT_BUNDLE_IDENTIFIER = "org.mitmproxy.macos-redirector.network-extension";
539539
PRODUCT_NAME = "$(inherited)";
540540
PROVISIONING_PROFILE_SPECIFIER = "";

mitmproxy-macos/redirector/macos-redirector/app.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ let networkExtensionIdentifier = "org.mitmproxy.macos-redirector.network-extensi
1111
@main
1212
struct App {
1313
static func main() async throws {
14-
log.debug("app starting with \(CommandLine.arguments, privacy: .public)")
14+
let version = Bundle.main.infoDictionary!["CFBundleShortVersionString"] as! String
15+
log.debug("starting mitmproxy redirector app \(version, privacy: .public) with \(CommandLine.arguments, privacy: .public)")
1516

1617
if #unavailable(macOS 12.0) {
1718
exitModal("This application only works on macOS 12 or above.")
@@ -65,7 +66,7 @@ class SystemExtensionInstaller: NSObject, OSSystemExtensionRequestDelegate {
6566
actionForReplacingExtension existing: OSSystemExtensionProperties,
6667
withExtension ext: OSSystemExtensionProperties
6768
) -> OSSystemExtensionRequest.ReplacementAction {
68-
log.debug("requesting to replace existing network extension")
69+
log.debug("requesting to replace existing network extension \(existing.bundleShortVersion, privacy: .public) with \(ext.bundleShortVersion, privacy: .public)")
6970
return .replace
7071
}
7172

@@ -74,15 +75,15 @@ class SystemExtensionInstaller: NSObject, OSSystemExtensionRequestDelegate {
7475
}
7576

7677
func request(_ request: OSSystemExtensionRequest, didFailWithError error: Error) {
77-
log.debug("system extension install failed: \(error)")
78+
log.debug("system extension install failed: \(error, privacy: .public)")
7879
continuation?.resume(throwing: error)
7980
}
8081

8182
func request(
8283
_ request: OSSystemExtensionRequest,
8384
didFinishWithResult result: OSSystemExtensionRequest.Result
8485
) {
85-
log.debug("system extension install succeeded: {} \(result.rawValue)")
86+
log.debug("system extension install succeeded: {} \(result.rawValue, privacy: .public)")
8687
continuation?.resume()
8788
}
8889
}

mitmproxy-macos/redirector/network-extension/main.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ let log = Logger(subsystem: "org.mitmproxy.macos-redirector", category: "extensi
66
let networkExtensionIdentifier = "org.mitmproxy.macos-redirector.network-extension"
77

88
autoreleasepool {
9-
log.error("starting system extension")
9+
let version = Bundle.main.infoDictionary!["CFBundleShortVersionString"] as! String
10+
log.error("starting mitmproxy redirector \(version, privacy: .public) system extension")
1011
log.debug("debug-level logging active")
1112
NEProvider.startSystemExtensionMode()
1213
}

0 commit comments

Comments
 (0)