diff --git a/pom.xml b/pom.xml index 7d903fd..aaf8549 100644 --- a/pom.xml +++ b/pom.xml @@ -116,6 +116,14 @@ org.springframework.boot spring-boot-maven-plugin + + org.apache.maven.plugins + maven-compiler-plugin + + 10 + 10 + + diff --git a/src/main/java/com/yutou/tools/ToolsApplication.java b/src/main/java/com/yutou/tools/ToolsApplication.java index 6548c04..c771163 100644 --- a/src/main/java/com/yutou/tools/ToolsApplication.java +++ b/src/main/java/com/yutou/tools/ToolsApplication.java @@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class ToolsApplication { - public static final String version="1.4.1"; + public static final String version="1.4.2"; public static void main(String[] args) { System.out.println("当前版本号:" + version); diff --git a/src/main/java/com/yutou/tools/other/tools.java b/src/main/java/com/yutou/tools/other/tools.java index e027f5a..4770685 100644 --- a/src/main/java/com/yutou/tools/other/tools.java +++ b/src/main/java/com/yutou/tools/other/tools.java @@ -23,6 +23,8 @@ import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; import java.util.Enumeration; import java.util.List; @@ -150,10 +152,15 @@ public class tools { @RequestMapping(value="/tools/clash/get.do",produces ="text/plain;charset=utf-8") public String getClash(){ StringBuilder builder=new StringBuilder(); - String text= HttpTools.get("https://pub-api-1.bianyuan.xyz/sub?url=https%3A%2F%2Fs.sublink.me%2Fsubscribe%2F2611%2F8rXy3HKfdI8%2Fssr%2F&insert=false&config=https%3A%2F%2Fraw.githubusercontent.com%2FDarkatse%2FACL4SSR%2Fmaster%2FClash%2Fconfig%2FACL4SSR_Online.ini&target=clash"); + String ssrUrl="https://s.sublink.me/subscribe/49191/IsXYcj95sGg/ssr/"; + String text= HttpTools.get("https://pub-api-1.bianyuan.xyz/sub?url="+ URLEncoder.encode(ssrUrl, StandardCharsets.UTF_8) +"&insert=false&config=https%3A%2F%2Fraw.githubusercontent.com%2FDarkatse%2FACL4SSR%2Fmaster%2FClash%2Fconfig%2FACL4SSR_Online.ini&target=clash"); String[] tmp=text.split("\n"); text=RedisTools.get("clash"); + builder.append("mixed-port: 7890").append("\n"); for (String s : tmp) { + if("port: 7890".equals(s)||"socks-port: 7891".equals(s)){ + continue; + } builder.append(s).append("\n"); if("rules:".equals(s.trim())){ if(text!=null){