mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-17 04:43:02 +00:00
1. add:123云盘的新域名
2. update: 统计API支持ce盘 3. 缓存时长
This commit is contained in:
@@ -14,13 +14,10 @@ import cn.qaiu.vx.core.annotaions.RouteHandler;
|
||||
import cn.qaiu.vx.core.annotaions.RouteMapping;
|
||||
import cn.qaiu.vx.core.enums.RouteMethod;
|
||||
import cn.qaiu.vx.core.util.AsyncServiceUtil;
|
||||
import cn.qaiu.vx.core.util.ResponseUtil;
|
||||
import cn.qaiu.vx.core.util.SharedDataUtil;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.Promise;
|
||||
import io.vertx.core.http.HttpServerRequest;
|
||||
import io.vertx.core.http.HttpServerResponse;
|
||||
import io.vertx.core.net.HostAndPort;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@@ -48,10 +45,11 @@ public class ParserApi {
|
||||
public Future<LinkInfoResp> parse(HttpServerRequest request, String pwd) {
|
||||
Promise<LinkInfoResp> promise = Promise.promise();
|
||||
String url = URLParamUtil.parserParams(request);
|
||||
ShareLinkInfo shareLinkInfo = ParserCreate.fromShareUrl(url).setShareLinkInfoPwd(pwd).getShareLinkInfo();
|
||||
ParserCreate parserCreate = ParserCreate.fromShareUrl(url).setShareLinkInfoPwd(pwd);
|
||||
ShareLinkInfo shareLinkInfo = parserCreate.getShareLinkInfo();
|
||||
LinkInfoResp build = LinkInfoResp.builder()
|
||||
.downLink(getDownLink(shareLinkInfo, false))
|
||||
.apiLink(getDownLink(shareLinkInfo, true))
|
||||
.downLink(getDownLink(parserCreate, false))
|
||||
.apiLink(getDownLink(parserCreate, true))
|
||||
.shareLinkInfo(shareLinkInfo).build();
|
||||
// 解析次数统计
|
||||
cacheManager.getShareKeyTotal(shareLinkInfo.getCacheKey()).onSuccess(res -> {
|
||||
@@ -68,16 +66,14 @@ public class ParserApi {
|
||||
return promise.future();
|
||||
}
|
||||
|
||||
private static String getDownLink(ShareLinkInfo shareLinkInfo, boolean isJson) {
|
||||
private static String getDownLink(ParserCreate create, boolean isJson) {
|
||||
|
||||
String linkPrefix = SharedDataUtil.getJsonConfig("server")
|
||||
.getString("domainName");
|
||||
if (StringUtils.isBlank(linkPrefix)) {
|
||||
linkPrefix = "http://127.0.0.1";
|
||||
}
|
||||
String pwd = shareLinkInfo.getSharePassword();
|
||||
return linkPrefix + (isJson ? "/json/" : "/") + shareLinkInfo.getType() + "/" + shareLinkInfo.getShareKey() +
|
||||
(StringUtils.isBlank(pwd) ? "" : ("@" + pwd));
|
||||
return linkPrefix + (isJson ? "/json/" : "/") + create.genPathSuffix();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@ cache:
|
||||
cow:
|
||||
ec:
|
||||
fc:
|
||||
fj:
|
||||
iz:
|
||||
fj: 30
|
||||
iz: 20
|
||||
le: 2879
|
||||
lz:
|
||||
qq: 999999
|
||||
|
||||
@@ -111,6 +111,9 @@ GET http://127.0.0.1:6400/ye/Ev1lVv-t3SY3
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/json/parser?url=https://www.123pan.com/s/iaKtVv-6OECd.html&pwd=DcGe
|
||||
|
||||
### 123 PASS https://www.123865.com/s/iaKtVv-6OECd.html
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/json/parser?url=https://www.123865.com/s/iaKtVv-6OECd.html&pwd=DcGe
|
||||
|
||||
### 123
|
||||
# @no-redirect
|
||||
@@ -164,7 +167,9 @@ GET http://127.0.0.1:6400/json/parser?url=https://iwx.mail.qq.com/ftn/download?f
|
||||
GET http://127.0.0.1:6400/v2/statisticsInfo
|
||||
|
||||
###
|
||||
GET http://127.0.0.1:6400/v2/linkInfo?url=https://www.123pan.com/s/iaKtVv-6OECd.html&pwd=DcGe
|
||||
GET http://127.0.0.1:6400/v2/linkInfo?url=https://www.123865.com/s/iaKtVv-6OECd.html&pwd=DcGe
|
||||
###
|
||||
GET http://127.0.0.1:6400/v2/linkInfo?url=https://pan.seeoss.com/s/nLNsQ&pwd=DcGe
|
||||
|
||||
###
|
||||
POST http://127.0.0.1:6400/v2/login?username=asd
|
||||
|
||||
Reference in New Issue
Block a user