如何实现本机切换公网地址到指定区域(如US)

查询本机公网地址

curl ipinfo.io
一般返回
{
  "ip": "148.135.106.209",
  "hostname": "mc.06depo.com",
  "city": "Los Angeles",
  "region": "California",
  "country": "US",
  "loc": "34.0522,-118.2437",
  "org": "AS35916 MULTACOM CORPORATION",
  "postal": "90012",
  "timezone": "America/Los_Angeles",
  "readme": "https://ipinfo.io/missingauth"
}%

获得VPN端口

sudo lsof -nP -iTCP -sTCP:LISTEN | grep Aurora
一般返回

Aurora 15459 chengxinsun 14u IPv4 0x1a8b142c46221f2d 0t0 TCP 127.0.0.1:19090 (LISTEN)
Aurora 15459 chengxinsun 15u IPv6 0x68cfa22363e66b94 0t0 TCP *:18090 (LISTEN)
Aurora 15459 chengxinsun 18u IPv6 0x5242f3439c836dff 0t0 TCP *:29290 (LISTEN)

终端terminal临时全局代理?

需要尝试上面给出的三个端口,然后用curl ipinfo.io确认代理结果。
export http_proxy=http://127.0.0.1:29290
export https_proxy=http://127.0.0.1:29290
张贴在ai

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注