Mobile Device Setup
Testing mobile apps is the primary use case for Ghost at Hepsiburada. This page explains how to connect different types of mobile devices — iOS Simulators, Android emulators, physical iPhones, and physical Android phones — so their network traffic flows through Ghost for capture and inspection.
The basic idea is the same for all device types: (1) tell the device to send its internet traffic through Ghost’s proxy, and (2) install Ghost’s CA certificate so the device trusts Ghost’s HTTPS interception. The specific steps vary by device type.
Quick Reference
Section titled “Quick Reference”| Device Type | Certificate Install | Proxy Configuration | Mobile Inspector Support | Difficulty |
|---|---|---|---|---|
| iOS Simulator | One-click (Ghost runs simctl for you) | Automatic (inherits Mac’s system proxy) | Yes — screenshots via simctl, UI tree via WDA | Easiest |
| Android Emulator | One-click (Ghost pushes via adb) | One-click (Ghost sets via adb) | Yes — screenshots via screencap, UI tree via uiautomator | Easy |
| iOS Physical Device | Manual — download profile, install, trust in Settings | Manual — configure Wi-Fi proxy settings | Limited without a companion app | Moderate |
| Android Physical Device | Manual — download cert, install from Settings | Manual — configure Wi-Fi proxy settings | Yes — connect via ADB over USB or Wi-Fi | Moderate |
Prerequisites
Section titled “Prerequisites”Before setting up any mobile device, make sure:
- Ghost is running with the proxy started (green “Capturing” indicator in the status bar)
- The CA certificate is installed on your Mac/PC (completed during first-run setup)
- For physical devices: Your phone and your computer must be on the same Wi-Fi network (so the phone can reach Ghost’s proxy server)
Network Info
Section titled “Network Info”Ghost provides all the connection details you need in Settings → Mobile Setup. You’ll see:
- Proxy Address:
{your_local_ip}:4545— your computer’s IP address on the local network, plus Ghost’s proxy port. For example,192.168.1.100:4545. This is the address you’ll enter on your mobile device. - Certificate URL:
http://{your_local_ip}:4545/ghost-ca.crt— a direct download link for Ghost’s CA certificate. Open this URL on your mobile device’s browser to download the certificate. - Landing Page:
http://ghost.proxy— a special page served by Ghost when any device is using its proxy. It provides the certificate download and setup instructions. - Two QR codes — one for the proxy address, one for the certificate URL. Scan these from your phone’s camera instead of typing long IP addresses manually.
iOS Simulator
Section titled “iOS Simulator”iOS Simulators run on your Mac as part of Xcode. They’re the easiest devices to set up because Ghost can configure everything automatically using Apple’s simctl command-line tool.
-
Simulators are auto-detected
Launch an iOS Simulator (from Xcode, or by running
open -a Simulator). Ghost usesxcrun simctl list devices --jsonto automatically detect all booted (running) simulators. They appear in the Mobile Setup panel within seconds — no manual pairing needed.You can have multiple simulators running simultaneously (for example, an iPhone 15 Pro and an iPad Pro). Ghost detects all of them.
-
One-click certificate install
Click the Install Certificate button next to any detected simulator. Ghost writes the CA certificate to a temporary file and runs:
Terminal window xcrun simctl keychain <UDID> add-root-cert /tmp/ghost-ca-xxxxx.crtThe
<UDID>is the simulator’s unique device identifier — Ghost fills this in automatically from the detected device list. This adds Ghost’s CA certificate to that specific simulator’s trust store. The temp file is cleaned up afterward. No manual steps needed — no navigating to Settings, no profile installation, no trust toggle. -
Proxy is automatic
Here’s the best part: iOS Simulators automatically inherit your Mac’s system proxy settings. If Ghost’s system proxy is enabled (the “SYS” badge is showing in the status bar), the simulator’s traffic is already routing through Ghost.
You should see the simulator’s traffic appearing in Ghost’s flow list as soon as you browse in Safari or use any app within the simulator.
That’s it for iOS Simulators. Two steps total: click “Install Certificate,” then browse. Ghost handles everything else.
Android Emulator
Section titled “Android Emulator”Android emulators (from Android Studio) require a couple more steps than iOS Simulators, but Ghost automates most of them through ADB (Android Debug Bridge — a tool that lets your computer communicate with Android devices).
-
Emulators are auto-detected
Launch an Android emulator from Android Studio or the AVD Manager. Ghost uses
adb devicesto detect running emulators. They appear in the Mobile Setup panel.Make sure ADB is in your system PATH. Ghost looks for it automatically. If you installed Android Studio, ADB is usually at
~/Library/Android/sdk/platform-tools/adbon macOS. -
Set Proxy (one click)
Click the Set Proxy button next to any detected emulator. Ghost runs:
Terminal window adb -s emulator-5554 shell settings put global http_proxy 10.0.2.2:4545The address
10.0.2.2is Android’s special alias for “the host machine’s localhost.” This is how the emulator reaches Ghost’s proxy running on your computer. You don’t need to figure out your IP address —10.0.2.2always works for emulators. -
Push Certificate (one click)
Click the Push Certificate button. Ghost pushes the CA certificate file to the emulator’s storage:
Terminal window adb -s emulator-5554 push ~/.ghost/ca.crt /sdcard/ghost-ca.crtThen you need to install it on the emulator manually (this step can’t be fully automated because Android requires user confirmation):
- On the emulator, go to Settings → Security → Encryption & credentials → Install a certificate → CA certificate
- Navigate to the Downloads or internal storage and select
ghost-ca.crt - Confirm the installation
After this, the emulator trusts Ghost’s certificates for HTTPS interception.
-
Clear Proxy when done
When you’re finished testing, click Clear Proxy to remove the proxy configuration from the emulator. This runs:
Terminal window adb -s emulator-5554 shell settings put global http_proxy :0If you don’t clear the proxy, the emulator will try to route traffic through Ghost even when Ghost isn’t running, causing all network requests to fail.
iOS Physical Device
Section titled “iOS Physical Device”Setting up a physical iPhone or iPad requires manual steps because Ghost can’t directly configure a physical device’s settings.
-
Connect to the same Wi-Fi network
Make sure your iPhone/iPad is on the same Wi-Fi network as your Mac running Ghost. The phone needs to be able to reach your Mac’s IP address.
-
Configure Wi-Fi proxy
On your iPhone/iPad:
- Open Settings → Wi-Fi
- Tap the (i) icon next to your connected network
- Scroll down to HTTP Proxy and select Manual
- Enter the server address and port from Ghost’s mobile setup panel:
- Server: your Mac’s IP address (e.g.,
192.168.1.100) - Port:
4545
- Server: your Mac’s IP address (e.g.,
-
Install the CA certificate
You have two options:
Option A — Configuration Profile (recommended): Open Safari (it must be Safari — other browsers can’t install profiles) and navigate to
http://ghost.proxy/ghost-profile.mobileconfigor scan the QR code from Ghost’s mobile setup panel. This downloads an iOS Configuration Profile that bundles Ghost’s CA certificate. Allow the download, then:- Go to Settings → General → VPN & Device Management (or “Profiles” on older iOS versions)
- You’ll see “Ghost CA Certificate” listed as a downloaded profile
- Tap it and tap Install (enter your device passcode if prompted)
- Important extra step: Go to Settings → General → About → Certificate Trust Settings
- Find “Ghost CA” and toggle it ON to enable full trust
- Without this second step, iOS downloads the certificate but doesn’t actually trust it for HTTPS
Option B — Direct certificate download: Navigate to
http://ghost.proxyin Safari. The landing page has a “Download Certificate” button that servesghost-ca.crtdirectly. Follow the same Settings steps above to install and trust it. -
Verify the connection
Back in Ghost’s mobile setup panel, click Test Connection. If everything is configured correctly, you’ll see a green “Connected from
<device_ip>” message. Traffic from your iPhone should now appear in Ghost’s flow list.
Android Physical Device
Section titled “Android Physical Device”Similar to iOS, physical Android devices require manual setup. You can connect via USB (with ADB) or over Wi-Fi.
-
Connect to the same Wi-Fi network
Make sure your Android phone is on the same Wi-Fi network as your computer running Ghost.
-
Configure Wi-Fi proxy
On your Android phone:
- Go to Settings → Wi-Fi (or Network & internet → Wi-Fi)
- Long-press your connected network name (or tap the gear icon)
- Select Modify network (or Advanced options)
- Change Proxy to Manual
- Enter:
- Proxy hostname: your computer’s IP address (e.g.,
192.168.1.100) - Proxy port:
4545
- Proxy hostname: your computer’s IP address (e.g.,
- Save the settings
-
Install the CA certificate
Open any browser on the phone and navigate to
http://ghost.proxyor scan the certificate QR code from Ghost’s mobile setup panel.Download the certificate file, then install it:
- Go to Settings → Security → Encryption & credentials → Install a certificate → CA certificate (exact path varies by Android version and manufacturer)
- Select the downloaded
ghost-ca.crtfile - Confirm the installation
On Android 7 (Nougat) and later, user-installed CA certificates are only trusted by apps that explicitly opt in. System apps and most third-party apps use the system trust store. For testing purposes, you may need a rooted device or to use an Android emulator with a writable system partition (API level 28 or lower).
-
Verify the connection
Click Test Connection in Ghost’s mobile setup panel to confirm the device is routing traffic through Ghost.
ghost.proxy Landing Page
Section titled “ghost.proxy Landing Page”When any device is configured to use Ghost as its proxy, navigating to http://ghost.proxy in any browser shows a branded landing page with:
- A Download Certificate button that serves
ghost-ca.crtwith the correct MIME type (application/x-x509-ca-cert) so the device recognizes it as a certificate file - Proxy address — the host IP and port to confirm the connection details
- Certificate URL — the direct download link (e.g.,
http://192.168.1.100:4545/ghost-ca.crt) - iOS Quick Setup — step-by-step: download cert → allow profile → install in VPN & Device Mgmt → enable in Certificate Trust Settings
- Android Quick Setup — step-by-step: download cert → install from Settings → Security → select the
.crtfile
This page works without any DNS configuration — Ghost’s proxy server intercepts any request with Host: ghost.proxy in the header and serves this page directly. Since the device is already using Ghost as its proxy, this “just works.”
The landing page also exposes two special endpoints:
/ghost-ca.crt— direct certificate download (works on any host, not justghost.proxy)/ghost-profile.mobileconfig— iOS Configuration Profile that bundles the CA certificate for one-tap install/verify— returns JSON{"connected": true, "client_ip": "..."}to confirm proxy connectivity
Connection Verification
Section titled “Connection Verification”Each device in the mobile setup panel has a Test Connection button. When clicked, the device hits Ghost’s verification endpoint through the proxy (GET http://ghost.proxy/verify), which returns:
{ "connected": true, "client_ip": "192.168.1.42"}A green “Connected from 192.168.1.42” message confirms that the device is successfully routing traffic through Ghost. If the test fails, common issues include:
- Device and computer are on different networks — they must be on the same Wi-Fi
- Proxy address is wrong — double-check the IP and port
- Ghost proxy is not running — check the status bar indicator
- Firewall is blocking port 4545 — ensure your firewall allows incoming connections on this port
- VPN is overriding proxy settings — temporarily disable the VPN to test