Tích hợp proxy với cURL
cURL is the fastest way to sanity-check a proxy before you wire it into code. The -x flag sets the proxy and -U passes your username and password, so a single command tells you whether traffic is leaving through Murphy. The same flags drop straight into any shell script.
# Residential gateway (gw-eu, gw-usa, gw-asia, gw-asia2), port 8888 or 7777 on Private 2
curl -x http://gw-eu.murphyproxies.com:8888 \
-U USERNAME:PASSWORD \
https://httpbin.org/ip
# ISP proxy: one ip:port:user:pass line from your dashboard
curl -x http://IP:PORT -U USER:PASS https://httpbin.org/ip
# SOCKS5 in one flag (same host, port and credentials, socks5h:// scheme)
curl --proxy socks5h://USER:PASS@HOST:PORT https://httpbin.org/ip
# Reuse a proxy across a session via environment variables
export http_proxy="http://USERNAME:PASSWORD@gw-eu.murphyproxies.com:8888"
export https_proxy="$http_proxy"
curl https://httpbin.org/ipCài đặt trong 5 bước
- 1Set the proxy with -x: http://gw-eu.murphyproxies.com:8888 for residential (another gw- region, or port 7777 on Private 2), or http://IP:PORT from one of your ISP lines.
- 2Pass your credentials with -U USERNAME:PASSWORD (or inline them in the proxy URL).
- 3Request an IP echo endpoint like https://httpbin.org/ip to read back the exit IP.
- 4For SOCKS5, swap the scheme to socks5h:// on the --proxy flag.
- 5Export http_proxy and https_proxy in your shell to route every following cURL call without repeating the flags.
Câu hỏi về proxy cho cURL
Mọi điều bạn cần để định tuyến cURL qua Murphy, từ xác thực đến xoay vòng IP.
The -x (or --proxy) flag sets the proxy host and port, while -U (or --proxy-user) supplies the username and password. You can also fold the credentials into the -x URL as user:pass@host:port and skip -U entirely.
Use the socks5:// scheme on the proxy URL, for example --proxy socks5://USER:PASS@HOST:PORT with the host, port and credentials from your dashboard. Use socks5h:// instead if you want DNS resolution to happen on the proxy side.
Yes. Export the http_proxy and https_proxy environment variables with your credentials, and every cURL call in that shell session will go through your Murphy proxy without needing the -x flag each time.
Nhận thông tin đăng nhập cho cURL
Chọn mạng lưới hợp với mục tiêu của bạn. Proxy ISP cho phiên nhanh và ổn định, proxy dân cư cho nguồn IP đa dạng trước các hệ thống chống bot khắt khe.