Mobile Proxy Service¶
Mobile proxy service might not sound easy to understand. Let’s first describe it in one sentence: FIRERPA has a built-in HTTP proxy server, and you can access other sites through this HTTP network proxy, that is, through the phone’s network.
For example, sometimes you want to be under the same network IP as the device to do some network testing work or troubleshoot problems. FIRERPA’s proxy function supports using the device running FIRERPA as an HTTP network proxy server. That is, you can use this function to use this mobile device as a proxy server, sending communication traffic through this device’s network egress. Or if you are capturing packets but don’t want the traffic to go out from your local computer, you can set this proxy service as the upstream proxy for mitmproxy. This way, you can capture the packets, and all communication traffic still goes out through the original device. Or you can use the idle network of many devices as IP proxy services.
Using the Proxy¶
You can set 192.168.0.2
port 65000
as a proxy in Firefox browser settings - Manual proxy configuration and check Also use this proxy for HTTPS
. This way, your Firefox will have the same outbound IP as the device.
You can also quickly experience it through the following curl command:
curl -x http://192.168.0.2:65000 https://httpbin.org/ip
You can also use it through Python requests:
requests.get("https://httpbin.org/ip", proxies={"http":"http://192.168.0.2:65000", "https": "http://192.168.0.2:65000"})
By default, this proxy does not require any authentication. But when you start with --certificate
(using an encryption certificate), the login username is lamda, and the password is the same as the remote desktop login token (note that this is not the custom password for the remote desktop but the password in the encryption certificate file). You can also use properties.local to customize the configuration tunnel2.password
to set this password yourself.
For the above situation using an encryption certificate, use it in the following way:
curl -x http://lamda:certificate_password@192.168.0.2:65000 https://httpbin.org/ip
Similarly, Python requests is also in the following form:
requests.get("https://httpbin.org/ip", proxies={"http":"http://lamda:certificate_password@192.168.0.2:65000", "https": "http://lamda:certificate_password@192.168.0.2:65000"})
Configuring the Proxy¶
You can configure the mobile proxy function by writing the following configuration in properties.local. You can set its password verification or make it go out through the rmnet (4G/5G mobile network) interface instead of the default outbound network interface.
tunnel2.login=lamda
tunnel2.password=your_new_password
The outbound interface iface configuration is used to configure the outbound network for the mobile proxy. It has two configurable values, namely wlan and rmnet. When the iface value is wlan, it will automatically detect available wlan interfaces and choose any one to send requests. When iface is rmnet, it will try to enable mobile data (4/5G, even if WIFI is enabled) and try to send requests from the mobile network interface. When configured as rmnet/wlan but there is no network on the interface, the proxy will be ineffective. When this item is not configured, requests are sent using the default network.
tunnel2.iface=rmnet