peachsim 0.1.1738 → 0.1.1744
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/cli/app-catalog.ts +47 -23
- package/cli/app-fonts.ts +19 -1
- package/cli/command-registry.ts +3 -0
- package/cli/commands/control.ts +67 -16
- package/cli/commands/device.ts +3 -1
- package/cli/commands/doctor.ts +1 -4
- package/cli/commands/inspect/settling.ts +6 -1
- package/cli/commands/inspect/wait-ready.ts +22 -2
- package/cli/commands/package.ts +22 -20
- package/cli/commands/push.ts +56 -0
- package/cli/commands/serve.ts +9 -0
- package/cli/commands/shell-url.ts +37 -9
- package/cli/commands/swift.ts +1 -1
- package/cli/current-sim.ts +27 -0
- package/cli/drivers/linux-browser-libs.lock.json +323 -1
- package/cli/drivers/linux-browser-libs.ts +8 -6
- package/cli/drivers/playwright.ts +5 -1
- package/cli/internal-child.ts +11 -1
- package/cli/main.ts +6 -0
- package/cli/native-input.ts +1 -7
- package/cli/outbound-endpoints.ts +9 -1
- package/cli/packaged-app-launcher.ts +3 -1
- package/cli/scene-video.ts +4 -0
- package/cli/ws-bridge.ts +3 -1
- package/detox/index.ts +9 -4
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +7372 -3675
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +22 -8
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +6340 -3064
- package/dist-lib/expo-swift-metadata.cjs +14 -2
- package/dist-lib/expo-swift-metadata.mjs +14 -2
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +6524 -2720
- package/dist-lib/host/fetch-proxy-handler.cjs +8 -7
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +6 -3
- package/dist-lib/index.cjs +97 -31
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +71 -29
- package/dist-lib/native-app-identity-project.cjs +53 -22
- package/dist-lib/native-app-identity-project.mjs +53 -22
- package/dist-lib/native-app-identity.cjs +10 -3
- package/dist-lib/native-app-identity.mjs +10 -3
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +25 -23
- package/dist-lib/public-origins-lib.json +111 -79
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +4 -1
- package/dist-lib/sdk.mjs +4 -1
- package/dist-lib/skills.cjs +40549 -37613
- package/dist-lib/swift-compile.cjs +2054 -388
- package/dist-lib/swift-compile.mjs +1976 -312
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +68 -8
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +5867 -2646
- package/dist-lib/vite.cjs +18 -8
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +0 -3
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
- package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
- package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
- package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
- package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
- package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
- package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +7 -0
- package/package.json +2 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +0 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +356 -61
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
- package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
- package/sdk/ios/usr/include/dns_sd.h +3616 -0
- package/sdk/ios/usr/include/dnssd.modulemap +4 -0
- package/sdk/ios/usr/include/module.modulemap +1 -0
- package/sdk/ios/usr/include/sys/socketvar.h +191 -0
- package/sdk/ios/usr/include/sys/vsock.h +84 -0
- package/sdk/native-hashes.json +1 -1
- package/skills/contrast/SKILL.md +6 -5
- package/skills/peach-debug/SKILL.md +68 -264
- package/skills/peach-debug/references/accessibility.md +37 -73
- package/skills/peach-debug/references/commands.md +2 -2
- package/skills/peach-debug/references/events.md +74 -0
- package/skills/peach-perf/SKILL.md +64 -401
- package/skills/peach-perf/references/presentation.md +46 -0
- package/skills/peach-perf/references/profiling.md +93 -0
- package/skills/peach-perf/references/render-counters.md +57 -0
- package/skills/peach-setup/SKILL.md +66 -216
- package/skills/peach-setup/references/native-config.md +35 -0
- package/skills/peach-setup/references/reporting.md +28 -0
- package/skills/peach-test/SKILL.md +68 -284
- package/skills/peach-test/references/detox.md +69 -0
- package/skills/peach-test/references/maestro.md +95 -0
- package/skills/peach-visual/SKILL.md +53 -105
- package/src/appPackageContract.ts +12 -1
- package/src/assetCatalogContract.ts +8 -1
- package/src/bridge-contract.ts +6 -0
- package/src/bundle-channel.mjs +133 -59
- package/src/cli-runtime.ts +8 -9
- package/src/configured-bundle-producer.ts +10 -0
- package/src/device-catalog.ts +68 -4
- package/src/expo-discovery-cache.ts +3 -0
- package/src/expo-native-workspace.ts +81 -17
- package/src/expo-swift-host.ts +57 -104
- package/src/expo-widget-assets.ts +76 -0
- package/src/expoSwiftContract.ts +13 -1
- package/src/host/websocket-proxy.ts +7 -2
- package/src/native-prebuilt.ts +3 -3
- package/src/nitro-adapter.lock.json +263 -263
- package/src/nitro-adapter.ts +69 -7
- package/src/nitro-bundle.ts +52 -24
- package/src/nitro-compile.ts +6 -1
- package/src/nitro-source.ts +82 -4
- package/src/nitro-superset.lock.json +103 -0
- package/src/nitro-superset.ts +137 -0
- package/src/nitroContract.ts +5 -1
- package/src/react-bridge-importers.ts +1 -0
- package/src/settingsContract.ts +26 -1
- package/src/swift-compile.ts +267 -68
- package/src/swift-compiler-digest.ts +2 -0
- package/src/swift-coverage/xcode-packages.ts +61 -1
- package/src/swift-coverage/xcode.ts +10 -12
- package/src/swift-cxx-reachable.ts +1 -1
- package/src/swift-distribution.lock.json +15 -13
- package/src/swift-distribution.ts +57 -26
- package/src/swift-host.ts +48 -35
- package/src/swift-link-roots.ts +45 -18
- package/src/swift-objc-compile.ts +78 -2
- package/src/swift-objc-standin.ts +3 -0
- package/src/swift-shared-sdk.ts +85 -1
- package/src/swift-standins.ts +233 -11
- package/src/swift-submit.ts +13 -1
- package/src/swift-toolchain.ts +82 -7
- package/src/swift-wasm-prune.ts +1629 -0
- package/src/turbo-bundle.ts +11 -10
- package/src/turbo-runtime.lock.json +16 -16
- package/src/vite-plugin-one.ts +12 -1
- package/src/vite-plugin.ts +82 -23
- package/src/wasm-optimize.ts +34 -0
- package/src/worker-system-chunks.ts +3 -3
- package/src/xcode-project.ts +52 -0
- package/src/xcode-target-members.ts +12 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
//
|
|
2
|
+
// privacy_context.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2020-2023 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_PRIVACY_CONTEXT_H__
|
|
9
|
+
#define __NW_PRIVACY_CONTEXT_H__
|
|
10
|
+
|
|
11
|
+
#ifndef __NW_INDIRECT__
|
|
12
|
+
#warning "Please include <Network/Network.h> instead of this file directly."
|
|
13
|
+
#endif // __NW_INDIRECT__
|
|
14
|
+
|
|
15
|
+
#include <Network/nw_object.h>
|
|
16
|
+
#include <Network/resolver_config.h>
|
|
17
|
+
#include <Network/proxy_config.h>
|
|
18
|
+
|
|
19
|
+
#include <stdbool.h>
|
|
20
|
+
#include <stdint.h>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
__BEGIN_DECLS
|
|
24
|
+
|
|
25
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
26
|
+
|
|
27
|
+
/*!
|
|
28
|
+
* @typedef nw_privacy_context_t
|
|
29
|
+
* @abstract
|
|
30
|
+
* A Network Privacy Context can contain various connections and listeners
|
|
31
|
+
* that share various privacy settings and protocol caches. Any in-process
|
|
32
|
+
* cached state, such as TLS sessions, will only be shared within privacy
|
|
33
|
+
* contexts and will not cross privacy context boundaries.
|
|
34
|
+
*
|
|
35
|
+
* Besides defining caching boundaries, privacy contexts also allow restricting
|
|
36
|
+
* the behavior of connections within a context to improve their privacy stance
|
|
37
|
+
* with regards to the system and the local network. For example, a privacy context
|
|
38
|
+
* can disable logging to ensure that sensitive connections do not contribute to the
|
|
39
|
+
* system logs. A privacy context can also require that DNS resolutions are encrypted
|
|
40
|
+
* so that names are not transmitted in the clear on the network during resolution.
|
|
41
|
+
*
|
|
42
|
+
* Some settings, such as DNS settings, can also be applied to the default privacy
|
|
43
|
+
* context for the process using NW_DEFAULT_PRIVACY_CONTEXT. Such settings
|
|
44
|
+
* will be inherited by other resolutions in the same process. Any privacy context
|
|
45
|
+
* set directly on an nw_parameters_t will take precedence over the default context
|
|
46
|
+
* settings.
|
|
47
|
+
*
|
|
48
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
49
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
50
|
+
*/
|
|
51
|
+
#ifndef NW_PRIVACY_CONTEXT_IMPL
|
|
52
|
+
NW_OBJECT_DECL(nw_privacy_context);
|
|
53
|
+
#endif // NW_PRIVACY_CONTEXT_IMPL
|
|
54
|
+
|
|
55
|
+
/*!
|
|
56
|
+
* @function nw_privacy_context_create
|
|
57
|
+
*
|
|
58
|
+
* @abstract
|
|
59
|
+
* Create a new privacy context. This object can be added to connections and listeners
|
|
60
|
+
* by setting the privacy context on the nw_parameters_t. Each privacy context can have
|
|
61
|
+
* unique settings for logging and resolution, and implicitly has an isolated cache for
|
|
62
|
+
* items like TLS sessions.
|
|
63
|
+
*
|
|
64
|
+
* @param description
|
|
65
|
+
* A string description used for logging.
|
|
66
|
+
*
|
|
67
|
+
* @result
|
|
68
|
+
* Returns an allocated nw_privacy_context_t object on success.
|
|
69
|
+
*/
|
|
70
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
71
|
+
NW_RETURNS_RETAINED nw_privacy_context_t
|
|
72
|
+
nw_privacy_context_create(const char *description);
|
|
73
|
+
|
|
74
|
+
#define NW_PRIVACY_CONTEXT_TYPE_DECL(name) \
|
|
75
|
+
extern const nw_privacy_context_t _nw_privacy_context_##name
|
|
76
|
+
|
|
77
|
+
/*!
|
|
78
|
+
* @const NW_DEFAULT_PRIVACY_CONTEXT
|
|
79
|
+
* @discussion The default privacy context represents the default privacy settings used
|
|
80
|
+
* throughout the currently running process. Logging may not be disabled on the
|
|
81
|
+
* default privacy context.
|
|
82
|
+
*
|
|
83
|
+
* Flushing the cache on the default privacy context will not affect other privacy contexts.
|
|
84
|
+
*
|
|
85
|
+
* Changing name resolution settings will only affect privacy contexts that did not already
|
|
86
|
+
* explicitly configure name resolution requirements.
|
|
87
|
+
*/
|
|
88
|
+
#define NW_DEFAULT_PRIVACY_CONTEXT (_nw_privacy_context_default_context)
|
|
89
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
90
|
+
NW_PRIVACY_CONTEXT_TYPE_DECL(default_context);
|
|
91
|
+
|
|
92
|
+
/*!
|
|
93
|
+
* @function nw_privacy_context_flush_cache
|
|
94
|
+
*
|
|
95
|
+
* @abstract
|
|
96
|
+
* Flush any cached state stored in this privacy context. The act of flushing the
|
|
97
|
+
* cache may be asynchronous, which means that it will take effect shortly after the
|
|
98
|
+
* function is invoked.
|
|
99
|
+
*
|
|
100
|
+
* @param privacy_context
|
|
101
|
+
* A privacy context to flush.
|
|
102
|
+
*/
|
|
103
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
104
|
+
void
|
|
105
|
+
nw_privacy_context_flush_cache(nw_privacy_context_t privacy_context);
|
|
106
|
+
|
|
107
|
+
/*!
|
|
108
|
+
* @function nw_privacy_context_disable_logging
|
|
109
|
+
*
|
|
110
|
+
* @abstract
|
|
111
|
+
* Disable logging for connections and listeners associated with this context. Logging
|
|
112
|
+
* may not be disabled on the default privacy context.
|
|
113
|
+
*
|
|
114
|
+
* @param privacy_context
|
|
115
|
+
* A privacy context on which to disable logging.
|
|
116
|
+
*/
|
|
117
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
118
|
+
void
|
|
119
|
+
nw_privacy_context_disable_logging(nw_privacy_context_t privacy_context);
|
|
120
|
+
|
|
121
|
+
/*!
|
|
122
|
+
* @function nw_privacy_context_require_encrypted_name_resolution
|
|
123
|
+
*
|
|
124
|
+
* @abstract
|
|
125
|
+
* Require that any DNS name resolution occurring for connections
|
|
126
|
+
* associated with this context use encrypted transports, such as TLS or HTTPS.
|
|
127
|
+
* Any unencrypted queries will be blocked if require_encrypted_name_resolution
|
|
128
|
+
* is set to true. Optionally, a fallback resolver config can be provided to use
|
|
129
|
+
* instead of blocking queries when require_encrypted_name_resolution is set to
|
|
130
|
+
* true.
|
|
131
|
+
*
|
|
132
|
+
* @param privacy_context
|
|
133
|
+
* A privacy context to modify. This can include the default privacy context.
|
|
134
|
+
*
|
|
135
|
+
* @param require_encrypted_name_resolution
|
|
136
|
+
* If true, require that any name resolution using DNS is performed
|
|
137
|
+
* with encryption. If false, allow cleartext resolution. Defaults to false.
|
|
138
|
+
*
|
|
139
|
+
* @param fallback_resolver_config
|
|
140
|
+
* An optional resolver configuration to use if no other encrypted DNS resolver
|
|
141
|
+
* is already configured for the query. This will only take effect if
|
|
142
|
+
* require_encrypted_name_resolution is set to true. If this configuration is
|
|
143
|
+
* NULL and require_encrypted_name_resolution is set to true, all cleartext
|
|
144
|
+
* name resolution will be blocked.
|
|
145
|
+
*/
|
|
146
|
+
API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0))
|
|
147
|
+
void
|
|
148
|
+
nw_privacy_context_require_encrypted_name_resolution(nw_privacy_context_t privacy_context,
|
|
149
|
+
bool require_encrypted_name_resolution,
|
|
150
|
+
_Nullable nw_resolver_config_t fallback_resolver_config);
|
|
151
|
+
|
|
152
|
+
/*!
|
|
153
|
+
* @function nw_privacy_context_add_proxy
|
|
154
|
+
*
|
|
155
|
+
* @abstract
|
|
156
|
+
* Add a proxy configuration to apply to all connections that participate in this
|
|
157
|
+
* context. If set on `NW_DEFAULT_PRIVACY_CONTEXT`, this will additionally
|
|
158
|
+
* apply to other networking APIs used by the calling process.
|
|
159
|
+
*
|
|
160
|
+
* @param privacy_context
|
|
161
|
+
* A privacy context to modify. This can include the default privacy context.
|
|
162
|
+
*
|
|
163
|
+
* @param proxy_config
|
|
164
|
+
* A proxy configuration object to apply to all connections that use this context.
|
|
165
|
+
*/
|
|
166
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
167
|
+
void
|
|
168
|
+
nw_privacy_context_add_proxy(nw_privacy_context_t privacy_context,
|
|
169
|
+
nw_proxy_config_t proxy_config);
|
|
170
|
+
|
|
171
|
+
/*!
|
|
172
|
+
* @function nw_privacy_context_clear_proxies
|
|
173
|
+
*
|
|
174
|
+
* @abstract
|
|
175
|
+
* Clear out any proxies added using `nw_privacy_context_add_proxy`.
|
|
176
|
+
*
|
|
177
|
+
* @param privacy_context
|
|
178
|
+
* A privacy context to modify. This can include the default privacy context.
|
|
179
|
+
*/
|
|
180
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
181
|
+
void
|
|
182
|
+
nw_privacy_context_clear_proxies(nw_privacy_context_t privacy_context);
|
|
183
|
+
|
|
184
|
+
NW_ASSUME_NONNULL_END
|
|
185
|
+
|
|
186
|
+
__END_DECLS
|
|
187
|
+
|
|
188
|
+
#endif // __NW_PRIVACY_CONTEXT_H__
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
//
|
|
2
|
+
// protocol_options.h
|
|
3
|
+
// Network
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2017-2019 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_PROTOCOL_OPTIONS_H__
|
|
9
|
+
#define __NW_PROTOCOL_OPTIONS_H__
|
|
10
|
+
|
|
11
|
+
#ifndef __NW_INDIRECT__
|
|
12
|
+
#warning "Please include <Network/Network.h> instead of this file directly."
|
|
13
|
+
#endif // __NW_INDIRECT__
|
|
14
|
+
|
|
15
|
+
#include <Network/nw_object.h>
|
|
16
|
+
#include <stdint.h>
|
|
17
|
+
#include <stdbool.h>
|
|
18
|
+
#include <stdlib.h>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__BEGIN_DECLS
|
|
22
|
+
|
|
23
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
24
|
+
|
|
25
|
+
/*!
|
|
26
|
+
* @typedef nw_protocol_definition_t
|
|
27
|
+
* @abstract
|
|
28
|
+
* A Network Protocol Definition is a handle that represents a protocol implementation
|
|
29
|
+
* that can be added into a protocol stack, configured, and used to transmit data and
|
|
30
|
+
* metadata. For example, a protocol definition for TCP represents an implementation of
|
|
31
|
+
* TCP that can be used for a connection.
|
|
32
|
+
*
|
|
33
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
34
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
35
|
+
*/
|
|
36
|
+
#ifndef NW_PROTOCOL_DEFINITION_IMPL
|
|
37
|
+
NW_OBJECT_DECL(nw_protocol_definition);
|
|
38
|
+
#endif // NW_PROTOCOL_DEFINITION_IMPL
|
|
39
|
+
|
|
40
|
+
/*!
|
|
41
|
+
* @function nw_protocol_definition_is_equal
|
|
42
|
+
*
|
|
43
|
+
* @abstract
|
|
44
|
+
* Compare two protocol definitions to check if they represent the same protocol.
|
|
45
|
+
*
|
|
46
|
+
* @param definition1
|
|
47
|
+
* The first definition to compare
|
|
48
|
+
*
|
|
49
|
+
* @param definition2
|
|
50
|
+
* The second definition to compare
|
|
51
|
+
*
|
|
52
|
+
* @result
|
|
53
|
+
* Returns true if the definitions represent the same protocol, false otherwise.
|
|
54
|
+
*/
|
|
55
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
56
|
+
bool
|
|
57
|
+
nw_protocol_definition_is_equal(nw_protocol_definition_t definition1, nw_protocol_definition_t definition2);
|
|
58
|
+
|
|
59
|
+
/*!
|
|
60
|
+
* @typedef nw_protocol_options_t
|
|
61
|
+
* @abstract
|
|
62
|
+
* A Network Protocol Options object holds a single definition (nw_protocol_definition_t)
|
|
63
|
+
* along with a set of protocol-specific options. The options are used to build protocol
|
|
64
|
+
* stack definitions in an nw_parameters_t object. Each protocol is responsible for
|
|
65
|
+
* defining its own accessor functions to set and get options.
|
|
66
|
+
*
|
|
67
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
68
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
69
|
+
*/
|
|
70
|
+
#ifndef NW_PROTOCOL_OPTIONS_IMPL
|
|
71
|
+
NW_OBJECT_DECL(nw_protocol_options);
|
|
72
|
+
#endif // NW_PROTOCOL_OPTIONS_IMPL
|
|
73
|
+
|
|
74
|
+
/*!
|
|
75
|
+
* @function nw_protocol_options_copy_definition
|
|
76
|
+
*
|
|
77
|
+
* @abstract
|
|
78
|
+
* Retrieve the protocol definition for a given options object.
|
|
79
|
+
*
|
|
80
|
+
* @param options
|
|
81
|
+
* The protocol options to check
|
|
82
|
+
*
|
|
83
|
+
* @result
|
|
84
|
+
* Returns a reference-counted protocol definition object.
|
|
85
|
+
*/
|
|
86
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
87
|
+
NW_RETURNS_RETAINED nw_protocol_definition_t
|
|
88
|
+
nw_protocol_options_copy_definition(nw_protocol_options_t options);
|
|
89
|
+
|
|
90
|
+
/*!
|
|
91
|
+
* @typedef nw_protocol_metadata_t
|
|
92
|
+
* @abstract
|
|
93
|
+
* A Network Protocol Metadata object holds a single definition (nw_protocol_definition_t)
|
|
94
|
+
* along with a set of protocol-specific metadata. This metadata allows clients to pass down
|
|
95
|
+
* protocol requirements specific to some content being sent, as well as to retrieve metadata
|
|
96
|
+
* specific to some content that was received. Each protocol is responsible for defining
|
|
97
|
+
* its own accessor functions to set and get metadata.
|
|
98
|
+
*
|
|
99
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
100
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
101
|
+
*/
|
|
102
|
+
#ifndef NW_PROTOCOL_METADATA_IMPL
|
|
103
|
+
NW_OBJECT_DECL(nw_protocol_metadata);
|
|
104
|
+
#endif // NW_PROTOCOL_METADATA_IMPL
|
|
105
|
+
|
|
106
|
+
/*!
|
|
107
|
+
* @function nw_protocol_metadata_copy_definition
|
|
108
|
+
*
|
|
109
|
+
* @abstract
|
|
110
|
+
* Retrieve the protocol definition for a given metadata object.
|
|
111
|
+
*
|
|
112
|
+
* @param metadata
|
|
113
|
+
* The protocol metadata to check
|
|
114
|
+
*
|
|
115
|
+
* @result
|
|
116
|
+
* Returns a reference-counted protocol definition object.
|
|
117
|
+
*/
|
|
118
|
+
API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0))
|
|
119
|
+
NW_RETURNS_RETAINED nw_protocol_definition_t
|
|
120
|
+
nw_protocol_metadata_copy_definition(nw_protocol_metadata_t metadata);
|
|
121
|
+
|
|
122
|
+
NW_ASSUME_NONNULL_END
|
|
123
|
+
|
|
124
|
+
__END_DECLS
|
|
125
|
+
|
|
126
|
+
#endif // __NW_PROTOCOL_OPTIONS_H__
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
//
|
|
2
|
+
// proxy_config.h
|
|
3
|
+
// libnetwork
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2023 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef __NW_PROXY_CONFIG_H__
|
|
9
|
+
#define __NW_PROXY_CONFIG_H__
|
|
10
|
+
|
|
11
|
+
#ifndef __NW_INDIRECT__
|
|
12
|
+
#warning "Please include <Network/Network.h> instead of this file directly."
|
|
13
|
+
#endif // __NW_INDIRECT__
|
|
14
|
+
|
|
15
|
+
#include <Network/nw_object.h>
|
|
16
|
+
#include <Network/endpoint.h>
|
|
17
|
+
#include <Network/protocol_options.h>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
NW_ASSUME_NONNULL_BEGIN
|
|
21
|
+
|
|
22
|
+
__BEGIN_DECLS
|
|
23
|
+
|
|
24
|
+
/*!
|
|
25
|
+
* @typedef nw_proxy_config_t
|
|
26
|
+
* @abstract
|
|
27
|
+
* A Proxy Config object stores a proxy configuration. These can be used to specify custom
|
|
28
|
+
* proxies, such as ones that use HTTP CONNECT.
|
|
29
|
+
*
|
|
30
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
31
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
32
|
+
*/
|
|
33
|
+
#ifndef NW_PROXY_CONFIG_IMPL
|
|
34
|
+
NW_OBJECT_DECL(nw_proxy_config);
|
|
35
|
+
#endif // NW_PROXY_CONFIG_IMPL
|
|
36
|
+
|
|
37
|
+
#pragma mark - Secure Relays
|
|
38
|
+
|
|
39
|
+
/*!
|
|
40
|
+
* @typedef nw_relay_hop_t
|
|
41
|
+
* @abstract
|
|
42
|
+
* A Relay Hop object represents a single hop in a multi-hop relay configuration.
|
|
43
|
+
*
|
|
44
|
+
* This type supports ARC and the -[description] method. In non-ARC files, use
|
|
45
|
+
* nw_retain() and nw_release() to retain and release the object.
|
|
46
|
+
*/
|
|
47
|
+
#ifndef NW_RELAY_HOP_IMPL
|
|
48
|
+
NW_OBJECT_DECL(nw_relay_hop);
|
|
49
|
+
#endif // NW_RELAY_HOP_IMPL
|
|
50
|
+
|
|
51
|
+
/*!
|
|
52
|
+
* @function nw_relay_hop_create
|
|
53
|
+
*
|
|
54
|
+
* @abstract
|
|
55
|
+
* Creates a configuration for a secure relay. A relay is a proxy that is accessible using
|
|
56
|
+
* HTTP/3, HTTP/2, or both, and uses the CONNECT method to proxy TCP or UDP
|
|
57
|
+
* connections. At least one of `http3_relay_endpoint` and
|
|
58
|
+
* `http2_relay_endpoint` must be non-null.
|
|
59
|
+
*
|
|
60
|
+
* @param http3_relay_endpoint
|
|
61
|
+
* A URL or host endpoint identifying the relay server accessible using HTTP/3.
|
|
62
|
+
*
|
|
63
|
+
* @param http2_relay_endpoint
|
|
64
|
+
* A URL or host endpoint identifying the relay server accessible using HTTP/2.
|
|
65
|
+
*
|
|
66
|
+
* @param relay_tls_options
|
|
67
|
+
* Optional TLS options to use for the TLS handshake to the relay. If this is null, default
|
|
68
|
+
* TLS options will be used.
|
|
69
|
+
*
|
|
70
|
+
* @result
|
|
71
|
+
* Returns an allocated `nw_relay_hop_t` object on success.
|
|
72
|
+
*/
|
|
73
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
74
|
+
NW_RETURNS_RETAINED nw_relay_hop_t
|
|
75
|
+
nw_relay_hop_create(nw_endpoint_t _Nullable http3_relay_endpoint,
|
|
76
|
+
nw_endpoint_t _Nullable http2_relay_endpoint,
|
|
77
|
+
nw_protocol_options_t _Nullable relay_tls_options);
|
|
78
|
+
|
|
79
|
+
/*!
|
|
80
|
+
* @function nw_relay_hop_add_additional_http_header_field
|
|
81
|
+
*
|
|
82
|
+
* @abstract
|
|
83
|
+
* Adds additional HTTP headers to send as part of CONNECT requests to the
|
|
84
|
+
* relay.
|
|
85
|
+
*
|
|
86
|
+
* @param relay_hop
|
|
87
|
+
* The proxy hop object.
|
|
88
|
+
*
|
|
89
|
+
* @param field_name
|
|
90
|
+
* The HTTP header field name.
|
|
91
|
+
*
|
|
92
|
+
* @param field_value
|
|
93
|
+
* The HTTP header field value.
|
|
94
|
+
*/
|
|
95
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
96
|
+
void
|
|
97
|
+
nw_relay_hop_add_additional_http_header_field(nw_relay_hop_t relay_hop,
|
|
98
|
+
const char *field_name,
|
|
99
|
+
const char *field_value);
|
|
100
|
+
|
|
101
|
+
/*!
|
|
102
|
+
* @function nw_proxy_config_create_relay
|
|
103
|
+
*
|
|
104
|
+
* @abstract
|
|
105
|
+
* Creates a proxy configuration with one or two secure relay hops.
|
|
106
|
+
*
|
|
107
|
+
* @param first_hop
|
|
108
|
+
* The first or only relay hop.
|
|
109
|
+
*
|
|
110
|
+
* @param second_hop
|
|
111
|
+
* An optional second relay hop.
|
|
112
|
+
*
|
|
113
|
+
* @result
|
|
114
|
+
* Returns an allocated `nw_proxy_config_t` object on success.
|
|
115
|
+
*/
|
|
116
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
117
|
+
NW_RETURNS_RETAINED nw_proxy_config_t
|
|
118
|
+
nw_proxy_config_create_relay(nw_relay_hop_t first_hop,
|
|
119
|
+
nw_relay_hop_t _Nullable second_hop);
|
|
120
|
+
|
|
121
|
+
#pragma mark - Oblivious HTTP
|
|
122
|
+
|
|
123
|
+
/*!
|
|
124
|
+
* @function nw_proxy_config_create_oblivious_http
|
|
125
|
+
*
|
|
126
|
+
* @abstract
|
|
127
|
+
* Creates a proxy configuration for an Oblivious HTTP relay and gateway. Note that
|
|
128
|
+
* Oblivious HTTP proxy configurations must also have specific match domains specified
|
|
129
|
+
* using `nw_proxy_config_add_match_domain`.
|
|
130
|
+
*
|
|
131
|
+
* @param relay
|
|
132
|
+
* The Oblivious HTTP relay hop.
|
|
133
|
+
*
|
|
134
|
+
* @param relay_resource_path
|
|
135
|
+
* The HTTP path to use for requests to the Oblivious HTTP relay that will forward requests to the gateway.
|
|
136
|
+
*
|
|
137
|
+
* @param gateway_key_config
|
|
138
|
+
* The key configuration for the Oblivious HTTP gateway, or a list of key configurations where each configuration
|
|
139
|
+
* is prefixed with a two-byte length in network byte order.
|
|
140
|
+
*
|
|
141
|
+
* @param gateway_key_config_length
|
|
142
|
+
* The length of the buffer in `gateway_key_config`.
|
|
143
|
+
*
|
|
144
|
+
* @result
|
|
145
|
+
* Returns an allocated `nw_proxy_config_t` object on success.
|
|
146
|
+
*/
|
|
147
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
148
|
+
NW_RETURNS_RETAINED nw_proxy_config_t
|
|
149
|
+
nw_proxy_config_create_oblivious_http(nw_relay_hop_t relay,
|
|
150
|
+
const char *relay_resource_path,
|
|
151
|
+
const uint8_t *gateway_key_config,
|
|
152
|
+
size_t gateway_key_config_length);
|
|
153
|
+
|
|
154
|
+
#pragma mark - HTTP CONNECT Proxies
|
|
155
|
+
|
|
156
|
+
/*!
|
|
157
|
+
* @function nw_proxy_config_create_http_connect
|
|
158
|
+
*
|
|
159
|
+
* @abstract
|
|
160
|
+
* Creates a legacy HTTP CONNECT proxy configuration for a proxy server accessible
|
|
161
|
+
* using HTTP/1.1. This proxy will only relay TCP connections.
|
|
162
|
+
*
|
|
163
|
+
* @param proxy_endpoint
|
|
164
|
+
* A host endpoint identifying the proxy server accessible using HTTP/1.1.
|
|
165
|
+
*
|
|
166
|
+
* @param proxy_tls_options
|
|
167
|
+
* Optional TLS options to use for a TLS handshake to the relay. If no options are provided,
|
|
168
|
+
* the proxy will be accessed using cleartext HTTP.
|
|
169
|
+
*
|
|
170
|
+
* @result
|
|
171
|
+
* Returns an allocated `nw_proxy_config_t` object on success.
|
|
172
|
+
*/
|
|
173
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
174
|
+
NW_RETURNS_RETAINED nw_proxy_config_t
|
|
175
|
+
nw_proxy_config_create_http_connect(nw_endpoint_t proxy_endpoint,
|
|
176
|
+
nw_protocol_options_t _Nullable proxy_tls_options);
|
|
177
|
+
|
|
178
|
+
#pragma mark - SOCKS Proxies
|
|
179
|
+
|
|
180
|
+
/*!
|
|
181
|
+
* @function nw_proxy_config_create_socksv5
|
|
182
|
+
*
|
|
183
|
+
* @abstract
|
|
184
|
+
* Creates a SOCKSv5 proxy configuration.
|
|
185
|
+
*
|
|
186
|
+
* @param proxy_endpoint
|
|
187
|
+
* A host endpoint identifying the SOCKS proxy server.
|
|
188
|
+
*
|
|
189
|
+
* @result
|
|
190
|
+
* Returns an allocated `nw_proxy_config_t` object on success.
|
|
191
|
+
*/
|
|
192
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
193
|
+
NW_RETURNS_RETAINED nw_proxy_config_t
|
|
194
|
+
nw_proxy_config_create_socksv5(nw_endpoint_t proxy_endpoint);
|
|
195
|
+
|
|
196
|
+
#pragma mark - Generic Proxy Options
|
|
197
|
+
|
|
198
|
+
/*!
|
|
199
|
+
* @function nw_proxy_config_set_username_and_password
|
|
200
|
+
*
|
|
201
|
+
* @abstract
|
|
202
|
+
* Configures a username and password to use with a proxy configuration.
|
|
203
|
+
*
|
|
204
|
+
* @param proxy_config
|
|
205
|
+
* The proxy configuration object.
|
|
206
|
+
*
|
|
207
|
+
* @param username
|
|
208
|
+
* A proxy authentication username.
|
|
209
|
+
*
|
|
210
|
+
* @param password
|
|
211
|
+
* A proxy authentication password.
|
|
212
|
+
*/
|
|
213
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
214
|
+
void
|
|
215
|
+
nw_proxy_config_set_username_and_password(nw_proxy_config_t proxy_config,
|
|
216
|
+
const char *username,
|
|
217
|
+
const char * _Nullable password);
|
|
218
|
+
|
|
219
|
+
/*!
|
|
220
|
+
* @function nw_proxy_config_set_failover_allowed
|
|
221
|
+
*
|
|
222
|
+
* @abstract
|
|
223
|
+
* Set whether or not a proxy configuration allows failover to non-proxied connections.
|
|
224
|
+
* Failover is not allowed by default.
|
|
225
|
+
*
|
|
226
|
+
* @param proxy_config
|
|
227
|
+
* The proxy configuration object.
|
|
228
|
+
*
|
|
229
|
+
* @param failover_allowed
|
|
230
|
+
* A Boolean indicating if failover is allowed.
|
|
231
|
+
*/
|
|
232
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
233
|
+
void
|
|
234
|
+
nw_proxy_config_set_failover_allowed(nw_proxy_config_t proxy_config,
|
|
235
|
+
bool failover_allowed);
|
|
236
|
+
|
|
237
|
+
/*!
|
|
238
|
+
* @function nw_proxy_config_get_failover_allowed
|
|
239
|
+
*
|
|
240
|
+
* @abstract
|
|
241
|
+
* Check whether or not a proxy configuration allows failover to non-proxied connections.
|
|
242
|
+
*
|
|
243
|
+
* @param proxy_config
|
|
244
|
+
* The proxy configuration object.
|
|
245
|
+
*
|
|
246
|
+
* @result
|
|
247
|
+
* A Boolean indicating if failover is allowed.
|
|
248
|
+
*/
|
|
249
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
250
|
+
bool
|
|
251
|
+
nw_proxy_config_get_failover_allowed(nw_proxy_config_t proxy_config);
|
|
252
|
+
|
|
253
|
+
/*!
|
|
254
|
+
* @function nw_proxy_config_add_match_domain
|
|
255
|
+
*
|
|
256
|
+
* @abstract
|
|
257
|
+
* Adds a domain to define which hosts should use the proxy.
|
|
258
|
+
*
|
|
259
|
+
* @param config
|
|
260
|
+
* The proxy configuration object.
|
|
261
|
+
*
|
|
262
|
+
* @param match_domain
|
|
263
|
+
* The domain suffix to match hostnames against, as a string.
|
|
264
|
+
*/
|
|
265
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
266
|
+
void
|
|
267
|
+
nw_proxy_config_add_match_domain(nw_proxy_config_t config,
|
|
268
|
+
const char *match_domain);
|
|
269
|
+
|
|
270
|
+
/*!
|
|
271
|
+
* @function nw_proxy_config_clear_match_domains
|
|
272
|
+
*
|
|
273
|
+
* @abstract
|
|
274
|
+
* Clears all match domains defined for the proxy.
|
|
275
|
+
*
|
|
276
|
+
* @param config
|
|
277
|
+
* The proxy configuration object.
|
|
278
|
+
*/
|
|
279
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
280
|
+
void
|
|
281
|
+
nw_proxy_config_clear_match_domains(nw_proxy_config_t config);
|
|
282
|
+
|
|
283
|
+
/*!
|
|
284
|
+
* @function nw_proxy_config_add_excluded_domain
|
|
285
|
+
*
|
|
286
|
+
* @abstract
|
|
287
|
+
* Adds a domain to define which hosts should not use the proxy.
|
|
288
|
+
*
|
|
289
|
+
* @param config
|
|
290
|
+
* The proxy configuration object.
|
|
291
|
+
*
|
|
292
|
+
* @param excluded_domain
|
|
293
|
+
* The domain suffix to match hostnames against, as a string.
|
|
294
|
+
*/
|
|
295
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
296
|
+
void
|
|
297
|
+
nw_proxy_config_add_excluded_domain(nw_proxy_config_t config,
|
|
298
|
+
const char *excluded_domain);
|
|
299
|
+
|
|
300
|
+
/*!
|
|
301
|
+
* @function nw_proxy_config_clear_excluded_domains
|
|
302
|
+
*
|
|
303
|
+
* @abstract
|
|
304
|
+
* Clears all excluded domains defined for the proxy.
|
|
305
|
+
*
|
|
306
|
+
* @param config
|
|
307
|
+
* The proxy configuration object.
|
|
308
|
+
*/
|
|
309
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
310
|
+
void
|
|
311
|
+
nw_proxy_config_clear_excluded_domains(nw_proxy_config_t config);
|
|
312
|
+
|
|
313
|
+
#ifdef __BLOCKS__
|
|
314
|
+
|
|
315
|
+
typedef void (^nw_proxy_domain_enumerator_t)(const char *);
|
|
316
|
+
|
|
317
|
+
/*!
|
|
318
|
+
* @function nw_proxy_config_enumerate_match_domains
|
|
319
|
+
*
|
|
320
|
+
* @abstract
|
|
321
|
+
* Enumerate all match domains set on the proxy configuration.
|
|
322
|
+
*
|
|
323
|
+
* @param config
|
|
324
|
+
* The proxy configuration object.
|
|
325
|
+
*
|
|
326
|
+
* @param enumerator
|
|
327
|
+
* A block that will get invoked for every domain that was added to the proxy configuration.
|
|
328
|
+
*/
|
|
329
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
330
|
+
void
|
|
331
|
+
nw_proxy_config_enumerate_match_domains(nw_proxy_config_t config,
|
|
332
|
+
NW_NOESCAPE nw_proxy_domain_enumerator_t enumerator);
|
|
333
|
+
|
|
334
|
+
/*!
|
|
335
|
+
* @function nw_proxy_config_enumerate_excluded_domains
|
|
336
|
+
*
|
|
337
|
+
* @abstract
|
|
338
|
+
* Enumerate all excluded domains set on the proxy configuration.
|
|
339
|
+
*
|
|
340
|
+
* @param config
|
|
341
|
+
* The proxy configuration object.
|
|
342
|
+
*
|
|
343
|
+
* @param enumerator
|
|
344
|
+
* A block that will get invoked for every domain that was added to the proxy configuration.
|
|
345
|
+
*/
|
|
346
|
+
API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0))
|
|
347
|
+
void
|
|
348
|
+
nw_proxy_config_enumerate_excluded_domains(nw_proxy_config_t config,
|
|
349
|
+
NW_NOESCAPE nw_proxy_domain_enumerator_t enumerator);
|
|
350
|
+
|
|
351
|
+
#endif // __BLOCKS__
|
|
352
|
+
|
|
353
|
+
__END_DECLS
|
|
354
|
+
|
|
355
|
+
NW_ASSUME_NONNULL_END
|
|
356
|
+
|
|
357
|
+
#endif // __NW_PROXY_CONFIG_H__
|