# 判断处理器架构 | |
case "$(uname -m)" in | |
aarch64|arm64 ) | |
ARCH=arm64 | |
;; | |
x86_64|amd64 ) | |
ARCH=amd64 | |
;; | |
armv7* ) | |
ARCH=arm | |
;; | |
* ) | |
echo "Unsupported architecture" | |
exit 1 | |
esac | |
# 下载需要的应用 | |
wget -q -O /project/cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-$ARCH | |
# 赋执行权给 sh 及所有应用 | |
chmod +x /project/cloudflared | |
# 运行 cloudflared | |
/project/cloudflared tunnel run --token ${ARGO_AUTH} & | |
# 运行 Raycast API Proxy | |
python -m uvicorn app.main:app --host 0.0.0.0 --port 3000 $@ | |
wait |