Compare commits

...

1 Commits

Author SHA1 Message Date
QAIU
9ded137539 jdk11兼容 2024-06-19 09:51:08 +08:00
20 changed files with 1312 additions and 224 deletions

View File

@@ -1,21 +1,21 @@
@echo off
setlocal
rem 获取当前 Java 版本信息并搜索是否包含 "17."
java -version 2>&1 | find "17." >nul
rem 获取当前 Java 版本信息并搜索是否包含 "11."
java -version 2>&1 | find "11." >nul
rem 如果找不到 JDK 17.x则下载并安装
if errorlevel 1 (
echo JDK 17.x not found. Downloading and installing...
echo JDK 11.x not found. Downloading and installing...
REM 这里添加下载和安装 JDK 的代码
rem 验证安装
java -version
echo JDK 17.x installation complete.
echo JDK 11.x installation complete.
) else (
echo JDK 17.x is already installed.
echo JDK 11.x is already installed.
)
endlocal

View File

@@ -7,7 +7,7 @@ Wants=network-online.target
[Service]
Type=simple
# User=USER
# 需要JDK17及以上版本 注意修改为自己的路径
# 需要JDK11及以上版本 注意修改为自己的路径
ExecStart=/root/java/jdk-17.0.2/bin/java -server -Xmx128m -jar /root/java/netdisk-fast-download/netdisk-fast-download.jar
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=always

View File

