apxy device prepares a booted iOS simulator or a running Android emulator to send its traffic through APXY. See Mobile Setup.
apxy device
Prepare iOS simulators and Android emulators to send their traffic through APXY
Options
-h, --help help for deviceOptions inherited from parent commands
--config string config file (default is ~/.apxy/config.yaml)
--error-format string error output format: text|json (default "text")
--help-format string help output format: default|agent (default "default")
--no-project ignore project .apxy/ and use global ~/.apxy (env: APXY_NO_PROJECT=1)
--output string output format: agent|human (default: auto-detect via TTY)
--verbose enable verbose outputSEE ALSO
- apxy - Verify code changes against the HTTP requests they send
- apxy device list - List booted iOS simulators and running Android emulators
- apxy device setup - Install the APXY CA on a simulator or emulator, and point an Android emulator at the proxy
- apxy device teardown - Clear the HTTP proxy apxy device setup set on an Android emulator
apxy device list
List booted iOS simulators and running Android emulators
Synopsis
List the booted iOS simulators (through xcrun simctl, macOS only) and the running Android emulators (through adb) that apxy device setup can prepare. A missing xcrun or adb leaves its list empty with a warning that says why.
apxy device list [flags]Examples
apxy device listOptions
-h, --help help for listOptions inherited from parent commands
--config string config file (default is ~/.apxy/config.yaml)
--error-format string error output format: text|json (default "text")
--help-format string help output format: default|agent (default "default")
--no-project ignore project .apxy/ and use global ~/.apxy (env: APXY_NO_PROJECT=1)
--output string output format: agent|human (default: auto-detect via TTY)
--verbose enable verbose outputSEE ALSO
- apxy device - Prepare iOS simulators and Android emulators to send their traffic through APXY
apxy device setup
Install the APXY CA on a simulator or emulator, and point an Android emulator at the proxy
Synopsis
Prepare one simulator or emulator to send its traffic through APXY.
—ios-simulator installs the APXY CA into the simulator’s keychain with xcrun simctl; it touches nothing else. iOS simulator traffic goes through the macOS system proxy, which this command does not change: a person runs apxy start in a terminal to turn it on. That traffic carries no workspace, so mocks for it need —global.
—android-emulator copies the APXY CA to the emulator (into the user store for a person to finish installing, or with —system-store into the system store of an emulator started with -writable-system), then sets the emulator’s HTTP proxy to the host (10.0.2.2). In a workspace, with a proxy running, that is the port of the workspace on the proxy, which tags the traffic with the workspace, so its rules apply. The emulator keeps the setting after this command exits, so setup leases the port for 8 hours; run setup again to hold it longer. apxy device teardown clears the proxy and releases the port. Outside any workspace, or with no proxy running, the emulator gets the plain proxy port and its traffic is untagged; run setup again once a proxy runs to tag it.
Pass booted instead of an ID to pick the only booted simulator or running emulator. The CA is the one apxy start uses, generated when missing. The output lists what is left to do.
apxy device setup [flags]Examples
apxy device setup --ios-simulator booted
apxy device setup --android-emulator emulator-5554
apxy device setup --android-emulator booted --system-storeOptions
--android-emulator string serial of a running Android emulator (see apxy device list), or booted for the only one
-h, --help help for setup
--ios-simulator string UDID of a booted iOS simulator, or booted for the only one
--system-store install the CA into the Android system store (needs an emulator started with -writable-system) instead of leaving it for a person to installOptions inherited from parent commands
--config string config file (default is ~/.apxy/config.yaml)
--error-format string error output format: text|json (default "text")
--help-format string help output format: default|agent (default "default")
--no-project ignore project .apxy/ and use global ~/.apxy (env: APXY_NO_PROJECT=1)
--output string output format: agent|human (default: auto-detect via TTY)
--verbose enable verbose outputSEE ALSO
- apxy device - Prepare iOS simulators and Android emulators to send their traffic through APXY
apxy device teardown
Clear the HTTP proxy apxy device setup set on an Android emulator
Synopsis
Clear the HTTP proxy apxy device setup set on an Android emulator, so it connects directly again, and release the workspace port setup held open for it. The APXY CA stays installed. Clearing an emulator without a proxy changes nothing. An iOS simulator needs no teardown: setup only added the CA to its keychain.
apxy device teardown [flags]Examples
apxy device teardown --android-emulator emulator-5554Options
--android-emulator string serial of a running Android emulator, or booted for the only one
-h, --help help for teardownOptions inherited from parent commands
--config string config file (default is ~/.apxy/config.yaml)
--error-format string error output format: text|json (default "text")
--help-format string help output format: default|agent (default "default")
--no-project ignore project .apxy/ and use global ~/.apxy (env: APXY_NO_PROJECT=1)
--output string output format: agent|human (default: auto-detect via TTY)
--verbose enable verbose outputSEE ALSO
- apxy device - Prepare iOS simulators and Android emulators to send their traffic through APXY