IPIPGO ip proxy adb set proxy ip: set Android device proxy IP via ADB command

adb set proxy ip: set Android device proxy IP via ADB command

Hands-on teaching you to use ADB to hang agents for cell phones The guys who are involved in Android development should have seen the ADB this artifact, but many people do not know that it can also hang agents for cell phones. This trick is especially suitable for the need to batch test different areas of the network environment of the scene, such as the geographical function of the APP test, or crawler business needs...

adb set proxy ip: set Android device proxy IP via ADB command

Hands-on teaching you to use ADB to cell phone hanging agent

Android development guys should have seen the ADB this magic weapon, but many people do not know it can also give the phone hanging proxy. This trick is especially suitable for the need to batch test different areas of the network environment of the scene, such as the geographical function of the APP test, or crawler business needs to switch IP. today we will nag how to use a few lines of command to get this done.

Why do I need a proxy IP?

For example, when you do the price comparison of the e-commerce APP, the price displayed in different areas may be different. At this time, if you manually change the router configuration is too much effort, with a proxy IP can be like magic to switch the location at will. Like usipipgoHome residential agent, directly simulate the real user network environment, much more reliable than ordinary server room IP.


adb shell settings put global http_proxy 112.89.64.22:8080

The IPs and ports in the commands above have to be replaced with your own. Note that Android has a funny way of setting up proxies and then having toRestart WiFiIn order for it to take effect, you either have to turn it off and turn it back on, or just go for a walk in flight mode.

Practical operation of four parts

1. Connect the data cable to the phone and turn on the USB debugging mode (look for it in the developer options).
2. Open the command line and knockadb devicesConfirm connection
3. Enter the proxy setting command (format: IP:port)
4. Turn off WiFi and reconnect

When you encounter a setup that doesn't work, check these three things first:
- Is the proxy IP still alive (try visiting ip111.cn with a browser)
- Is the port blocked by the firewall?
- Is the phone system version too old (Android 7.0 or less may be jerking)

How do I verify that the proxy is active?

Hit this command in the adb shell:


curl -x http://代理IP:端口 http://ipinfo.io

If the returned IP matches the proxy IP set, it means the whole thing is done. If you get an errorConnection refusedIf you have a proxy server, it's probably not open or the port is not correct.

How do I choose a proxy service?

This is a must-have for our own products.ipipgo, is not an old king selling out, it does have a couple of tricks up its sleeve:

Package Type Applicable Scenarios Price advantage
Dynamic residential (standard) Routine data collection 7.67 Yuan/GB
Dynamic Residential (Business) High-frequency operational requirements 9.47 Yuan/GB
Static homes Long-term fixed IP requirements 35 Yuan/Month/IP

Special mention of theirTK LineThe friends who do cross-border e-commerce use it and say it is fragrant.API extraction is also simple, take Python as an example:


import requests
proxy = {"http": "http://用户名:密码@gateway.ipipgo.com:端口"}
res = requests.get('http://example.com', proxies=proxy)

Frequently asked questions on demining

Q:What if I can't get on the Internet after setting up the proxy?
A: First try to manually fill in the proxy in the cell phone WiFi settings to rule out the ADB command problem. If it doesn't work, try to change the proxy IP.

Q: What's wrong with proxy IPs that keep dropping out?
A: Dynamic IP itself is time-sensitive, recommended static residential packages with ipipgo, stability directly pull full.

Q: The Android 13 system settings don't take effect?
A: The new system has permission restrictions, try this combo:
1. adb shell settings delete global http_proxy
2. Reboot the phone
3. Reset the proxy

Say something from the heart.

Proxy IP this thing looks simple, the doorway is actually quite a lot. Some free proxies look to save money, but in fact the IP pool is full of blacklists. Let'sipipgoThe resources of the operators are real local lines, and cross-border lines can save a lot of heartache when doing overseas business. Recently, they have launched a new user to send 5 yuan coupon activity, if you need to directly find the official website customer service to ask, do not say that I said (manual dog head).

Lastly, remember to turn off the proxy when you're done using it, or your cell phone traffic will keep going to the proxy server. The cancel command is very simple:
adb shell settings put global http_proxy :0
This command is the equivalent of applying the emergency brake to the proxy settings, and it works.

This article was originally published or organized by ipipgo.https://www.ipipgo.com/en-us/ipdaili/44602.html

business scenario

Discover more professional services solutions

💡 Click on the button for more details on specialized services

New 10W+ U.S. Dynamic IPs Year-End Sale

Professional foreign proxy ip service provider-IPIPGO

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact Us

13260757327

Online Inquiry. QQ chat

E-mail: hai.liu@xiaoxitech.com

Working hours: Monday to Friday, 9:30-18:30, holidays off
Follow WeChat
Follow us on WeChat

Follow us on WeChat

Back to top
en_USEnglish