1027
Some checks failed
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Failing after 19s
Some checks failed
Clone Repository with Trojan-Go Proxy / clone_with_proxy (push) Failing after 19s
This commit is contained in:
parent
cde1e37d3b
commit
1a437b5e8f
26
.github/workflows/BBB.yml
vendored
26
.github/workflows/BBB.yml
vendored
@ -10,23 +10,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: 🚀 打印测试密钥是否支持换行
|
||||
env:
|
||||
TROJAN_GO_CONFIG: ${{ secrets.TROJAN_GO_CONFIG }}
|
||||
run: |
|
||||
# 将密钥内容写入文件
|
||||
echo "$TROJAN_GO_CONFIG" > test_config.json
|
||||
|
||||
# 打印文件内容,检查换行是否保留
|
||||
echo "Testing multiline secret content:"
|
||||
cat test_config.json
|
||||
|
||||
|
||||
# 1. 安装 Trojan-Go 客户端
|
||||
- name: 🚀 安装 Trojan-Go
|
||||
uses: actions/checkout@v2 # 检出仓库代码,包括已添加的 trojan-go-linux-amd64.zip
|
||||
|
||||
- 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
|
||||
@ -44,14 +33,9 @@ jobs:
|
||||
run: |
|
||||
nohup trojan-go -config trojan-go-config.json &
|
||||
sleep 5 # 等待代理启动
|
||||
# 检查代理是否在监听
|
||||
lsof -i :1080 || echo "Trojan-Go did not start on port 1080"
|
||||
|
||||
# 使用 curl 测试代理连接指定站点
|
||||
if curl -x socks5://127.0.0.1:1080 -s --max-time 10 https://example.com > /dev/null; then
|
||||
echo "代理连接成功"
|
||||
else
|
||||
echo "代理连接失败,请检查配置" && exit 1
|
||||
fi
|
||||
|
||||
# 4. 使用代理克隆仓库
|
||||
- name: 🚀 使用代理克隆仓库
|
||||
env:
|
||||
|
BIN
trojan-go-linux-amd64.zip
Normal file
BIN
trojan-go-linux-amd64.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user