Mobile Setup
One of the most powerful uses of Madhyamas is debugging traffic from mobile apps — something browser DevTools can't do. This guide walks you through connecting your phone or tablet to the Madhyamas proxy.
Prerequisites
- Madhyamas running on your computer (see Getting Started)
- Your phone/tablet and computer on the same Wi-Fi network
- Your computer's local IP address (shown in the Madhyamas web UI header or via
ifconfig/ipconfig)
Bind to all interfaces
By default, Madhyamas only listens on localhost. To accept connections from mobile devices, start it with:
madhyamas serve --host 0.0.0.0Finding Your Computer's IP Address
macOS
ipconfig getifaddr en0 # Wi-Fi
# or
ipconfig getifaddr en1 # alternate Wi-Fi interfaceWindows
ipconfig | findstr IPv4Linux
hostname -IThe Madhyamas web UI also displays the IP address you should use in its header bar.
iPhone / iPad Setup
Step 1: Configure Wi-Fi Proxy
- Open Settings → Wi-Fi
- Tap the (i) next to your connected network
- Scroll to HTTP Proxy → tap Manual
- Set:
- Server: Your computer's IP address (e.g.,
192.168.1.100) - Port:
8888 - Authentication: Off
- Server: Your computer's IP address (e.g.,
- Tap Save
Step 2: Install the CA Certificate
- Open Safari and visit
http://<your-computer-ip>:3001/api/cert/ca - Tap Allow to download the profile
- Go to Settings → Profile Downloaded → tap Install
- Enter your passcode if prompted
- Go to Settings → General → About → Certificate Trust Settings
- Enable trust for Madhyamas Root CA
Step 3: Verify
Open any app or website on your phone. You should see the traffic appear in the Madhyamas dashboard in real time.
Step 4: Disable Proxy When Done
Return to Settings → Wi-Fi → (i) → HTTP Proxy and set it to Off when you're done debugging.
Android Setup
Step 1: Configure Wi-Fi Proxy
- Open Settings → Network & Internet → Wi-Fi
- Long-press your connected network → Modify network
- Check Advanced options
- Set Proxy: Manual
- Set:
- Proxy hostname: Your computer's IP address
- Proxy port:
8888 - Bypass: Leave empty
- Save
Step 2: Install the CA Certificate
- Open your browser and visit
http://<your-computer-ip>:3001/api/cert/ca - Download the certificate file
- Go to Settings → Security → Install a certificate → CA certificate
- Select the downloaded file
Android 7.0+
Apps don't trust user-installed CA certificates by default. To intercept HTTPS from specific apps, you may need to:
- Use a rooted device and install the cert in the system store
- Use the Madhyamas Android companion VPN app (no root required)
- Modify the app's network security config (if you have the source code)
Step 3: Verify
Open any app or website. Traffic should appear in the Madhyamas dashboard.
Step 4: Disable Proxy When Done
Return to Settings → Wi-Fi → [network] → Advanced → Proxy and set it to None.
Android Companion VPN App
For devices where manual proxy configuration is problematic, Madhyamas includes an Android companion app that creates a local VPN to route traffic through the proxy transparently — no manual Wi-Fi proxy settings needed.
# Build the companion app (requires Android SDK)
cd android
echo "sdk.dir=$HOME/Library/Android/sdk" > local.properties
./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apkOpen the app, enter your computer's IP address and port 8888, and tap Start. All app traffic will be routed through Madhyamas.
Troubleshooting Mobile Connections
"Connection Refused" or No Traffic Appears
- Check the bind address: Make sure you started Madhyamas with
--host 0.0.0.0 - Check the IP address: Make sure you entered your computer's correct LAN IP
- Check the port: The default proxy port is 8888
- Check Wi-Fi: Make sure both devices are on the same network
- Check firewall: Temporarily disable your computer's firewall to test
HTTPS Sites Don't Load
The CA certificate isn't installed or trusted. Repeat the certificate installation steps above. On iOS, make sure you enabled trust in Certificate Trust Settings (not just installed the profile).
Specific Apps Don't Work
The app may use certificate pinning — it rejects the proxy's CA certificate. See the HTTPS & Certificates guide for more information.
Traffic Appears but No HTTPS Content
HTTPS interception may be disabled. Check that intercept_https is enabled in the configuration.
Office/Corporate Network Issues
Corporate Wi-Fi networks often have client isolation enabled, which prevents devices on the same network from communicating with each other. If this is the case, try:
- Using a personal hotspot from your phone
- Connecting your computer via Ethernet and your phone via Wi-Fi
- Asking your IT department to disable client isolation for your devices
See also
- HTTPS & Certificates — CA installation and certificate pinning
- Configuration —
--host 0.0.0.0and--public-ipflags - Access Control — restrict which devices can connect
- Troubleshooting — mobile connection fixes