File size: 439 Bytes
e1b47a0 302ba29 e1b47a0 302ba29 e1b47a0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
#!/bin/bash
# 获取环境变量
PROXY=${PROXY:-""}
# 检查是否需要设置代理
if [ -n "$PROXY" ]; then
CMD="/usr/bin/google-chrome-stable --remote-debugging-port=9200 --proxy-server=$PROXY --headless=new --no-sandbox --disable-gpu"
else
CMD="/usr/bin/google-chrome-stable --remote-debugging-port=9200 --headless=new --no-sandbox --disable-gpu"
fi
# 启动 Chrome 浏览器(后台运行)
echo "Starting Chrome..."
$CMD |