1027
Some checks failed
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Has been cancelled
Some checks failed
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Has been cancelled
This commit is contained in:
parent
21be234612
commit
cde1e37d3b
22
.github/workflows/BBB.yml
vendored
22
.github/workflows/BBB.yml
vendored
@ -67,14 +67,9 @@ jobs:
|
|||||||
# 1. 不使用代理的步骤
|
# 1. 不使用代理的步骤
|
||||||
- name: 🌐 Step without Proxy
|
- name: 🌐 Step without Proxy
|
||||||
run: |
|
run: |
|
||||||
echo "Checking if ALL_PROXY is set (no proxy expected):"
|
echo "Checking IP without proxy:"
|
||||||
if [ -z "$ALL_PROXY" ]; then
|
# 使用 curl 检查 IP 地址, 如果请求失败则输出提示信息,提示可能是因为没有代理
|
||||||
echo "No ALL_PROXY set. Not using proxy."
|
curl -s https://httpbin.org/ip || echo "Request failed, likely due to no proxy."
|
||||||
else
|
|
||||||
echo "ALL_PROXY is set to $ALL_PROXY. Proxy in use."
|
|
||||||
fi
|
|
||||||
echo "Attempting to access example.com without proxy..."
|
|
||||||
curl -s --max-time 10 https://example.com || echo "Request failed, likely due to no proxy."
|
|
||||||
|
|
||||||
# 2. 使用代理的步骤
|
# 2. 使用代理的步骤
|
||||||
- name: 🌐 Step with Proxy
|
- name: 🌐 Step with Proxy
|
||||||
@ -83,11 +78,6 @@ jobs:
|
|||||||
http_proxy: "socks5://127.0.0.1:1080"
|
http_proxy: "socks5://127.0.0.1:1080"
|
||||||
https_proxy: "socks5://127.0.0.1:1080"
|
https_proxy: "socks5://127.0.0.1:1080"
|
||||||
run: |
|
run: |
|
||||||
echo "Checking if ALL_PROXY is set (proxy expected):"
|
echo "Checking IP with proxy:"
|
||||||
if [ -z "$ALL_PROXY" ]; then
|
# 使用 curl 检查 IP 地址, 如果请求失败则输出提示信息,提示可能是因为代理配置有误
|
||||||
echo "No ALL_PROXY set. Not using proxy."
|
curl -s https://httpbin.org/ip || echo "Request failed, even with proxy."
|
||||||
else
|
|
||||||
echo "ALL_PROXY is set to $ALL_PROXY. Proxy in use."
|
|
||||||
fi
|
|
||||||
echo "Attempting to access example.com with proxy..."
|
|
||||||
curl -s --max-time 10 https://example.com || echo "Request failed, even with proxy."
|
|
Loading…
Reference in New Issue
Block a user