Merge remote-tracking branch 'origin/master'

This commit is contained in:
Yutousama 2022-01-06 02:08:25 +08:00
commit d9a4e4a81a
3 changed files with 17 additions and 2 deletions

View File

@ -116,6 +116,14 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>10</source>
<target>10</target>
</configuration>
</plugin>
</plugins>
<resources>

View File

@ -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);

View File

@ -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){