修改了订阅地址
This commit is contained in:
parent
cc3027b950
commit
cb708d5e44
@ -150,7 +150,7 @@ 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?target=clash&url=https%3A%2F%2Fs.sublink.me%2Fsubscribe%2F2611%2F8rXy3HKfdI8%2Fssr%2F&insert=false&config=https%3A%2F%2Fraw.githubusercontent.com%2FACL4SSR%2FACL4SSR%2Fmaster%2FClash%2Fconfig%2FACL4SSR_Online_AdblockPlus.ini&emoji=true&list=false&tfo=false&scv=false&fdn=false&sort=false&new_name=true");
|
||||
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[] tmp=text.split("\n");
|
||||
text=RedisTools.get("clash");
|
||||
for (String s : tmp) {
|
||||
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.yutou.tools.interfaces.DownloadInterface;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
@ -29,8 +30,10 @@ public class HttpTools {
|
||||
|
||||
public static String https_get(String url, Map<String, String> header) {
|
||||
try {
|
||||
URLConnection connection;
|
||||
connection = new URL(url).openConnection();
|
||||
HttpsURLConnection connection;
|
||||
connection = (HttpsURLConnection) new URL(url).openConnection();
|
||||
connection.setConnectTimeout(60*1000);
|
||||
connection.setReadTimeout(60*1000);
|
||||
connection.setRequestProperty("User-Agent", getExtUa());
|
||||
if (header != null) {
|
||||
for (String key : header.keySet()) {
|
||||
|
Loading…
Reference in New Issue
Block a user