mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 12:23:03 +00:00
pod update
This commit is contained in:
@@ -7,8 +7,12 @@ import cn.qaiu.vx.core.Deploy;
|
||||
import cn.qaiu.vx.core.util.ConfigConstant;
|
||||
import cn.qaiu.vx.core.util.VertxHolder;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import io.vertx.core.json.JsonArray;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.core.json.jackson.DatabindCodec;
|
||||
import io.vertx.core.shareddata.LocalMap;
|
||||
|
||||
import static cn.qaiu.vx.core.util.ConfigConstant.LOCAL;
|
||||
|
||||
|
||||
/**
|
||||
@@ -39,5 +43,23 @@ public class AppMain {
|
||||
if (jsonObject.containsKey(ConfigConstant.CACHE)) {
|
||||
CacheConfigLoader.init(jsonObject.getJsonObject(ConfigConstant.CACHE));
|
||||
}
|
||||
// 代理
|
||||
if (jsonObject.containsKey(ConfigConstant.PROXY)) {
|
||||
LocalMap<Object, Object> localMap = VertxHolder.getVertxInstance().sharedData().getLocalMap(LOCAL);
|
||||
JsonArray proxyJsonArray = jsonObject.getJsonArray(ConfigConstant.PROXY);
|
||||
|
||||
proxyJsonArray.forEach(proxyJson -> {
|
||||
String panTypes = ((JsonObject)proxyJson).getString("panTypes");
|
||||
|
||||
if (!panTypes.isEmpty()) {
|
||||
JsonObject jsonObject1 = new JsonObject();
|
||||
for (String s : panTypes.split(",")) {
|
||||
jsonObject1.put(s, proxyJson);
|
||||
}
|
||||
localMap.put("proxy", jsonObject1);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,12 @@ import cn.qaiu.lz.web.model.CacheLinkInfo;
|
||||
import cn.qaiu.lz.web.service.CacheService;
|
||||
import cn.qaiu.parser.ParserCreate;
|
||||
import cn.qaiu.vx.core.annotaions.Service;
|
||||
import cn.qaiu.vx.core.util.ConfigConstant;
|
||||
import cn.qaiu.vx.core.util.VertxHolder;
|
||||
import io.vertx.core.Future;
|
||||
import io.vertx.core.Promise;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import io.vertx.core.shareddata.LocalMap;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -21,6 +24,16 @@ public class CacheServiceImpl implements CacheService {
|
||||
private final CacheManager cacheManager = new CacheManager();
|
||||
|
||||
private Future<CacheLinkInfo> getAndSaveCachedShareLink(ParserCreate parserCreate) {
|
||||
LocalMap<Object, Object> localMap = VertxHolder.getVertxInstance().sharedData()
|
||||
.getLocalMap(ConfigConstant.LOCAL);
|
||||
if (localMap.containsKey(ConfigConstant.PROXY)) {
|
||||
JsonObject proxy = (JsonObject) localMap.get(ConfigConstant.PROXY);
|
||||
String type = parserCreate.getShareLinkInfo().getType();
|
||||
if (proxy.containsKey(type)) {
|
||||
parserCreate.getShareLinkInfo().getOtherParam().put(ConfigConstant.PROXY, proxy.getJsonObject(type));
|
||||
}
|
||||
}
|
||||
|
||||
Promise<CacheLinkInfo> promise = Promise.promise();
|
||||
// 构建组合的缓存key
|
||||
ShareLinkInfo shareLinkInfo = parserCreate.getShareLinkInfo();
|
||||
|
||||
@@ -64,4 +64,16 @@ cache:
|
||||
mqq: 30
|
||||
mkg: 30
|
||||
|
||||
# httpClient静态代理服务器配置(外网代理)
|
||||
proxy:
|
||||
- panTypes: pgd,pdb
|
||||
type: http # 支持http/socks4/socks5
|
||||
host: 127.0.0.1
|
||||
port: 7890
|
||||
username:
|
||||
password:
|
||||
|
||||
|
||||
# 代理池配置
|
||||
#ip-pool:
|
||||
# api-url:
|
||||
|
||||
@@ -142,6 +142,7 @@ https://api.onedrive.com/v1.0/drives/abfd0a26e47d3458/items/ABFD0A26E47D3458!469
|
||||
|
||||
|
||||
### https://onedrive.live.com/redir?resid=ABFD0A26E47D3458!3729&authkey=!AF3rQNA6Yxr46H8&ithint=file%2cdocx&e=buaRtp
|
||||
### https://onedrive.live.com/redir?resid=ABFD0A26E47D3458!3729&ithint=file%2cdocx&e=buaRtp&migratedtospo=true&redeem=aHR0cHM6Ly8xZHJ2Lm1zL3cvcyFBbGcwZmVRbUN2MnJuUkZkNjBEUU9tTWEtT2hfP2U9YnVhUnRw
|
||||
#@no-redirect
|
||||
https://1drv.ms/w/s!Alg0feQmCv2rnRFd60DQOmMa-Oh_?e=buaRtp
|
||||
|
||||
@@ -153,6 +154,7 @@ https://api.onedrive.com/v1.0/drives/abfd0a26e47d3458/items/ABFD0A26E47D3458!372
|
||||
https://1drv.ms/u/s!Alg0feQmCv2rpFvu444hg5yVqDcK?e=OggA4s
|
||||
|
||||
###
|
||||
#@no-redirect
|
||||
https://onedrive.live.com/redir?resid=ABFD0A26E47D3458!4699&authkey=!AO7jjiGDnJWoNwo&e=OggA4s
|
||||
|
||||
###
|
||||
|
||||
@@ -259,3 +259,7 @@ GET http://127.0.0.1:6400/parser?url=https://1drv.ms/u/s!Alg0feQmCv2rpFvu444hg5y
|
||||
### pic PASS
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://www.icloud.com.cn/iclouddrive/0d8lBC0qp01v1uNThurAGQf1A#fonts
|
||||
|
||||
### pdb PASS
|
||||
# @no-redirect
|
||||
GET http://127.0.0.1:6400/parser?url=https://www.dropbox.com/scl/fi/cwnbms1yn8u6rcatzyta7/1?rlkey=3uoi4bxz5mv93jmlaws0nlol1&e=2&dl=0
|
||||
|
||||
Reference in New Issue
Block a user