1027
Some checks failed
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Failing after 1m40s
Some checks failed
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Failing after 1m40s
This commit is contained in:
parent
4cf8384190
commit
e2d40e3abb
8
.github/workflows/AAA.yml
vendored
8
.github/workflows/AAA.yml
vendored
@ -2,12 +2,12 @@
|
|||||||
name: 顺序工作流
|
name: 顺序工作流
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
branches:
|
# branches:
|
||||||
- main
|
# - main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
job_a:
|
job_测试1:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 运行工作流A
|
- name: 运行工作流A
|
||||||
|
65
.github/workflows/BBB.yml
vendored
Normal file
65
.github/workflows/BBB.yml
vendored
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
name: Clone Repository with Trojan-Go Proxy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clone_with_proxy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# 1. 安装 Trojan-Go 客户端
|
||||||
|
- name: 🚀 安装 Trojan-Go
|
||||||
|
run: |
|
||||||
|
# 下载 Trojan-Go 二进制文件
|
||||||
|
wget -O trojan-go.zip https://github.com/p4gefau1t/trojan-go/releases/latest/download/trojan-go-linux-amd64.zip
|
||||||
|
unzip trojan-go.zip -d trojan-go
|
||||||
|
sudo mv trojan-go/trojan-go /usr/local/bin/trojan-go
|
||||||
|
rm -rf trojan-go.zip trojan-go
|
||||||
|
|
||||||
|
# 2. 配置代理参数
|
||||||
|
- name: 🔧 配置 Trojan-Go 代理
|
||||||
|
run: |
|
||||||
|
# 创建 Trojan-Go 配置文件
|
||||||
|
cat <<EOF > trojan-go-config.json
|
||||||
|
{
|
||||||
|
"run_type": "client",
|
||||||
|
"local_addr": "127.0.0.1",
|
||||||
|
"local_port": 1080,
|
||||||
|
"remote_addr": "47.88.62.50",
|
||||||
|
"remote_port": 443,
|
||||||
|
"password": ["aiwoQwo5253"],
|
||||||
|
"ssl": {
|
||||||
|
"sni": "en.aoun.ltd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# 3. 启动 Trojan-Go 并检测代理是否可用
|
||||||
|
- name: 🔍 检测代理
|
||||||
|
run: |
|
||||||
|
# 启动 Trojan-Go 代理
|
||||||
|
nohup trojan-go -config trojan-go-config.json &
|
||||||
|
|
||||||
|
# 等待代理启动
|
||||||
|
sleep 3
|
||||||
|
|
||||||
|
# 使用 curl 测试代理是否可用
|
||||||
|
if curl -x socks5://127.0.0.1:1080 -s https://www.google.com > /dev/null; then
|
||||||
|
echo "代理已启动并正常工作"
|
||||||
|
else
|
||||||
|
echo "代理无法连接" && 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: |
|
||||||
|
git clone --depth 1 $REPO_URL -b $REPO_BRANCH
|
Loading…
Reference in New Issue
Block a user