Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d9a4e4a81a
8
pom.xml
8
pom.xml
@ -116,6 +116,14 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>10</source>
|
||||||
|
<target>10</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
<resources>
|
<resources>
|
||||||
|
@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class ToolsApplication {
|
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) {
|
public static void main(String[] args) {
|
||||||
System.out.println("当前版本号:" + version);
|
System.out.println("当前版本号:" + version);
|
||||||
|
@ -23,6 +23,8 @@ import javax.servlet.http.Cookie;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Enumeration;
|
import java.util.Enumeration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -150,10 +152,15 @@ public class tools {
|
|||||||
@RequestMapping(value="/tools/clash/get.do",produces ="text/plain;charset=utf-8")
|
@RequestMapping(value="/tools/clash/get.do",produces ="text/plain;charset=utf-8")
|
||||||
public String getClash(){
|
public String getClash(){
|
||||||
StringBuilder builder=new StringBuilder();
|
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");
|
String[] tmp=text.split("\n");
|
||||||
text=RedisTools.get("clash");
|
text=RedisTools.get("clash");
|
||||||
|
builder.append("mixed-port: 7890").append("\n");
|
||||||
for (String s : tmp) {
|
for (String s : tmp) {
|
||||||
|
if("port: 7890".equals(s)||"socks-port: 7891".equals(s)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
builder.append(s).append("\n");
|
builder.append(s).append("\n");
|
||||||
if("rules:".equals(s.trim())){
|
if("rules:".equals(s.trim())){
|
||||||
if(text!=null){
|
if(text!=null){
|
||||||
|
Loading…
Reference in New Issue
Block a user