How jon5307/ios-exitnode works
gateway is an iOS userspace WireGuard exit-node experiment. An operator starts the gateway and provisions client peers in the app; the Go backend runs WireGuard and forwards client TCP/UDP traffic through gVisor netstack. The app also offers configuration delivery and a SideStore repair flow that patches and repackages an IPA. The README documents the backend and repair capabilities; several Go internals and app helpers were not sampled, so their detailed call relationships are omitted.
Main entry points: ContentView.swift Gateway UI · SideStoreRepairController.swift Repair Controller · WireGuardPeerManager.swift Peer Manager · gatewaywg.go Gateway Backend
Components 19
iOS Gateway App
- Gateway UI
gateway/ContentView.swift - Peer Manager
gateway/WireGuardPeerManager.swift - Client Provisioning
gateway/ClientProvisioning/ClientProvisioningView.swift - Config Web Server
gateway/ClientProvisioning/ConfigurationWebServer.swift - UDP Server
gateway/UDPServer.swift - Go Bridge
gateway/WireGuardGoBridge.swift
WireGuard Backend
- Gateway Backend
WireGuardGo/gatewaywg.go - WireGuard Device
WireGuardGo/wireguard-go/device/device.go - TCP/UDP Netstack
WireGuardGo/wireguard-go/tun/netstack/tun.go
SideStore Repair
- Repair Controller
gateway/BackgroundProcessing/SideStoreRepairController.swift - Compatibility Check
gateway/BackgroundProcessing/BackgroundCompatibilityService.swift - IPA Repair
gateway/BackgroundProcessing/IPARepairService.swift - Continued Processing
gateway/BackgroundProcessing/ContinuedProcessingController.swift
ZIP Processing
- ZIP File Operations
gateway/ThirdParty/ZIPFoundation/FileManager+ZIP.swift - ZIP Archive
gateway/ThirdParty/ZIPFoundation/Archive.swift - ZIP Writing
gateway/ThirdParty/ZIPFoundation/Archive+Writing.swift
Other components
- Operator
- Client Device
- Outbound Network
Connections 20
- Operator → Gateway UI: operates
gateway/ContentView.swift - Gateway UI → Peer Manager: starts gateway
gateway/ContentView.swift - Gateway UI → UDP Server: controls
gateway/ContentView.swift - Gateway UI → Client Provisioning: presents
gateway/ContentView.swift - Gateway UI → Config Web Server: starts download
gateway/ContentView.swift - Client Provisioning → Peer Manager: creates peer
gateway/ClientProvisioning/ClientProvisioningView.swift - Client Device → Config Web Server: downloads profile
- Peer Manager → Go Bridge: starts backend
gateway/WireGuardPeerManager.swift - Go Bridge → Gateway Backend: invokes Go API
- Client Device → Gateway Backend: connects as peer
README.md - Gateway Backend → WireGuard Device: runs WireGuard
README.md - WireGuard Device → TCP/UDP Netstack: forwards traffic
README.md - TCP/UDP Netstack → Outbound Network: routes TCP/UDP
README.md - Gateway UI → Repair Controller: opens repair
gateway/ContentView.swift - Repair Controller → Compatibility Check: checks compatibility
gateway/BackgroundProcessing/SideStoreRepairController.swift - Repair Controller → IPA Repair: creates fixed IPA
gateway/BackgroundProcessing/SideStoreRepairController.swift - Gateway UI → Continued Processing: controls processing
gateway/ContentView.swift - IPA Repair → ZIP File Operations: unzips and zips
README.md - ZIP File Operations → ZIP Archive: uses archive
gateway/ThirdParty/ZIPFoundation/FileManager+ZIP.swift - ZIP Archive → ZIP Writing: adds entries
gateway/ThirdParty/ZIPFoundation/Archive+Writing.swift