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

5ステップで設定

  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.

cURLのプロキシに関する質問

認証からローテーションまで、cURLをMurphy経由で使うためのポイントをまとめました。

cURL用の認証情報を取得

ターゲットに合ったネットワークを選びましょう。高速で安定したセッションにはISPプロキシ、厳しいボット対策には幅広いIPを持つレジデンシャルプロキシ。