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.

test-proxy.shbash
# 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/ip

Cài đặt trong 5 bước

  1. 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.
  2. 2Pass your credentials with -U USERNAME:PASSWORD (or inline them in the proxy URL).
  3. 3Request an IP echo endpoint like https://httpbin.org/ip to read back the exit IP.
  4. 4For SOCKS5, swap the scheme to socks5h:// on the --proxy flag.
  5. 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.

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.