diff --git a/.github/workflows/BBB.yml b/.github/workflows/BBB.yml index 0280151..fc825b0 100644 --- a/.github/workflows/BBB.yml +++ b/.github/workflows/BBB.yml @@ -33,13 +33,13 @@ jobs: TROJAN_GO_CONFIG: ${{ secrets.TROJAN_GO_CONFIG }} # 3. 启动 Trojan-Go 并检测代理是否可用 - - name: 🔍 测试代理的连通性 - run: | - nohup trojan-go -config trojan-go-config.json & - sleep 5 # 等待代理启动 - sudo apt-get update && sudo apt-get install -y lsof - # 检查代理是否在监听 - lsof -i :1080 || echo "Trojan-Go did not start on port 1080" + #- name: 🔍 测试代理的连通性 + # run: | + # nohup trojan-go -config trojan-go-config.json & + # sleep 5 # 等待代理启动 + # sudo apt-get update && sudo apt-get install -y lsof + # # 检查代理是否在监听 + # lsof -i :1080 || echo "Trojan-Go did not start on port 1080" # 4. 使用代理克隆仓库 - name: 🚀 使用代理克隆仓库 @@ -70,3 +70,25 @@ jobs: echo "Checking IP with proxy:" # 使用 --socks5 明确指定代理模式 curl --socks5 127.0.0.1:1080 -s https://httpbin.org/ip || echo "Request failed, even with proxy." + + - name: 🌐 Step with Proxy (using ALL_PROXY only) + env: + ALL_PROXY: "socks5://127.0.0.1:1080" + run: | + echo "Checking IP with proxy using ALL_PROXY:" + curl -s https://httpbin.org/ip || echo "Request failed, even with proxy." + + - name: 🌐 Step with Proxy (using wget) + env: + ALL_PROXY: "socks5://127.0.0.1:1080" + run: | + echo "Checking IP with proxy using wget:" + wget -qO- https://httpbin.org/ip || echo "Request failed, even with proxy." + + - name: 🌐 Step with Proxy (git clone test) + env: + ALL_PROXY: "socks5://127.0.0.1:1080" + run: | + echo "Testing proxy with git clone:" + git clone https://github.com/httpbin/httpbin.git || echo "git clone failed, likely due to proxy issue." +