From 3a4108f50c92ce6838b20a9f36d6c80a0d6d9e2b Mon Sep 17 00:00:00 2001
From: Yutousama <583819556@qq.com>
Date: Sat, 1 Jan 2022 23:20:33 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=8D=A2clash=E8=BF=9E=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 8 ++++++++
src/main/java/com/yutou/tools/ToolsApplication.java | 2 +-
src/main/java/com/yutou/tools/other/tools.java | 9 ++++++++-
3 files changed, 17 insertions(+), 2 deletions(-)
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
+
+
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){