1028
All checks were successful
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Successful in 31s
All checks were successful
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Successful in 31s
This commit is contained in:
parent
bff0579b17
commit
28f2845c08
21
.github/workflows/BBB.yml
vendored
21
.github/workflows/BBB.yml
vendored
@ -9,17 +9,10 @@ jobs:
|
||||
clone_with_proxy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
# 1. 安装 Trojan-Go 客户端
|
||||
#- name: 🚀 安装 Trojan-Go
|
||||
# uses: actions/checkout@v2 # 检出仓库代码,包括已添加的 trojan-go-linux-amd64.zip
|
||||
#- name: 🛒 检出代码
|
||||
# uses: actions/checkout@v3
|
||||
|
||||
# 1. 下载并安装 Trojan-Go
|
||||
- name: 📦 解压并安装 Trojan-Go
|
||||
run: |
|
||||
# 下载 Trojan-Go 二进制文件
|
||||
#wget -O trojan-go.zip https://git.aoun.ltd/18152827937/gitea-action-test/raw/commit/3b1e1b5029bf493a237d466397345e0e54cacd6b/trojan-go-linux-amd64.zip
|
||||
wget -O trojan-go.zip https://git.aoun.ltd/18152827937/Trojan-GO/raw/commit/ea063e62859270d123379dc69db57f29db2b192f/trojan-go-linux-amd64.zip
|
||||
unzip trojan-go.zip -d trojan-go
|
||||
sudo mv trojan-go/trojan-go /usr/local/bin/trojan-go
|
||||
@ -34,7 +27,8 @@ jobs:
|
||||
cat trojan-go-config.json
|
||||
env:
|
||||
TROJAN_GO_CONFIG: ${{ secrets.TROJAN_GO_CONFIG }}
|
||||
|
||||
|
||||
# 3. 启动 Trojan-Go 代理
|
||||
- name: 🔍 启动并保持 Trojan-Go 运行
|
||||
run: |
|
||||
nohup trojan-go -config trojan-go-config.json > /tmp/trojan-go.log 2>&1 & disown
|
||||
@ -46,14 +40,13 @@ jobs:
|
||||
else
|
||||
echo "启动失败,检查日志文件 /tmp/trojan-go.log 以获取更多信息。" && cat /tmp/trojan-go.log && exit 1
|
||||
fi
|
||||
|
||||
|
||||
# 4. 使用代理克隆仓库
|
||||
- name: 🚀 使用代理克隆仓库
|
||||
env:
|
||||
REPO_URL: https://github.com/coolsnowwolf/lede
|
||||
REPO_BRANCH: master
|
||||
ALL_PROXY: "socks5://127.0.0.1:1080"
|
||||
http_proxy: "socks5://127.0.0.1:1080"
|
||||
https_proxy: "socks5://127.0.0.1:1080"
|
||||
run: |
|
||||
echo "检查代理设置:$ALL_PROXY"
|
||||
echo "开始尝试克隆仓库..."
|
||||
@ -89,8 +82,6 @@ jobs:
|
||||
- name: 🌐 Step with Proxy
|
||||
env:
|
||||
ALL_PROXY: "socks5://127.0.0.1:1080"
|
||||
http_proxy: "socks5://127.0.0.1:1080"
|
||||
https_proxy: "socks5://127.0.0.1:1080"
|
||||
run: |
|
||||
echo "Checking IP with proxy:"
|
||||
# 使用 --socks5 明确指定代理模式
|
||||
@ -99,8 +90,6 @@ jobs:
|
||||
- name: 🌐 Step with Proxy (using ALL_PROXY only)
|
||||
env:
|
||||
ALL_PROXY: "socks5://127.0.0.1:1080"
|
||||
http_proxy: "socks5://127.0.0.1:1080"
|
||||
https_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."
|
||||
|
Loading…
Reference in New Issue
Block a user