Skip to content

Commit

Permalink
chore: .
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Jul 9, 2024
1 parent c6cdcfc commit bce285f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cron_bypassCF.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
run: |
npm install
sudo apt install -y xvfb
# - name: Start Xvfb
# run: |
# # 启动 Xvfb 在 Display :99
# sudo Xvfb :99 &
# export DISPLAY=:99
- name: Start Xvfb
run: |
# 启动 Xvfb 在 Display :99
sudo Xvfb :99 &
export DISPLAY=:99
- name: Run a script
run: node bypasscf.js
run: xvfb-run --server-args="-screen 0 1024x768x24" node bypasscf.js
16 changes: 8 additions & 8 deletions bypasscf.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ async function launchBrowserForUser(username, password) {
};

// 如果环境变量不是 'dev',则添加代理配置
if (process.env.ENVIRONMENT !== "dev") {
browserOptions["proxy"] = {
host: "216.98.11.172",
port: "54651",
username: "T5kQrKCwXZ",
password: "jH51RWYSkr",
};
}
// if (process.env.ENVIRONMENT !== "dev") {
// browserOptions["proxy"] = {
// host: "216.98.11.172",
// port: "54651",
// username: "T5kQrKCwXZ",
// password: "jH51RWYSkr",
// };
// }

var { connect } = await import("puppeteer-real-browser");
const { page, browser } = await connect(
Expand Down

0 comments on commit bce285f

Please sign in to comment.