diff --git a/src/main/java/com/yutou/qqbot/QQBotApplication.java b/src/main/java/com/yutou/qqbot/QQBotApplication.java index 209e4ec..ef3a3c3 100644 --- a/src/main/java/com/yutou/qqbot/QQBotApplication.java +++ b/src/main/java/com/yutou/qqbot/QQBotApplication.java @@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class QQBotApplication { - public static final String version="QQBot v.1.2.22"; + public static final String version="QQBot v.1.2.23"; public static void main(String[] args) { System.out.println("version = " + version); SpringApplication.run(QQBotApplication.class, args); diff --git a/src/main/java/com/yutou/qqbot/utlis/WebClient.java b/src/main/java/com/yutou/qqbot/utlis/WebClient.java index b6d3f7a..a8953aa 100644 --- a/src/main/java/com/yutou/qqbot/utlis/WebClient.java +++ b/src/main/java/com/yutou/qqbot/utlis/WebClient.java @@ -65,7 +65,11 @@ public class WebClient { ChromeOptions options = new ChromeOptions(); // options.addArguments("--disable-gpu"); // options.addArguments("blink-settings=imagesEnabled=false"); - String headless = RedisTools.get("headless"); + String headless = RedisTools.get("chromedrive_headless"); + String proxy=RedisTools.get("chromedrive_proxy"); + if("true".equals(proxy)) { + options.addArguments("--proxy-server=http://127.0.0.1:7890"); + } if("true".equals(headless)||WebClient.headless) { options.addArguments("--headless"); }