mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2025-12-16 20:33:03 +00:00
代理服务配置优化
This commit is contained in:
18
README.md
18
README.md
@@ -223,14 +223,24 @@ resources目录下包含服务端配置文件 配置文件自带说明,具体
|
|||||||
app-dev.yml 可以配置解析服务相关信息, 包括端口,域名,缓存时长等
|
app-dev.yml 可以配置解析服务相关信息, 包括端口,域名,缓存时长等
|
||||||
server-proxy.yml 可以配置代理服务运行的相关信息, 包括前端反向代理端口,路径等
|
server-proxy.yml 可以配置代理服务运行的相关信息, 包括前端反向代理端口,路径等
|
||||||
|
|
||||||
|
## ip代理配置说明
|
||||||
|
app-dev.yml
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
proxy:
|
||||||
|
- panTypes: pgd,pdb,pod # 网盘标识
|
||||||
|
type: http # 支持http/socks4/socks5
|
||||||
|
host: 127.0.0.1 # 代理IP
|
||||||
|
port: 7890 # 端口
|
||||||
|
username: # 用户名
|
||||||
|
password: # 密码
|
||||||
|
```
|
||||||
|
可以通过nfd-proxy搭建http代理服务器
|
||||||
|
参考https://github.com/nfd-parser/nfd-proxy
|
||||||
|
|
||||||
## 0.1.9 开发计划
|
## 0.1.9 开发计划
|
||||||
- 超星网盘解析 doing
|
|
||||||
- 带Referer头的js请求下载 doing
|
|
||||||
- 城通网盘解析 √
|
|
||||||
- 目录解析(专属版)
|
- 目录解析(专属版)
|
||||||
- 带cookie/token参数解析大文件(专属版)
|
- 带cookie/token参数解析大文件(专属版)
|
||||||
- docker
|
|
||||||
|
|
||||||
**技术栈:**
|
**技术栈:**
|
||||||
Jdk17+Vert.x4
|
Jdk17+Vert.x4
|
||||||
|
|||||||
@@ -44,24 +44,24 @@ public class AppMain {
|
|||||||
if (jsonObject.containsKey(ConfigConstant.CACHE)) {
|
if (jsonObject.containsKey(ConfigConstant.CACHE)) {
|
||||||
CacheConfigLoader.init(jsonObject.getJsonObject(ConfigConstant.CACHE));
|
CacheConfigLoader.init(jsonObject.getJsonObject(ConfigConstant.CACHE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LocalMap<Object, Object> localMap = VertxHolder.getVertxInstance().sharedData().getLocalMap(LOCAL);
|
||||||
// 代理
|
// 代理
|
||||||
if (jsonObject.containsKey(ConfigConstant.PROXY)) {
|
if (jsonObject.containsKey(ConfigConstant.PROXY)) {
|
||||||
LocalMap<Object, Object> localMap = VertxHolder.getVertxInstance().sharedData().getLocalMap(LOCAL);
|
|
||||||
JsonArray proxyJsonArray = jsonObject.getJsonArray(ConfigConstant.PROXY);
|
JsonArray proxyJsonArray = jsonObject.getJsonArray(ConfigConstant.PROXY);
|
||||||
if (proxyJsonArray != null) {
|
if (proxyJsonArray != null) {
|
||||||
|
JsonObject jsonObject1 = new JsonObject();
|
||||||
proxyJsonArray.forEach(proxyJson -> {
|
proxyJsonArray.forEach(proxyJson -> {
|
||||||
String panTypes = ((JsonObject)proxyJson).getString("panTypes");
|
String panTypes = ((JsonObject)proxyJson).getString("panTypes");
|
||||||
|
|
||||||
if (!panTypes.isEmpty()) {
|
if (!panTypes.isEmpty()) {
|
||||||
JsonObject jsonObject1 = new JsonObject();
|
|
||||||
for (String s : panTypes.split(",")) {
|
for (String s : panTypes.split(",")) {
|
||||||
jsonObject1.put(s, proxyJson);
|
jsonObject1.put(s, proxyJson);
|
||||||
}
|
}
|
||||||
localMap.put("proxy", jsonObject1);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
localMap.put("proxy", jsonObject1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user