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.
Package ios — SSH helpers for jailbroken iOS devices (OpenSSH as root). Credentials are supplied per request and are never persisted by Interceptor.
Index ¶
- Constants
- func Available() bool
- func BuildMobileConfig(certPEM []byte, opts ProfileOpts) ([]byte, error)
- func BuildProfileURL(baseURL, proxyHost string, proxyPort int) string
- func IDeviceAvailable() bool
- func InstallCASimulator(d Device, certPEM []byte) error
- func LANHost() (string, error)
- func OpenURL(d Device, rawURL string) error
- func SSHAvailable() bool
- func SimctlAvailable() bool
- func TCPReachable(host string, port int) bool
- type Device
- type ProfileOpts
- type SSHOpts
- type SSHResult
- type SSHSetupOpts
- 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 BuildProfileURL ¶ added in v0.22.0
BuildProfileURL returns the control-plane mobileconfig download URL.
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 SSHAvailable ¶ added in v0.22.0
func SSHAvailable() bool
SSHAvailable reports whether the embedded SSH client can be used (always true).
func SimctlAvailable ¶
func SimctlAvailable() bool
SimctlAvailable reports whether Xcode simctl is usable (macOS only).
func TCPReachable ¶ added in v0.22.0
TCPReachable checks whether host:port accepts a TCP connection (no SSH auth).
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 SSHOpts ¶ added in v0.22.0
type SSHOpts struct {
Host string
Port int
User string
Password string
KeyPath string
KeyPEM []byte // in-memory key material (preferred over KeyPath when set)
}
SSHOpts configures SSH access to a jailbroken iOS device.
type SSHResult ¶ added in v0.22.0
type SSHResult struct {
Host string `json:"host"`
User string `json:"user"`
Port int `json:"port,omitempty"`
Reachable bool `json:"reachable"`
Authenticated bool `json:"authenticated,omitempty"`
Steps []string `json:"steps,omitempty"`
ProfileURL string `json:"profileUrl,omitempty"`
Proxy string `json:"proxy,omitempty"`
NeedsUserAction bool `json:"needsUserAction,omitempty"`
Message string `json:"message"`
Warning string `json:"warning,omitempty"`
Method string `json:"method,omitempty"`
}
SSHResult is returned from SSH automation steps.
func SSHInstallCA ¶ added in v0.22.0
SSHInstallCA opens the Interceptor mobileconfig on the device for manual install.
func SSHSetup ¶ added in v0.22.0
func SSHSetup(opts SSHSetupOpts) (*SSHResult, error)
SSHSetup installs the configuration profile (CA + global HTTP proxy) via SSH.
type SSHSetupOpts ¶ added in v0.22.0
type SSHSetupOpts struct {
SSHOpts
ProxyHost string
ProxyPort int
ProfileURL string // control plane base URL (scheme + host[:port])
}
SSHSetupOpts configures one-click jailbroken iOS intercept setup.
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.