如何为 MCP 工具和 MCP Server 配置 IPWO 住宅代理
最后更新于
这有帮助吗?
这有帮助吗?
Host: us.ipwo.net
Port: 7878
Username: username
Password: passwordexport HTTP_PROXY=http://username:password@us.ipwo.net:7878
export HTTPS_PROXY=http://username:password@us.ipwo.net:7878set HTTP_PROXY=http://username:password@us.ipwo.net:7878
set HTTPS_PROXY=http://username:password@us.ipwo.net:7878npx your-mcp-serverpython server.pynpm install https-proxy-agentimport { HttpsProxyAgent } from "https-proxy-agent";
const proxyAgent = new HttpsProxyAgent(
"http://username:password@us.ipwo.net:7878"
);
fetch("https://api.example.com", {
agent: proxyAgent
})
.then(res => res.json())
.then(console.log);import requests
proxies = {
"http": "http://username:password@us.ipwo.net:7878",
"https": "http://username:password@us.ipwo.net:7878"
}
response = requests.get(
"https://api.ipify.org?format=json",
proxies=proxies
)
print(response.text)import httpx
proxy = "http://username:password@us.ipwo.net:7878"
with httpx.Client(
proxy=proxy
) as client:
response = client.get(
"https://api.ipify.org?format=json"
)
print(response.text)docker run \
-e HTTP_PROXY=http://username:password@us.ipwo.net:7878 \
-e HTTPS_PROXY=http://username:password@us.ipwo.net:7878 \
your-mcp-imagecurl -x "us.ipwo.net:7878" \
-U "username:password" \
ipinfo.io{
"ip": "x.x.x.x",
"country": "US"
}