Force Proxy to any Windows/MacOS/Linux Application TCP and UDP traffic
C ccybersecurityhttp3httpproxylinuxlinux-proxymacosmacos-appmacos-proxyproxifierproxifier-alternativeproxyclienttcpthick-clientudpwindivertwindows
initial macos extension #10
Sourav Kalalaa9ed49e228e
diff --git a/.gitignore b/.gitignoreindex df5061b..2415dd2 100644--- a/.gitignore+++ b/.gitignore@@ -1,3 +1,5 @@+## Windows+*.exe*.dll*.sys@@ -11,5 +13,65 @@ Windows/cli/bin/**Windows/cli/obj/**.vscode/**Windows/output/ProxyBridge_CLI.pdb++## macOS / Xcode / Swift++# Xcode+xcuserdata/+*.xcscmblueprint+*.xccheckout+*.moved-aside+DerivedData/+*.hmap+*.ipa+*.dSYM.zip+*.dSYM++# CocoaPods+Pods/+*.xcworkspace+!default.xcworkspace++# Carthage+Carthage/Build/++# Swift Package Manager+.build/+.swiftpm/+Package.resolved++# Playgrounds+timeline.xctimeline+playground.xcworkspace++# Swift+*.swp+*~.nib+*.swiftdoc+*.swiftmodule++# macOS+.DS_Store+.AppleDouble+.LSOverride++# Thumbnails+._*++# Files that might appear in the root of a volume+.DocumentRevisions-V100+.fseventsd+.Spotlight-V100+.TemporaryItems+.Trashes+.VolumeIcon.icns+.com.apple.timemachine.donotpresent++# Directories potentially created on remote AFP share+.AppleDB+.AppleDesktop+Network Trash Folder+Temporary Items+.apdisk+Linux/**-MacOS/**\ No newline at end of filediff --git a/MacOS/ProxyBridge/ProxyBridge.xcodeproj/project.pbxproj b/MacOS/ProxyBridge/ProxyBridge.xcodeproj/project.pbxprojnew file mode 100644index 0000000..2f9ee49--- /dev/null+++ b/MacOS/ProxyBridge/ProxyBridge.xcodeproj/project.pbxproj@@ -0,0 +1,577 @@+// !$*UTF8*$!+{+ archiveVersion = 1;+ classes = {+ };+ objectVersion = 77;+ objects = {++/* Begin PBXBuildFile section */+ 8466A1E92EC63C5600A8C2E5 /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8466A1E82EC63C5600A8C2E5 /* NetworkExtension.framework */; };+ 8466A1F32EC63C5600A8C2E5 /* com.interceptsuite.ProxyBridge.extension.systemextension in Embed System Extensions */ = {isa = PBXBuildFile; fileRef = 8466A1E62EC63C5600A8C2E5 /* com.interceptsuite.ProxyBridge.extension.systemextension */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };+/* End PBXBuildFile section */++/* Begin PBXContainerItemProxy section */+ 8466A1F12EC63C5600A8C2E5 /* PBXContainerItemProxy */ = {+ isa = PBXContainerItemProxy;+ containerPortal = 8466A1CB2EC63B9400A8C2E5 /* Project object */;+ proxyType = 1;+ remoteGlobalIDString = 8466A1E52EC63C5600A8C2E5;+ remoteInfo = extension;+ };+/* End PBXContainerItemProxy section */++/* Begin PBXCopyFilesBuildPhase section */+ 8466A1F82EC63C5600A8C2E5 /* Embed System Extensions */ = {+ isa = PBXCopyFilesBuildPhase;+ buildActionMask = 2147483647;+ dstPath = "$(SYSTEM_EXTENSIONS_FOLDER_PATH)";+ dstSubfolderSpec = 16;+ files = (+ 8466A1F32EC63C5600A8C2E5 /* com.interceptsuite.ProxyBridge.extension.systemextension in Embed System Extensions */,+ );+ name = "Embed System Extensions";+ runOnlyForDeploymentPostprocessing = 0;+ };+/* End PBXCopyFilesBuildPhase section */++/* Begin PBXFileReference section */+ 8466A1D32EC63B9400A8C2E5 /* ProxyBridge.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProxyBridge.app; sourceTree = BUILT_PRODUCTS_DIR; };+ 8466A1E62EC63C5600A8C2E5 /* com.interceptsuite.ProxyBridge.extension.systemextension */ = {isa = PBXFileReference; explicitFileType = "wrapper.system-extension"; includeInIndex = 0; path = com.interceptsuite.ProxyBridge.extension.systemextension; sourceTree = BUILT_PRODUCTS_DIR; };+ 8466A1E82EC63C5600A8C2E5 /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; };+/* End PBXFileReference section */++/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */+ 8466A1F42EC63C5600A8C2E5 /* Exceptions for "extension" folder in "extension" target */ = {+ isa = PBXFileSystemSynchronizedBuildFileExceptionSet;+ membershipExceptions = (+ Info.plist,+ );+ target = 8466A1E52EC63C5600A8C2E5 /* extension */;+ };+/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */++/* Begin PBXFileSystemSynchronizedRootGroup section */+ 8466A1D52EC63B9400A8C2E5 /* ProxyBridge */ = {+ isa = PBXFileSystemSynchronizedRootGroup;+ path = ProxyBridge;+ sourceTree = "<group>";+ };+ 8466A1EA2EC63C5600A8C2E5 /* extension */ = {+ isa = PBXFileSystemSynchronizedRootGroup;+ exceptions = (+ 8466A1F42EC63C5600A8C2E5 /* Exceptions for "extension" folder in "extension" target */,+ );+ path = extension;+ sourceTree = "<group>";+ };+/* End PBXFileSystemSynchronizedRootGroup section */++/* Begin PBXFrameworksBuildPhase section */+ 8466A1D02EC63B9400A8C2E5 /* Frameworks */ = {+ isa = PBXFrameworksBuildPhase;+ buildActionMask = 2147483647;+ files = (+ );+ runOnlyForDeploymentPostprocessing = 0;+ };+ 8466A1E32EC63C5600A8C2E5 /* Frameworks */ = {+ isa = PBXFrameworksBuildPhase;+ buildActionMask = 2147483647;+ files = (+ 8466A1E92EC63C5600A8C2E5 /* NetworkExtension.framework in Frameworks */,+ );+ runOnlyForDeploymentPostprocessing = 0;+ };+/* End PBXFrameworksBuildPhase section */++/* Begin PBXGroup section */+ 8466A1CA2EC63B9400A8C2E5 = {+ isa = PBXGroup;+ children = (+ 8466A1D52EC63B9400A8C2E5 /* ProxyBridge */,+ 8466A1EA2EC63C5600A8C2E5 /* extension */,+ 8466A1E72EC63C5600A8C2E5 /* Frameworks */,+ 8466A1D42EC63B9400A8C2E5 /* Products */,+ );+ sourceTree = "<group>";+ };+ 8466A1D42EC63B9400A8C2E5 /* Products */ = {+ isa = PBXGroup;+ children = (+ 8466A1D32EC63B9400A8C2E5 /* ProxyBridge.app */,+ 8466A1E62EC63C5600A8C2E5 /* com.interceptsuite.ProxyBridge.extension.systemextension */,+ );+ name = Products;+ sourceTree = "<group>";+ };+ 8466A1E72EC63C5600A8C2E5 /* Frameworks */ = {+ isa = PBXGroup;+ children = (+ 8466A1E82EC63C5600A8C2E5 /* NetworkExtension.framework */,+ );+ name = Frameworks;+ sourceTree = "<group>";+ };+/* End PBXGroup section */++/* Begin PBXNativeTarget section */+ 8466A1D22EC63B9400A8C2E5 /* ProxyBridge */ = {+ isa = PBXNativeTarget;+ buildConfigurationList = 8466A1DE2EC63B9500A8C2E5 /* Build configuration list for PBXNativeTarget "ProxyBridge" */;+ buildPhases = (+ 8466A1CF2EC63B9400A8C2E5 /* Sources */,+ 8466A1D02EC63B9400A8C2E5 /* Frameworks */,+ 8466A1D12EC63B9400A8C2E5 /* Resources */,+ 8466A1F82EC63C5600A8C2E5 /* Embed System Extensions */,+ );+ buildRules = (+ );+ dependencies = (+ 8466A1F22EC63C5600A8C2E5 /* PBXTargetDependency */,+ );+ fileSystemSynchronizedGroups = (+ 8466A1D52EC63B9400A8C2E5 /* ProxyBridge */,+ );+ name = ProxyBridge;+ packageProductDependencies = (+ );+ productName = ProxyBridge;+ productReference = 8466A1D32EC63B9400A8C2E5 /* ProxyBridge.app */;+ productType = "com.apple.product-type.application";+ };+ 8466A1E52EC63C5600A8C2E5 /* extension */ = {+ isa = PBXNativeTarget;+ buildConfigurationList = 8466A1F52EC63C5600A8C2E5 /* Build configuration list for PBXNativeTarget "extension" */;+ buildPhases = (+ 8466A1E22EC63C5600A8C2E5 /* Sources */,+ 8466A1E32EC63C5600A8C2E5 /* Frameworks */,+ 8466A1E42EC63C5600A8C2E5 /* Resources */,+ );+ buildRules = (+ );+ dependencies = (+ );+ fileSystemSynchronizedGroups = (+ 8466A1EA2EC63C5600A8C2E5 /* extension */,+ );+ name = extension;+ packageProductDependencies = (+ );+ productName = extension;+ productReference = 8466A1E62EC63C5600A8C2E5 /* com.interceptsuite.ProxyBridge.extension.systemextension */;+ productType = "com.apple.product-type.system-extension";+ };+/* End PBXNativeTarget section */++/* Begin PBXProject section */+ 8466A1CB2EC63B9400A8C2E5 /* Project object */ = {+ isa = PBXProject;+ attributes = {+ BuildIndependentTargetsInParallel = 1;+ LastSwiftUpdateCheck = 2600;+ LastUpgradeCheck = 2600;+ TargetAttributes = {+ 8466A1D22EC63B9400A8C2E5 = {+ CreatedOnToolsVersion = 26.0.1;+ };+ 8466A1E52EC63C5600A8C2E5 = {+ CreatedOnToolsVersion = 26.0.1;+ };+ };+ };+ buildConfigurationList = 8466A1CE2EC63B9400A8C2E5 /* Build configuration list for PBXProject "ProxyBridge" */;+ developmentRegion = en;+ hasScannedForEncodings = 0;+ knownRegions = (+ en,+ Base,+ );+ mainGroup = 8466A1CA2EC63B9400A8C2E5;+ minimizedProjectReferenceProxies = 1;+ preferredProjectObjectVersion = 77;+ productRefGroup = 8466A1D42EC63B9400A8C2E5 /* Products */;+ projectDirPath = "";+ projectRoot = "";+ targets = (+ 8466A1D22EC63B9400A8C2E5 /* ProxyBridge */,+ 8466A1E52EC63C5600A8C2E5 /* extension */,+ );+ };+/* End PBXProject section */++/* Begin PBXResourcesBuildPhase section */+ 8466A1D12EC63B9400A8C2E5 /* Resources */ = {+ isa = PBXResourcesBuildPhase;+ buildActionMask = 2147483647;+ files = (+ );+ runOnlyForDeploymentPostprocessing = 0;+ };+ 8466A1E42EC63C5600A8C2E5 /* Resources */ = {+ isa = PBXResourcesBuildPhase;+ buildActionMask = 2147483647;+ files = (+ );+ runOnlyForDeploymentPostprocessing = 0;+ };+/* End PBXResourcesBuildPhase section */++/* Begin PBXSourcesBuildPhase section */+ 8466A1CF2EC63B9400A8C2E5 /* Sources */ = {+ isa = PBXSourcesBuildPhase;+ buildActionMask = 2147483647;+ files = (+ );+ runOnlyForDeploymentPostprocessing = 0;+ };+ 8466A1E22EC63C5600A8C2E5 /* Sources */ = {+ isa = PBXSourcesBuildPhase;+ buildActionMask = 2147483647;+ files = (+ );+ runOnlyForDeploymentPostprocessing = 0;+ };+/* End PBXSourcesBuildPhase section */++/* Begin PBXTargetDependency section */+ 8466A1F22EC63C5600A8C2E5 /* PBXTargetDependency */ = {+ isa = PBXTargetDependency;+ target = 8466A1E52EC63C5600A8C2E5 /* extension */;+ targetProxy = 8466A1F12EC63C5600A8C2E5 /* PBXContainerItemProxy */;+ };+/* End PBXTargetDependency section */++/* Begin XCBuildConfiguration section */+ 8466A1DC2EC63B9500A8C2E5 /* Debug */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ ALWAYS_SEARCH_USER_PATHS = NO;+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;+ CLANG_ANALYZER_NONNULL = YES;+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";+ CLANG_ENABLE_MODULES = YES;+ CLANG_ENABLE_OBJC_ARC = YES;+ CLANG_ENABLE_OBJC_WEAK = YES;+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;+ CLANG_WARN_BOOL_CONVERSION = YES;+ CLANG_WARN_COMMA = YES;+ CLANG_WARN_CONSTANT_CONVERSION = YES;+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;+ CLANG_WARN_EMPTY_BODY = YES;+ CLANG_WARN_ENUM_CONVERSION = YES;+ CLANG_WARN_INFINITE_RECURSION = YES;+ CLANG_WARN_INT_CONVERSION = YES;+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;+ CLANG_WARN_STRICT_PROTOTYPES = YES;+ CLANG_WARN_SUSPICIOUS_MOVE = YES;+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;+ CLANG_WARN_UNREACHABLE_CODE = YES;+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;+ COPY_PHASE_STRIP = NO;+ DEBUG_INFORMATION_FORMAT = dwarf;+ DEVELOPMENT_TEAM = L4HJT32Z59;+ ENABLE_STRICT_OBJC_MSGSEND = YES;+ ENABLE_TESTABILITY = YES;+ ENABLE_USER_SCRIPT_SANDBOXING = NO;+ GCC_C_LANGUAGE_STANDARD = gnu17;+ GCC_DYNAMIC_NO_PIC = NO;+ GCC_NO_COMMON_BLOCKS = YES;+ GCC_OPTIMIZATION_LEVEL = 0;+ GCC_PREPROCESSOR_DEFINITIONS = (+ "DEBUG=1",+ "$(inherited)",+ );+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;+ GCC_WARN_UNDECLARED_SELECTOR = YES;+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;+ GCC_WARN_UNUSED_FUNCTION = YES;+ GCC_WARN_UNUSED_VARIABLE = YES;+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;+ MACOSX_DEPLOYMENT_TARGET = 15.6;+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;+ MTL_FAST_MATH = YES;+ ONLY_ACTIVE_ARCH = YES;+ SDKROOT = macosx;+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";+ };+ name = Debug;+ };+ 8466A1DD2EC63B9500A8C2E5 /* Release */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ ALWAYS_SEARCH_USER_PATHS = NO;+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;+ CLANG_ANALYZER_NONNULL = YES;+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";+ CLANG_ENABLE_MODULES = YES;+ CLANG_ENABLE_OBJC_ARC = YES;+ CLANG_ENABLE_OBJC_WEAK = YES;+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;+ CLANG_WARN_BOOL_CONVERSION = YES;+ CLANG_WARN_COMMA = YES;+ CLANG_WARN_CONSTANT_CONVERSION = YES;+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;+ CLANG_WARN_EMPTY_BODY = YES;+ CLANG_WARN_ENUM_CONVERSION = YES;+ CLANG_WARN_INFINITE_RECURSION = YES;+ CLANG_WARN_INT_CONVERSION = YES;+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;+ CLANG_WARN_STRICT_PROTOTYPES = YES;+ CLANG_WARN_SUSPICIOUS_MOVE = YES;+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;+ CLANG_WARN_UNREACHABLE_CODE = YES;+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;+ COPY_PHASE_STRIP = NO;+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";+ DEVELOPMENT_TEAM = L4HJT32Z59;+ ENABLE_NS_ASSERTIONS = NO;+ ENABLE_STRICT_OBJC_MSGSEND = YES;+ ENABLE_USER_SCRIPT_SANDBOXING = NO;+ GCC_C_LANGUAGE_STANDARD = gnu17;+ GCC_NO_COMMON_BLOCKS = YES;+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;+ GCC_WARN_UNDECLARED_SELECTOR = YES;+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;+ GCC_WARN_UNUSED_FUNCTION = YES;+ GCC_WARN_UNUSED_VARIABLE = YES;+ LOCALIZATION_PREFERS_STRING_CATALOGS = YES;+ MACOSX_DEPLOYMENT_TARGET = 15.6;+ MTL_ENABLE_DEBUG_INFO = NO;+ MTL_FAST_MATH = YES;+ SDKROOT = macosx;+ SWIFT_COMPILATION_MODE = wholemodule;+ };+ name = Release;+ };+ 8466A1DF2EC63B9500A8C2E5 /* Debug */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;+ CODE_SIGN_ENTITLEMENTS = ProxyBridge/ProxyBridge.entitlements;+ CODE_SIGN_IDENTITY = "Apple Development";+ CODE_SIGN_STYLE = Automatic;+ COMBINE_HIDPI_IMAGES = YES;+ CURRENT_PROJECT_VERSION = 1;+ DEVELOPMENT_TEAM = L4HJT32Z59;+ ENABLE_APP_SANDBOX = YES;+ ENABLE_HARDENED_RUNTIME = YES;+ ENABLE_INCOMING_NETWORK_CONNECTIONS = YES;+ ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;+ ENABLE_PREVIEWS = YES;+ ENABLE_RESOURCE_ACCESS_AUDIO_INPUT = NO;+ ENABLE_RESOURCE_ACCESS_BLUETOOTH = NO;+ ENABLE_RESOURCE_ACCESS_CALENDARS = NO;+ ENABLE_RESOURCE_ACCESS_CAMERA = NO;+ ENABLE_RESOURCE_ACCESS_CONTACTS = NO;+ ENABLE_RESOURCE_ACCESS_LOCATION = NO;+ ENABLE_RESOURCE_ACCESS_PRINTING = NO;+ ENABLE_RESOURCE_ACCESS_USB = NO;+ ENABLE_USER_SELECTED_FILES = readonly;+ GENERATE_INFOPLIST_FILE = YES;+ INFOPLIST_FILE = "";+ INFOPLIST_KEY_CFBundleDisplayName = ProxyBridge;+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";+ INFOPLIST_KEY_NSHumanReadableCopyright = "";+ LD_RUNPATH_SEARCH_PATHS = (+ "$(inherited)",+ "@executable_path/../Frameworks",+ );+ MARKETING_VERSION = 1.0;+ PRODUCT_BUNDLE_IDENTIFIER = com.interceptsuite.ProxyBridge;+ PRODUCT_NAME = "$(TARGET_NAME)";+ PROVISIONING_PROFILE_SPECIFIER = "";+ REGISTER_APP_GROUPS = YES;+ STRING_CATALOG_GENERATE_SYMBOLS = YES;+ SWIFT_APPROACHABLE_CONCURRENCY = YES;+ SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor;+ SWIFT_EMIT_LOC_STRINGS = YES;+ SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;+ SWIFT_VERSION = 5.0;+ };+ name = Debug;+ };+ 8466A1E02EC63B9500A8C2E5 /* Release */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;+ CODE_SIGN_ENTITLEMENTS = ProxyBridge/ProxyBridgeRelease.entitlements;+ CODE_SIGN_IDENTITY = "Apple Development";+ CODE_SIGN_STYLE = Automatic;+ COMBINE_HIDPI_IMAGES = YES;+ CURRENT_PROJECT_VERSION = 1;+ DEVELOPMENT_TEAM = L4HJT32Z59;+ ENABLE_APP_SANDBOX = YES;+ ENABLE_HARDENED_RUNTIME = YES;+ ENABLE_INCOMING_NETWORK_CONNECTIONS = YES;+ ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;+ ENABLE_PREVIEWS = YES;+ ENABLE_RESOURCE_ACCESS_AUDIO_INPUT = NO;+ ENABLE_RESOURCE_ACCESS_BLUETOOTH = NO;+ ENABLE_RESOURCE_ACCESS_CALENDARS = NO;+ ENABLE_RESOURCE_ACCESS_CAMERA = NO;+ ENABLE_RESOURCE_ACCESS_CONTACTS = NO;+ ENABLE_RESOURCE_ACCESS_LOCATION = NO;+ ENABLE_RESOURCE_ACCESS_PRINTING = NO;+ ENABLE_RESOURCE_ACCESS_USB = NO;+ ENABLE_USER_SELECTED_FILES = readonly;+ GENERATE_INFOPLIST_FILE = YES;+ INFOPLIST_FILE = "";+ INFOPLIST_KEY_CFBundleDisplayName = ProxyBridge;+ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.developer-tools";+ INFOPLIST_KEY_NSHumanReadableCopyright = "";+ LD_RUNPATH_SEARCH_PATHS = (+ "$(inherited)",+ "@executable_path/../Frameworks",+ );+ MARKETING_VERSION = 1.0;+ PRODUCT_BUNDLE_IDENTIFIER = com.interceptsuite.ProxyBridge;+ PRODUCT_NAME = "$(TARGET_NAME)";+ PROVISIONING_PROFILE_SPECIFIER = "";+ REGISTER_APP_GROUPS = YES;+ STRING_CATALOG_GENERATE_SYMBOLS = YES;+ SWIFT_APPROACHABLE_CONCURRENCY = YES;+ SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor;+ SWIFT_EMIT_LOC_STRINGS = YES;+ SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;+ SWIFT_VERSION = 5.0;+ };+ name = Release;+ };+ 8466A1F62EC63C5600A8C2E5 /* Debug */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ CODE_SIGN_ENTITLEMENTS = extension/extension.entitlements;+ CODE_SIGN_STYLE = Automatic;+ CURRENT_PROJECT_VERSION = 1;+ DEVELOPMENT_TEAM = L4HJT32Z59;+ ENABLE_APP_SANDBOX = YES;+ ENABLE_HARDENED_RUNTIME = YES;+ ENABLE_INCOMING_NETWORK_CONNECTIONS = YES;+ ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;+ ENABLE_RESOURCE_ACCESS_AUDIO_INPUT = NO;+ ENABLE_RESOURCE_ACCESS_BLUETOOTH = NO;+ ENABLE_RESOURCE_ACCESS_CALENDARS = NO;+ ENABLE_RESOURCE_ACCESS_CAMERA = NO;+ ENABLE_RESOURCE_ACCESS_CONTACTS = NO;+ ENABLE_RESOURCE_ACCESS_LOCATION = NO;+ ENABLE_RESOURCE_ACCESS_PRINTING = NO;+ ENABLE_RESOURCE_ACCESS_USB = NO;+ GENERATE_INFOPLIST_FILE = YES;+ INFOPLIST_FILE = extension/Info.plist;+ INFOPLIST_KEY_CFBundleDisplayName = extension;+ INFOPLIST_KEY_NSHumanReadableCopyright = "";+ LD_RUNPATH_SEARCH_PATHS = (+ "$(inherited)",+ "@executable_path/../Frameworks",+ "@executable_path/../../../../Frameworks",+ );+ MARKETING_VERSION = 1.0;+ PRODUCT_BUNDLE_IDENTIFIER = com.interceptsuite.ProxyBridge.extension;+ PRODUCT_NAME = "$(inherited)";+ REGISTER_APP_GROUPS = YES;+ SKIP_INSTALL = YES;+ STRING_CATALOG_GENERATE_SYMBOLS = YES;+ SWIFT_APPROACHABLE_CONCURRENCY = YES;+ SWIFT_EMIT_LOC_STRINGS = YES;+ SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;+ SWIFT_VERSION = 5.0;+ };+ name = Debug;+ };+ 8466A1F72EC63C5600A8C2E5 /* Release */ = {+ isa = XCBuildConfiguration;+ buildSettings = {+ CODE_SIGN_ENTITLEMENTS = extension/extension.entitlements;+ CODE_SIGN_STYLE = Automatic;+ CURRENT_PROJECT_VERSION = 1;+ DEVELOPMENT_TEAM = L4HJT32Z59;+ ENABLE_APP_SANDBOX = YES;+ ENABLE_HARDENED_RUNTIME = YES;+ ENABLE_INCOMING_NETWORK_CONNECTIONS = YES;+ ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;+ ENABLE_RESOURCE_ACCESS_AUDIO_INPUT = NO;+ ENABLE_RESOURCE_ACCESS_BLUETOOTH = NO;+ ENABLE_RESOURCE_ACCESS_CALENDARS = NO;+ ENABLE_RESOURCE_ACCESS_CAMERA = NO;+ ENABLE_RESOURCE_ACCESS_CONTACTS = NO;+ ENABLE_RESOURCE_ACCESS_LOCATION = NO;+ ENABLE_RESOURCE_ACCESS_PRINTING = NO;+ ENABLE_RESOURCE_ACCESS_USB = NO;+ GENERATE_INFOPLIST_FILE = YES;+ INFOPLIST_FILE = extension/Info.plist;+ INFOPLIST_KEY_CFBundleDisplayName = extension;+ INFOPLIST_KEY_NSHumanReadableCopyright = "";+ LD_RUNPATH_SEARCH_PATHS = (+ "$(inherited)",+ "@executable_path/../Frameworks",+ "@executable_path/../../../../Frameworks",+ );+ MARKETING_VERSION = 1.0;+ PRODUCT_BUNDLE_IDENTIFIER = com.interceptsuite.ProxyBridge.extension;+ PRODUCT_NAME = "$(inherited)";+ REGISTER_APP_GROUPS = YES;+ SKIP_INSTALL = YES;+ STRING_CATALOG_GENERATE_SYMBOLS = YES;+ SWIFT_APPROACHABLE_CONCURRENCY = YES;+ SWIFT_EMIT_LOC_STRINGS = YES;+ SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES;+ SWIFT_VERSION = 5.0;+ };+ name = Release;+ };+/* End XCBuildConfiguration section */++/* Begin XCConfigurationList section */+ 8466A1CE2EC63B9400A8C2E5 /* Build configuration list for PBXProject "ProxyBridge" */ = {+ isa = XCConfigurationList;+ buildConfigurations = (+ 8466A1DC2EC63B9500A8C2E5 /* Debug */,+ 8466A1DD2EC63B9500A8C2E5 /* Release */,+ );+ defaultConfigurationIsVisible = 0;+ defaultConfigurationName = Release;+ };+ 8466A1DE2EC63B9500A8C2E5 /* Build configuration list for PBXNativeTarget "ProxyBridge" */ = {+ isa = XCConfigurationList;+ buildConfigurations = (+ 8466A1DF2EC63B9500A8C2E5 /* Debug */,+ 8466A1E02EC63B9500A8C2E5 /* Release */,+ );+ defaultConfigurationIsVisible = 0;+ defaultConfigurationName = Release;+ };+ 8466A1F52EC63C5600A8C2E5 /* Build configuration list for PBXNativeTarget "extension" */ = {+ isa = XCConfigurationList;+ buildConfigurations = (+ 8466A1F62EC63C5600A8C2E5 /* Debug */,+ 8466A1F72EC63C5600A8C2E5 /* Release */,+ );+ defaultConfigurationIsVisible = 0;+ defaultConfigurationName = Release;+ };+/* End XCConfigurationList section */+ };+ rootObject = 8466A1CB2EC63B9400A8C2E5 /* Project object */;+}diff --git a/MacOS/ProxyBridge/ProxyBridge/Assets.xcassets/AccentColor.colorset/Contents.json b/MacOS/ProxyBridge/ProxyBridge/Assets.xcassets/AccentColor.colorset/Contents.jsonnew file mode 100644index 0000000..eb87897--- /dev/null+++ b/MacOS/ProxyBridge/ProxyBridge/Assets.xcassets/AccentColor.colorset/Contents.json@@ -0,0 +1,11 @@+{+ "colors" : [+ {+ "idiom" : "universal"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/MacOS/ProxyBridge/ProxyBridge/Assets.xcassets/AppIcon.appiconset/Contents.json b/MacOS/ProxyBridge/ProxyBridge/Assets.xcassets/AppIcon.appiconset/Contents.jsonnew file mode 100644index 0000000..3f00db4--- /dev/null+++ b/MacOS/ProxyBridge/ProxyBridge/Assets.xcassets/AppIcon.appiconset/Contents.json@@ -0,0 +1,58 @@+{+ "images" : [+ {+ "idiom" : "mac",+ "scale" : "1x",+ "size" : "16x16"+ },+ {+ "idiom" : "mac",+ "scale" : "2x",+ "size" : "16x16"+ },+ {+ "idiom" : "mac",+ "scale" : "1x",+ "size" : "32x32"+ },+ {+ "idiom" : "mac",+ "scale" : "2x",+ "size" : "32x32"+ },+ {+ "idiom" : "mac",+ "scale" : "1x",+ "size" : "128x128"+ },+ {+ "idiom" : "mac",+ "scale" : "2x",+ "size" : "128x128"+ },+ {+ "idiom" : "mac",+ "scale" : "1x",+ "size" : "256x256"+ },+ {+ "idiom" : "mac",+ "scale" : "2x",+ "size" : "256x256"+ },+ {+ "idiom" : "mac",+ "scale" : "1x",+ "size" : "512x512"+ },+ {+ "idiom" : "mac",+ "scale" : "2x",+ "size" : "512x512"+ }+ ],+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/MacOS/ProxyBridge/ProxyBridge/Assets.xcassets/Contents.json b/MacOS/ProxyBridge/ProxyBridge/Assets.xcassets/Contents.jsonnew file mode 100644index 0000000..73c0059--- /dev/null+++ b/MacOS/ProxyBridge/ProxyBridge/Assets.xcassets/Contents.json@@ -0,0 +1,6 @@+{+ "info" : {+ "author" : "xcode",+ "version" : 1+ }+}diff --git a/MacOS/ProxyBridge/ProxyBridge/ContentView.swift b/MacOS/ProxyBridge/ProxyBridge/ContentView.swiftnew file mode 100644index 0000000..c209417--- /dev/null+++ b/MacOS/ProxyBridge/ProxyBridge/ContentView.swift@@ -0,0 +1,24 @@+//+// ContentView.swift+// ProxyBridge+//+// Created by sourav kalal on 13/11/25.+//++import SwiftUI++struct ContentView: View {+ var body: some View {+ VStack {+ Image(systemName: "globe")+ .imageScale(.large)+ .foregroundStyle(.tint)+ Text("Hello, world!")+ }+ .padding()+ }+}++#Preview {+ ContentView()+}diff --git a/MacOS/ProxyBridge/ProxyBridge/ProxyBridge.entitlements b/MacOS/ProxyBridge/ProxyBridge/ProxyBridge.entitlementsnew file mode 100644index 0000000..474c36f--- /dev/null+++ b/MacOS/ProxyBridge/ProxyBridge/ProxyBridge.entitlements@@ -0,0 +1,13 @@+<?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.system-extension.install</key>+ <true/>+ <key>com.apple.developer.networking.networkextension</key>+ <array>+ <string>app-proxy-provider</string>+ <string>transparent-proxy</string>+ </array>+</dict>+</plist>diff --git a/MacOS/ProxyBridge/ProxyBridge/ProxyBridgeApp.swift b/MacOS/ProxyBridge/ProxyBridge/ProxyBridgeApp.swiftnew file mode 100644index 0000000..a9502ec--- /dev/null+++ b/MacOS/ProxyBridge/ProxyBridge/ProxyBridgeApp.swift@@ -0,0 +1,101 @@+//+// ProxyBridgeApp.swift+// ProxyBridge+//+// Created by sourav kalal on 13/11/25.+//++import SwiftUI+import NetworkExtension+import SystemExtensions+import os.log++@main+struct ProxyBridgeApp: App {++ init() {+ os_log("App init - installing extension", type: .info)+ installExtension()+ }++ var body: some Scene {+ WindowGroup {+ ContentView()+ }+ }++ func installExtension() {+ os_log("Requesting extension installation", type: .info)+ let request = OSSystemExtensionRequest.activationRequest(+ forExtensionWithIdentifier: "com.interceptsuite.ProxyBridge.extension",+ queue: .main+ )+ request.delegate = ExtensionDelegate.shared+ OSSystemExtensionManager.shared.submitRequest(request)+ }+}++class ExtensionDelegate: NSObject, OSSystemExtensionRequestDelegate {+ static let shared = ExtensionDelegate()++ func request(_ request: OSSystemExtensionRequest, actionForReplacingExtension existing: OSSystemExtensionProperties, withExtension ext: OSSystemExtensionProperties) -> OSSystemExtensionRequest.ReplacementAction {+ os_log("Extension replacement requested", type: .info)+ return .replace+ }++ func requestNeedsUserApproval(_ request: OSSystemExtensionRequest) {+ os_log("Extension needs user approval in System Settings", type: .error)+ }++ func request(_ request: OSSystemExtensionRequest, didFinishWithResult result: OSSystemExtensionRequest.Result) {+ os_log("Extension installed successfully", type: .info)+ startProxy()+ }++ func request(_ request: OSSystemExtensionRequest, didFailWithError error: Error) {+ os_log("Extension installation failed: %{public}@", type: .error, error.localizedDescription)+ }++ func startProxy() {+ os_log("Starting transparent proxy configuration", type: .info)+ NETransparentProxyManager.loadAllFromPreferences { managers, error in+ if let error = error {+ os_log("Failed to load managers: %{public}@", type: .error, error.localizedDescription)+ return+ }++ let manager = managers?.first ?? NETransparentProxyManager()++ manager.localizedDescription = "ProxyBridge Transparent Proxy"+ manager.isEnabled = true++ let providerProtocol = NETunnelProviderProtocol()+ providerProtocol.providerBundleIdentifier = "com.interceptsuite.ProxyBridge.extension"+ providerProtocol.serverAddress = "ProxyBridge"+ manager.protocolConfiguration = providerProtocol++ manager.saveToPreferences { saveError in+ if let saveError = saveError {+ os_log("Failed to save preferences: %{public}@", type: .error, saveError.localizedDescription)+ return+ }++ os_log("Transparent proxy configuration saved", type: .info)++ manager.loadFromPreferences { loadError in+ if let loadError = loadError {+ os_log("Failed to reload preferences: %{public}@", type: .error, loadError.localizedDescription)+ return+ }++ do {+ try (manager.connection as? NETunnelProviderSession)?.startTunnel()+ os_log("Transparent proxy started", type: .info)+ } catch {+ os_log("Failed to start proxy: %{public}@", type: .error, error.localizedDescription)+ }+ }+ }+ }+ }+}diff --git a/MacOS/ProxyBridge/ProxyBridge/ProxyBridgeRelease.entitlements b/MacOS/ProxyBridge/ProxyBridge/ProxyBridgeRelease.entitlementsnew file mode 100644index 0000000..b0d02e7--- /dev/null+++ b/MacOS/ProxyBridge/ProxyBridge/ProxyBridgeRelease.entitlements@@ -0,0 +1,12 @@+<?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>app-proxy-provider</string>+ </array>+ <key>com.apple.developer.system-extension.install</key>+ <true/>+</dict>+</plist>diff --git a/MacOS/ProxyBridge/extension/AppProxyProvider.swift b/MacOS/ProxyBridge/extension/AppProxyProvider.swiftnew file mode 100644index 0000000..0f94e5e--- /dev/null+++ b/MacOS/ProxyBridge/extension/AppProxyProvider.swift@@ -0,0 +1,117 @@+//+// AppProxyProvider.swift+// extension+//+// Created by sourav kalal on 13/11/25.+//++import NetworkExtension+import os.log++class AppProxyProvider: NETransparentProxyProvider {++ private let logger = Logger(subsystem: "com.interceptsuite.ProxyBridge.extension", category: "NetworkProxy")++ override func startProxy(options: [String : Any]?, completionHandler: @escaping (Error?) -> Void) {+ logger.info("Configuring transparent proxy")++ let settings = NETransparentProxyNetworkSettings(tunnelRemoteAddress: "127.0.0.1")++ let allTrafficRule = NENetworkRule(+ remoteNetwork: nil,+ remotePrefix: 0,+ localNetwork: nil,+ localPrefix: 0,+ protocol: .any,+ direction: .outbound+ )++ settings.includedNetworkRules = [allTrafficRule]++ self.setTunnelNetworkSettings(settings) { error in+ if let error = error {+ self.logger.error("Failed to set network settings: \(error.localizedDescription)")+ completionHandler(error)+ } else {+ self.logger.info("Transparent proxy started")+ completionHandler(nil)+ }+ }+ }++ override func stopProxy(with reason: NEProviderStopReason, completionHandler: @escaping () -> Void) {+ logger.info("Proxy stopped: \(reason.rawValue)")+ completionHandler()+ }++ override func handleAppMessage(_ messageData: Data, completionHandler: ((Data?) -> Void)?) {+ if let handler = completionHandler {+ handler(messageData)+ }+ }++ override func sleep(completionHandler: @escaping () -> Void) {+ completionHandler()+ }++ override func wake() {+ }++ override func handleNewFlow(_ flow: NEAppProxyFlow) -> Bool {+ if let tcpFlow = flow as? NEAppProxyTCPFlow {+ logTCPConnection(tcpFlow)+ handleTCP(tcpFlow)+ } else if let udpFlow = flow as? NEAppProxyUDPFlow {+ logUDPConnection(udpFlow)+ handleUDP(udpFlow)+ }+ return true+ }++ private func logTCPConnection(_ flow: NEAppProxyTCPFlow) {+ let remoteEndpoint = flow.remoteEndpoint++ if let remoteHost = remoteEndpoint as? NWHostEndpoint {+ logger.info("TCP -> \(remoteHost.hostname):\(remoteHost.port)")+ } else {+ logger.info("TCP -> \(String(describing: remoteEndpoint))")+ }++ if let metaData = flow.metaData as? NEFlowMetaData {+ logger.info(" App: \(metaData.sourceAppSigningIdentifier ?? "unknown")")+ }+ }++ private func logUDPConnection(_ flow: NEAppProxyUDPFlow) {+ if let localEndpoint = flow.localEndpoint,+ let localHost = localEndpoint as? NWHostEndpoint {+ logger.info("UDP: \(localHost.hostname):\(localHost.port)")+ }++ if let metaData = flow.metaData as? NEFlowMetaData {+ logger.info(" App: \(metaData.sourceAppSigningIdentifier ?? "unknown")")+ }+ }++ private func handleTCP(_ flow: NEAppProxyTCPFlow) {+ relayTCP(flow)+ }++ private func relayTCP(_ flow: NEAppProxyTCPFlow) {+ flow.readData { _, error in+ guard error == nil else { return }+ self.relayTCP(flow)+ }+ }++ private func handleUDP(_ flow: NEAppProxyUDPFlow) {+ relayUDP(flow)+ }++ private func relayUDP(_ flow: NEAppProxyUDPFlow) {+ flow.readDatagrams { _, _, error in+ guard error == nil else { return }+ self.relayUDP(flow)+ }+ }+}diff --git a/MacOS/ProxyBridge/extension/Info.plist b/MacOS/ProxyBridge/extension/Info.plistnew file mode 100644index 0000000..360529a--- /dev/null+++ b/MacOS/ProxyBridge/extension/Info.plist@@ -0,0 +1,16 @@+<?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>NSSystemExtensionUsageDescription</key>+ <string>ProxyBridge needs to install a system extension to intercept network traffic</string>+ <key>NetworkExtension</key>+ <dict>+ <key>NEProviderClasses</key>+ <dict>+ <key>com.apple.networkextension.app-proxy</key>+ <string>$(PRODUCT_MODULE_NAME).AppProxyProvider</string>+ </dict>+ </dict>+</dict>+</plist>diff --git a/MacOS/ProxyBridge/extension/extension.entitlements b/MacOS/ProxyBridge/extension/extension.entitlementsnew file mode 100644index 0000000..664049b--- /dev/null+++ b/MacOS/ProxyBridge/extension/extension.entitlements@@ -0,0 +1,10 @@+<?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>app-proxy-provider</string>+ </array>+</dict>+</plist>diff --git a/MacOS/ProxyBridge/extension/main.swift b/MacOS/ProxyBridge/extension/main.swiftnew file mode 100644index 0000000..1071bc9--- /dev/null+++ b/MacOS/ProxyBridge/extension/main.swift@@ -0,0 +1,15 @@+//+// main.swift+// extension+//+// Created by sourav kalal on 13/11/25.+//++import Foundation+import NetworkExtension++autoreleasepool {+ NEProvider.startSystemExtensionMode()+}++dispatchMain()