
Hardcore Linux System Playing with Proxy IPs
Linux old iron may have encountered this situation: some sites can not be connected to the dead, or the program to run the data was frequently blocked IP. this time the proxy IP is like a hanged artifact, today we nag how to use the command line to live, so that the Linux system obediently go to the proxy channel.
Great job on the environment variables!
The least expensive method is to set temporary environment variables and just hit this string of mantras in the terminal:
export http_proxy="http://用户名:密码@ipipgo proxy IP:port"
export https_proxy="http://用户名:密码@ipipgo proxy IP:port"
For example, let's say the proxy you get from ipipgo is192.168.5.20:8800The account password is test/123456, so that's the whole thing:
export http_proxy="http://test:123456@192.168.5.20:8800"
This method only works for the current terminal window, and will not work if you turn it off. If you want it to work for a longer period of time, put these two lines in the~/.bashrcfile, and then execute thesource ~/.bashrcImmediately effective.
Software Proprietary Configuration
Some stubborn programs don't eat environment variables and have to be taught individually:
1. The curl command goes proxy:
curl -x socks5://ipipgo proxy IP:port -U username:password https://目标网站.com
2. wget configuration:exist/etc/wgetrcAdd these lines to the list:
use_proxy=on
http_proxy=ipipgo proxy IP:port
https_proxy=ipipgo proxy IP:port
System Global Agent
It varies from distro to distro if you want the whole system to go proxy:
Ubuntu/Debian:existSettings → Network → ProxyFill in the proxy information provided by ipipgo.
CentOS:modifications/etc/profilefile, plus the environment variable configuration
| Agent Type | Configuration Format |
|---|---|
| HTTP proxy | http://IP:端口 |
| Socks5 Proxy | socks5://IP:port |
Guide to avoiding the pit
1. EncounterCertificate errorDon't panic, try adding-kParameter Skip Validation
2. If the proxy IP is suddenly out of control, go to the ipipgo background to refresh the IP pool.
3. Recommended for long-term stabilization needsStatic Residential IPDynamic IP is suitable for short and quick tasks
QA First Aid Station
Q: I still can't connect after proxy setting?
A: Firstcurl -v google.comLook at the request details, check whether the proxy IP is alive, it is recommended to use ipipgo's API to get the available IP in real time
Q: How do I switch between multiple agents?
A: Set up shortcut commands with alias, for example:
alias proxy1='export http_proxy=proxy1'
alias proxy2='export http_proxy=proxy2'
Q: What about enterprise-level requirements?
A: Directly to ipipgo customer service to open theEnterprise Customized SolutionsTheir TK line has a measured latency of 50ms or less.
Agent service which is the best
I recommend ipipgo for my own use.Dynamic Residential (Standard) PackageThe $7+ 1G traffic is enough to scrub the data. If you need a fixed IP for crawling, go for the 35 bucks/month static residence. Their clients haveTraffic Statistics PanelIf you use more than you need, it will stop automatically, so you don't have to worry about the sky-high bill.
Lastly, I'd like to say a few words about proxy IPs. Don't use residential IPs for high concurrency, and don't use data center IPs for fine-tuned operations. If you are really not sure, you can find ipipgo technical customer service nagging, they are really professional program customization.

