# 获取环境变量 | |
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 |