Documentation
¶
Overview ¶
Package ios configures iOS simulators and devices for HTTPS interception. Simulator CA install is automated via xcrun simctl; physical devices use a generated .mobileconfig (proxy + CA) the operator installs in Safari.
Index ¶
- Constants
- func Available() bool
- func BuildMobileConfig(certPEM []byte, opts ProfileOpts) ([]byte, error)
- func IDeviceAvailable() bool
- func InstallCASimulator(d Device, certPEM []byte) error
- func LANHost() (string, error)
- func OpenURL(d Device, rawURL string) error
- func SimctlAvailable() bool
- type Device
- type ProfileOpts
- type SetupOpts
- type SetupResult
Constants ¶
const ( KindSimulator = "simulator" KindPhysical = "physical" )
DeviceKind distinguishes simulators from USB-connected iPhones.
Variables ¶
This section is empty.
Functions ¶
func Available ¶
func Available() bool
Available reports whether any automated iOS backend exists on this machine.
func BuildMobileConfig ¶
func BuildMobileConfig(certPEM []byte, opts ProfileOpts) ([]byte, error)
BuildMobileConfig returns a .mobileconfig plist installing the CA and manual HTTP proxy.
func IDeviceAvailable ¶
func IDeviceAvailable() bool
IDeviceAvailable reports whether libimobiledevice is on PATH.
func InstallCASimulator ¶
InstallCASimulator adds the Interceptor CA to a simulator trust store.
func SimctlAvailable ¶
func SimctlAvailable() bool
SimctlAvailable reports whether Xcode simctl is usable (macOS only).
Types ¶
type Device ¶
type Device struct {
Kind string `json:"kind"`
UDID string `json:"udid"`
Name string `json:"name"`
State string `json:"state,omitempty"`
Runtime string `json:"runtime,omitempty"`
Booted bool `json:"booted,omitempty"`
SuggestedTarget string `json:"suggestedTarget,omitempty"` // simulator | physical
}
Device is a simulator or USB-connected iOS device.
func AllDevices ¶
AllDevices returns simulators then physical devices.
func PhysicalDevices ¶
PhysicalDevices lists USB-connected iOS devices via idevice_id.
func ResolveDevice ¶
ResolveDevice picks explicit udid or the sole booted simulator / connected phone.
func Simulators ¶
Simulators lists iOS simulators (booted ones first).
type ProfileOpts ¶
ProfileOpts configures an unsigned configuration profile (CA + global HTTP proxy).
type SetupOpts ¶
type SetupOpts struct {
Target string // simulator | physical | auto
ProxyMode string // localhost (simulator) | wifi (physical, default)
WiFiHost string
Port int
ProfileURL string // control plane URL prefix for profile download
}
SetupOpts configures one-click iOS intercept setup.
type SetupResult ¶
type SetupResult struct {
UDID string `json:"udid"`
Kind string `json:"kind"`
Proxy string `json:"proxy,omitempty"`
ProfileURL string `json:"profileUrl,omitempty"`
Steps []string `json:"steps"`
NeedsUserAction bool `json:"needsUserAction,omitempty"`
Message string `json:"message"`
}
SetupResult is returned from Setup.