@@ -1,4 +1,6 @@
@echo off && @chcp 65001 > nul
:: 需要JDK11及以上版本和Windows环境变量已配置jdk的路径
pushd %~dp0
set LIB_DIR=%~dp0
for /f "delims=X" %%i in ('dir /b %LIB_DIR%\netdisk-fast-download.jar') do (

View File

@@ -12,7 +12,7 @@
<artifactId>core-database</artifactId>
<properties>
<java.version>17</java.version>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<slf4j.version>2.0.5</slf4j.version>
<commons-lang3.version>3.12.0</commons-lang3.version>

View File

@@ -87,19 +87,15 @@ public final class Deploy {
var calendar = Calendar.getInstance();
calendar.setTime(new Date());
var year = calendar.get(Calendar.YEAR);
var logoTemplate = """
Web Server powered by:\s
____ ____ _ _ _ \s
|_^^_| |_^^_| / |_ | | | | \s
\\ \\ / /.---. _ .--.`| |-' _ __ | |__| |_ \s
\\ \\ / // /__\\\\[ `/'`\\]| | [ \\ [ ]|____ _|\s
\\ V / | \\__., | | | |, _ > ' < _| |_ \s
\\_/ '.__.'[___] \\__/(_)[__]`\\_] |_____|\s
Version: %s; Framework version: %s; %s©%d.
""";
String logoTemplate = "Web Server powered by: \n" +
" ____ ____ _ _ _ \n" +
"|_^^_| |_^^_| / |_ | | | | \n" +
" \\ \\ / /.---. _ .--.`| |-' _ __ | |__| |_ \n" +
" \\ \\ / // /__\\\\[ `/'`\\]| | [ \\ [ ]|____ _|\n" +
" \\ V / | \\__., | | | |, _ > ' < _| |_ \n" +
" \\_/ '.__.'[___] \\__/(_)[__]`\\_] |_____|\n" +
" Version: %s; Framework version: %s; JDK11; %s©%d.\n\n";
System.out.printf(logoTemplate,
conf.getString("version_app"),
VersionCommand.getVersion(),
@@ -132,9 +128,10 @@ public final class Deploy {
localMap.put(GLOBAL_CONFIG, globalConfig);
localMap.put(CUSTOM_CONFIG, customConfig);
localMap.put(SERVER, globalConfig.getJsonObject(SERVER));
var future0 = vertx.createSharedWorkerExecutor("other-handle").executeBlocking(bch -> {
var future0 = vertx.createSharedWorkerExecutor("other-handle").executeBlocking(() -> {
handle.handle(globalConfig);
bch.complete("other handle complete");
LOGGER.info("other handle complete");
return null;
});
// 部署 路由、异步service、反向代理 服务
@@ -142,7 +139,7 @@ public final class Deploy {
var future2 = vertx.deployVerticle(ServiceVerticle.class, getWorkDeploymentOptions("Service"));
var future3 = vertx.deployVerticle(ReverseProxyVerticle.class, getWorkDeploymentOptions("proxy"));
CompositeFuture.all(future1, future2, future3, future0)
Future.all(future1, future2, future3, future0)
.onSuccess(this::deployWorkVerticalSuccess)
.onFailure(this::deployVerticalFailed);
}
@@ -181,7 +178,7 @@ public final class Deploy {
private DeploymentOptions getWorkDeploymentOptions(String name, int ins) {
return new DeploymentOptions()
.setWorkerPoolName(name)
.setWorker(true)
.setThreadingModel(ThreadingModel.WORKER)
.setInstances(ins);
}

View File

@@ -112,7 +112,7 @@ public class RouterHandlerFactory implements BaseHttpApi {
return Integer.compare(routeHandler2.order(), routeHandler1.order());
};
// 获取处理器类列表
List<Class<?>> sortedHandlers = handlers.stream().sorted(comparator).toList();
List<Class<?>> sortedHandlers = handlers.stream().sorted(comparator).collect(Collectors.toList());
for (Class<?> handler : sortedHandlers) {
try {
// 注册请求处理方法
@@ -153,7 +153,7 @@ public class RouterHandlerFactory implements BaseHttpApi {
methodList.addAll(Stream.of(methods).filter(
method -> method.isAnnotationPresent(SockRouteMapper.class)
).toList());
).collect(Collectors.toList()));
// 依次注册处理方法
for (Method method : methodList) {

View File

@@ -6,7 +6,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import io.vertx.core.json.JsonObject;
import org.apache.commons.lang3.StringUtils;
import java.io.Serial;
import java.io.Serializable;
/**
@@ -17,7 +16,6 @@ import java.io.Serializable;
*/
public class JsonResult<T> implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private static final int SUCCESS_CODE = 200;

View File

@@ -22,3 +22,9 @@ Cloudreve自建网盘 (ce) {origin}/s/{shareKey}
https://f.ws59.cn/f/e3peohu6192
短链接设计

View File

@@ -7,24 +7,22 @@ public interface IPanTool {
Future<String> parse();
static IPanTool typeMatching(String type, String key, String pwd) {
return switch (type) {
case "lz" -> new LzTool(key, pwd);
case "cow" -> new CowTool(key, pwd);
case "ec" -> new EcTool(key, pwd);
case "fc" -> new FcTool(key, pwd);
case "uc" -> new UcTool(key, pwd);
case "ye" -> new YeTool(key, pwd);
case "fj" -> new FjTool(key, pwd);
case "qk" -> new QkTool(key, pwd);
case "le" -> new LeTool(key, pwd);
case "ws" -> new WsTool(key, pwd);
case "qq" -> new QQTool(key, pwd);
case "iz" -> new IzTool(key, pwd);
case "ce" -> new CeTool(key, pwd);
default -> {
throw new UnsupportedOperationException("未知分享类型");
switch (type) {
case "lz": return new LzTool(key, pwd);
case "cow": return new CowTool(key, pwd);
case "ec": return new EcTool(key, pwd);
case "fc": return new FcTool(key, pwd);
case "uc": return new UcTool(key, pwd);
case "ye": return new YeTool(key, pwd);
case "fj": return new FjTool(key, pwd);
case "qk": return new QkTool(key, pwd);
case "le": return new LeTool(key, pwd);
case "ws": return new WsTool(key, pwd);
case "qq": return new QQTool(key, pwd);
case "iz": return new IzTool(key, pwd);
case "ce": return new CeTool(key, pwd);
default: throw new UnsupportedOperationException("未知分享类型");
}
};
}
static IPanTool shareURLPrefixMatching(String url, String pwd) {

View File

@@ -1,5 +1,6 @@
package cn.qaiu.util;
import cn.qaiu.util.jdk17halper.HexFormat;
import org.apache.commons.lang3.StringUtils;
import javax.crypto.*;
@@ -12,7 +13,6 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
import java.util.Date;
import java.util.HexFormat;
import java.util.Random;
/**

View File

@@ -1,152 +1,160 @@
package cn.qaiu.util;
public interface JsContent {
String ye123 = """
/*
https://statics.123pan.com/share-static/dist/umi.fb72555e.js
eaefamemdead
eaefameidldy
_0x4f141a(1690439821|5790548|/b/api/share/download/info|web|3|1946841013) = 秘钥
_0x1e2592 1690439821 时间戳
_0x48562f 5790548 随机码
_0x1e37d5 /b/api/share/download/info
_0x4e2d74 web
_0x56f040 3
_0x43bdc6 1946841013 加密时间HASH戳
>>>>
_0x43bdc6=''['concat'](_0x1e2592, '-')['concat'](_0x48562f, '-')['concat'](_0x406c4e)
加密时间HASH戳 = 时间戳-随机码-秘钥
*/
function _0x1b5d95(_0x278d1a) {
var _0x839b57,
_0x4ed4dc = arguments['length'] > 0x2 && void 0x0 !== arguments[0x2] ? arguments[0x2] : 0x8;
if (0x0 === arguments['length'])
return null;
'object' === typeof _0x278d1a ? _0x839b57 = _0x278d1a : (0xa === ('' + _0x278d1a)['length'] && (_0x278d1a = 0x3e8 * parseInt(_0x278d1a)),
_0x839b57 = new Date(_0x278d1a));
var _0xc5c54a = _0x278d1a + 0xea60 * new Date(_0x278d1a)['getTimezoneOffset']()
, _0x3732dc = _0xc5c54a + 0x36ee80 * _0x4ed4dc;
return _0x839b57 = new Date(_0x3732dc),
{
'y': _0x839b57['getFullYear'](),
'm': _0x839b57['getMonth']() + 0x1 < 0xa ? '0' + (_0x839b57['getMonth']() + 0x1) : _0x839b57['getMonth']() + 0x1,
'd': _0x839b57['getDate']() < 0xa ? '0' + _0x839b57['getDate']() : _0x839b57['getDate'](),
'h': _0x839b57['getHours']() < 0xa ? '0' + _0x839b57['getHours']() : _0x839b57['getHours'](),
'f': _0x839b57['getMinutes']() < 0xa ? '0' + _0x839b57['getMinutes']() : _0x839b57['getMinutes']()
};
}
function _0x4f141a(_0x4075b1) {
for (var _0x4eddcb = arguments['length'] > 0x1 && void 0x0 !== arguments[0x1] ? arguments[0x1] : 0xa,
_0x2fc680 = function() {
for (var _0x515c63, _0x361314 = [], _0x4cbdba = 0x0; _0x4cbdba < 0x100; _0x4cbdba++) {
_0x515c63 = _0x4cbdba;
for (var _0x460960 = 0x0; _0x460960 < 0x8; _0x460960++)
_0x515c63 = 0x1 & _0x515c63 ? 0xedb88320 ^ _0x515c63 >>> 0x1 : _0x515c63 >>> 0x1;
_0x361314[_0x4cbdba] = _0x515c63;
}
return _0x361314;
},
_0x4aed86 = _0x2fc680(),
_0x5880f0 = _0x4075b1,
_0x492393 = -0x1, _0x25d82c = 0x0;
_0x25d82c < _0x5880f0['length'];
_0x25d82c++)
_0x492393 = _0x492393 >>> 0x8 ^ _0x4aed86[0xff & (_0x492393 ^ _0x5880f0.charCodeAt(_0x25d82c))];
return _0x492393 = (-0x1 ^ _0x492393) >>> 0x0,
_0x492393.toString(_0x4eddcb);
}
function getSign(_0x1e37d5) {
var _0x4e2d74 = 'web';
var _0x56f040 = 3;
var _0x1e2592 = Math.round((new Date().getTime() + 0x3c * new Date().getTimezoneOffset() * 0x3e8 + 28800000) / 0x3e8).toString();
var key = 'a,d,e,f,g,h,l,m,y,i,j,n,o,p,k,q,r,s,t,u,b,c,v,w,s,z';
var _0x48562f = Math['round'](0x989680 * Math['random']());
var _0x2f7dfc;
var _0x35a889;
var _0x36f983;
var _0x3b043d;
var _0x5bc73b;
var _0x4b30b2;
var _0x32399e;
var _0x25d94e;
var _0x373490;
for (var _0x1c540f in (_0x2f7dfc = key.split(','),
_0x35a889 = _0x1b5d95(_0x1e2592),
_0x36f983 = _0x35a889['y'],
_0x3b043d = _0x35a889['m'],
_0x5bc73b = _0x35a889['d'],
_0x4b30b2 = _0x35a889['h'],
_0x32399e = _0x35a889['f'],
_0x25d94e = [_0x36f983, _0x3b043d, _0x5bc73b, _0x4b30b2, _0x32399e].join(''),
_0x373490 = [],
_0x25d94e))
_0x373490['push'](_0x2f7dfc[Number(_0x25d94e[_0x1c540f])]);
var _0x43bdc6;
var _0x406c4e;
return _0x43bdc6 = _0x4f141a(_0x373490['join']('')),
_0x406c4e = _0x4f141a(''['concat'](_0x1e2592, '|')['concat'](_0x48562f, '|')['concat'](_0x1e37d5, '|')['concat'](_0x4e2d74, '|')['concat'](_0x56f040, '|')['concat'](_0x43bdc6)),
[_0x43bdc6, ''['concat'](_0x1e2592, '-')['concat'](_0x48562f, '-')['concat'](_0x406c4e)];
}
""";
String lz = """
/**
* 蓝奏云解析器js签名获取工具
*/
var signObj;
var $, jQuery;
$ = jQuery = function () {
return new jQuery.fn.init();
}
jQuery.fn = jQuery.prototype = {
init: function () {
return {
focus: function (a) {
},
keyup: function(a) {
},
ajax: function (obj) {
signObj = obj
}
}
},
}
jQuery.fn.init.prototype = jQuery.fn;
// 伪装jquery.ajax函数获取关键数据
$.ajax = function (obj) {
signObj = obj
}
var document = {
getElementById: function (v) {
return {
value: 'v'
}
},
}
""";
String ye123 = "/*\n" +
" https://statics.123pan.com/share-static/dist/umi.fb72555e.js\n" +
" eaefamemdead\n" +
" eaefameidldy\n" +
" _0x4f141a(1690439821|5790548|/b/api/share/download/info|web|3|1946841013) = 秘钥\n" +
" \n" +
" _0x1e2592 1690439821 时间戳\n" +
" _0x48562f 5790548 随机码\n" +
" _0x1e37d5 /b/api/share/download/info\n" +
" _0x4e2d74 web\n" +
" _0x56f040 3\n" +
" _0x43bdc6 1946841013 加密时间HASH戳\n" +
" \n" +
" >>>>\n" +
" _0x43bdc6=''['concat'](_0x1e2592, '-')['concat'](_0x48562f, '-')['concat'](_0x406c4e)\n" +
" 加密时间HASH戳 = 时间戳-随机码-秘钥\n" +
" */\n" +
" \n" +
" function _0x1b5d95(_0x278d1a) {\n" +
" var _0x839b57,\n" +
" _0x4ed4dc = arguments['length'] > 0x2 && void 0x0 !== arguments[0x2] ? arguments[0x2] : " +
"0x8;\n" +
" if (0x0 === arguments['length'])\n" +
" return null;\n" +
" 'object' === typeof _0x278d1a ? _0x839b57 = _0x278d1a : (0xa === ('' + _0x278d1a)" +
"['length'] && (_0x278d1a = 0x3e8 * parseInt(_0x278d1a)),\n" +
" _0x839b57 = new Date(_0x278d1a));\n" +
" var _0xc5c54a = _0x278d1a + 0xea60 * new Date(_0x278d1a)['getTimezoneOffset']()\n" +
" , _0x3732dc = _0xc5c54a + 0x36ee80 * _0x4ed4dc;\n" +
" return _0x839b57 = new Date(_0x3732dc),\n" +
" {\n" +
" 'y': _0x839b57['getFullYear'](),\n" +
" 'm': _0x839b57['getMonth']() + 0x1 < 0xa ? '0' + (_0x839b57['getMonth']() + 0x1) : " +
"_0x839b57['getMonth']() + 0x1,\n" +
" 'd': _0x839b57['getDate']() < 0xa ? '0' + _0x839b57['getDate']() : " +
"_0x839b57['getDate'](),\n" +
" 'h': _0x839b57['getHours']() < 0xa ? '0' + _0x839b57['getHours']() : " +
"_0x839b57['getHours'](),\n" +
" 'f': _0x839b57['getMinutes']() < 0xa ? '0' + _0x839b57['getMinutes']() : " +
"_0x839b57['getMinutes']()\n" +
" };\n" +
" }\n" +
" \n" +
" \n" +
" function _0x4f141a(_0x4075b1) {\n" +
" \n" +
" for (var _0x4eddcb = arguments['length'] > 0x1 && void 0x0 !== arguments[0x1] ? " +
"arguments[0x1] : 0xa,\n" +
" _0x2fc680 = function() {\n" +
" for (var _0x515c63, _0x361314 = [], _0x4cbdba = 0x0; _0x4cbdba < 0x100; _0x4cbdba++) " +
"{\n" +
" _0x515c63 = _0x4cbdba;\n" +
" for (var _0x460960 = 0x0; _0x460960 < 0x8; _0x460960++)\n" +
" _0x515c63 = 0x1 & _0x515c63 ? 0xedb88320 ^ _0x515c63 >>> 0x1 : _0x515c63 >>> 0x1;" +
"\n" +
" _0x361314[_0x4cbdba] = _0x515c63;\n" +
" }\n" +
" return _0x361314;\n" +
" },\n" +
" _0x4aed86 = _0x2fc680(),\n" +
" _0x5880f0 = _0x4075b1,\n" +
" _0x492393 = -0x1, _0x25d82c = 0x0;\n" +
" _0x25d82c < _0x5880f0['length'];\n" +
" _0x25d82c++)\n" +
" \n" +
" _0x492393 = _0x492393 >>> 0x8 ^ _0x4aed86[0xff & (_0x492393 ^ _0x5880f0.charCodeAt" +
"(_0x25d82c))];\n" +
" return _0x492393 = (-0x1 ^ _0x492393) >>> 0x0,\n" +
" _0x492393.toString(_0x4eddcb);\n" +
" }\n" +
" \n" +
" \n" +
" function getSign(_0x1e37d5) {\n" +
" var _0x4e2d74 = 'web';\n" +
" var _0x56f040 = 3;\n" +
" var _0x1e2592 = Math.round((new Date().getTime() + 0x3c * new Date().getTimezoneOffset() *" +
" 0x3e8 + 28800000) / 0x3e8).toString();\n" +
" var key = 'a,d,e,f,g,h,l,m,y,i,j,n,o,p,k,q,r,s,t,u,b,c,v,w,s,z';\n" +
" var _0x48562f = Math['round'](0x989680 * Math['random']());\n" +
" \n" +
" var _0x2f7dfc;\n" +
" var _0x35a889;\n" +
" var _0x36f983;\n" +
" var _0x3b043d;\n" +
" var _0x5bc73b;\n" +
" var _0x4b30b2;\n" +
" var _0x32399e;\n" +
" var _0x25d94e;\n" +
" var _0x373490;\n" +
" for (var _0x1c540f in (_0x2f7dfc = key.split(','),\n" +
" _0x35a889 = _0x1b5d95(_0x1e2592),\n" +
" _0x36f983 = _0x35a889['y'],\n" +
" _0x3b043d = _0x35a889['m'],\n" +
" _0x5bc73b = _0x35a889['d'],\n" +
" _0x4b30b2 = _0x35a889['h'],\n" +
" _0x32399e = _0x35a889['f'],\n" +
" _0x25d94e = [_0x36f983, _0x3b043d, _0x5bc73b, _0x4b30b2, _0x32399e].join(''),\n" +
" _0x373490 = [],\n" +
" _0x25d94e))\n" +
" _0x373490['push'](_0x2f7dfc[Number(_0x25d94e[_0x1c540f])]);\n" +
" var _0x43bdc6;\n" +
" var _0x406c4e;\n" +
" return _0x43bdc6 = _0x4f141a(_0x373490['join']('')),\n" +
" _0x406c4e = _0x4f141a(''['concat'](_0x1e2592, '|')['concat'](_0x48562f, '|')['concat']" +
"(_0x1e37d5, '|')['concat'](_0x4e2d74, '|')['concat'](_0x56f040, '|')['concat'](_0x43bdc6)),\n" +
" [_0x43bdc6, ''['concat'](_0x1e2592, '-')['concat'](_0x48562f, '-')['concat'](_0x406c4e)" +
"];\n" +
" }\n" +
" ";
String lz = "/**\n" +
" * 蓝奏云解析器js签名获取工具\n" +
" */\n" +
" \n" +
" var signObj;\n" +
" \n" +
" \n" +
" var $, jQuery;\n" +
" \n" +
" $ = jQuery = function () {\n" +
" return new jQuery.fn.init();\n" +
" }\n" +
" \n" +
" jQuery.fn = jQuery.prototype = {\n" +
" init: function () {\n" +
" return {\n" +
" focus: function (a) {\n" +
" \n" +
" },\n" +
" keyup: function(a) {\n" +
" \n" +
" },\n" +
" ajax: function (obj) {\n" +
" signObj = obj\n" +
" }\n" +
" \n" +
" }\n" +
" },\n" +
" \n" +
" }\n" +
" \n" +
" jQuery.fn.init.prototype = jQuery.fn;\n" +
" \n" +
" \n" +
" // 伪装jquery.ajax函数获取关键数据\n" +
" $.ajax = function (obj) {\n" +
" signObj = obj\n" +
" }\n" +
" \n" +
" var document = {\n" +
" getElementById: function (v) {\n" +
" return {\n" +
" value: 'v'\n" +
" }\n" +
" },\n" +
" }";
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,7 @@
package qaiu.web.test;
import cn.qaiu.util.AESUtils;
import cn.qaiu.util.jdk17halper.HexFormat;
import org.junit.Assert;
import org.junit.Test;
@@ -9,7 +10,6 @@ import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.HexFormat;
public class TestAESUtil {

View File

@@ -9,10 +9,10 @@ public class TestRegex {
@Test
public void regexYFC() {
String html = """
<input type="hidden" id="typed_id" value="file_559003251828">
<input type="hidden" id="share_link_token" value="9cbe4b73521ba4d65a8cd38a8c">
""";
String html = "\n" +
" <input type=\"hidden\" id=\"typed_id\" value=\"file_559003251828\">\n" +
" <input type=\"hidden\" id=\"share_link_token\" " +
"value=\"9cbe4b73521ba4d65a8cd38a8c\">";
Pattern compile = Pattern.compile("id=\"typed_id\"\\s+value=\"file_(\\d+)\"");
Matcher matcher = compile.matcher(html);

View File

@@ -15,9 +15,11 @@ public class TestWebClient2 {
public void matcherHtml() {
Pattern compile = Pattern.compile("class=\"ifr2\" name=.+src=\"(/fn\\?[a-zA-Z0-9_+/=]{16,})\"");
var text = """
<div class="ifr"><!--<iframe class="ifr2" name="1" src="/fn?v2" frameborder="0" scrolling="no"></iframe>-->
<iframe class="ifr2" name="1685001208" src="/fn?UzUBa1oxBmUAYgNsUDUFNVI6BjJfJlchV21TZFU_aVWwANVQzXTBXMlUxUTcLZ1dwUn8DYwQ5AHFVOwdmBjRUPlM2AS9aOgY3AGIDMFA2" frameborder="0" scrolling="no"></iframe>""";
var text = "<div class=\"ifr\"><!--<iframe class=\"ifr2\" name=\"1\" src=\"/fn?v2\" frameborder=\"0\" " +
"scrolling=\"no\"></iframe>-->\n" +
"<iframe class=\"ifr2\" name=\"1685001208\" " +
"src=\"/fn" +
"?UzUBa1oxBmUAYgNsUDUFNVI6BjJfJlchV21TZFU_aVWwANVQzXTBXMlUxUTcLZ1dwUn8DYwQ5AHFVOwdmBjRUPlM2AS9aOgY3AGIDMFA2\" frameborder=\"0\" scrolling=\"no\"></iframe>";
System.out.println(text);
Matcher matcher = compile.matcher(text);
if (matcher.find()) {

View File

@@ -18,9 +18,9 @@
<properties>
<revision>0.1.7</revision>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<packageDirectory>${project.basedir}/web-service/target/package</packageDirectory>

View File

@@ -12,7 +12,6 @@
<properties>
<packageDirectory>${project.basedir}/target/package</packageDirectory>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<finalName>netdisk-fast-download</finalName>
</properties>

View File

@@ -47,12 +47,10 @@ public class DbServiceImpl implements DbService {
public Future<StatisticsInfo> getStatisticsInfo() {
JDBCPool client = JDBCPoolInit.instance().getPool();
Promise<StatisticsInfo> promise = Promise.promise();
String sql = """
select COUNT(CASE "code" WHEN 500 THEN "code" END ) "fail",
COUNT(CASE "code" WHEN 200 THEN "code" END ) "success",
count(1) "total"
from "t_parser_log_info"
""";
String sql = "select COUNT(CASE \"code\" WHEN 500 THEN \"code\" END ) \"fail\",\n" +
" COUNT(CASE \"code\" WHEN 200 THEN \"code\" END ) \"success\",\n" +
" count(1) \"total\"\n" +
" from \"t_parser_log_info\"";
SqlTemplate.forQuery(client, sql).mapTo(StatisticsInfo.class).execute(new HashMap<>()).onSuccess(row -> {
StatisticsInfo info;
if ((info = row.iterator().next()) != null) {

View File

@@ -9,10 +9,9 @@ public class TestRegex {
@Test
public void regexYFC() {
String html = """
<input type="hidden" id="typed_id" value="file_559003251828">
<input type="hidden" id="share_link_token" value="9cbe4b73521ba4d65a8cd38a8c">
""";
String html = "<input type=\"hidden\" id=\"typed_id\" value=\"file_559003251828\">\n" +
" <input type=\"hidden\" id=\"share_link_token\" " +
"value=\"9cbe4b73521ba4d65a8cd38a8c\">";
Pattern compile = Pattern.compile("id=\"typed_id\"\\s+value=\"file_(\\d+)\"");
Matcher matcher = compile.matcher(html);

View File

@@ -154,14 +154,14 @@ public class WebProxyExamples {
public static void main(String[] args) {
final WebProxyExamples examples = new WebProxyExamples();
examples.vertx.executeBlocking(rs -> {
rs.complete();
examples.origin();
});
examples.vertx.executeBlocking(rs -> {
rs.complete();
examples.route();
});
// examples.vertx.executeBlocking(rs -> {
// rs.complete();
// examples.origin();
// });
// examples.vertx.executeBlocking(rs -> {
// rs.complete();
// examples.route();
// });
System.out.println("ok");
}