Skip to content

Commit

Permalink
代理服务配置优化
Browse files Browse the repository at this point in the history
  • Loading branch information
qaiu committed Jan 4, 2025
1 parent d91460d commit 594010b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,24 @@ resources目录下包含服务端配置文件 配置文件自带说明,具体
app-dev.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 开发计划
- 超星网盘解析 doing
- 带Referer头的js请求下载 doing
- 城通网盘解析 √
- 目录解析(专属版)
- 带cookie/token参数解析大文件(专属版)
- docker
**技术栈:**
Jdk17+Vert.x4
Expand Down
8 changes: 4 additions & 4 deletions web-service/src/main/java/cn/qaiu/lz/AppMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,24 @@ private static void exec(JsonObject jsonObject) {
if (jsonObject.containsKey(ConfigConstant.CACHE)) {
CacheConfigLoader.init(jsonObject.getJsonObject(ConfigConstant.CACHE));
}

LocalMap<Object, Object> localMap = VertxHolder.getVertxInstance().sharedData().getLocalMap(LOCAL);
// 代理
if (jsonObject.containsKey(ConfigConstant.PROXY)) {
LocalMap<Object, Object> localMap = VertxHolder.getVertxInstance().sharedData().getLocalMap(LOCAL);
JsonArray proxyJsonArray = jsonObject.getJsonArray(ConfigConstant.PROXY);
if (proxyJsonArray != null) {
JsonObject jsonObject1 = new JsonObject();
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);
}
});
localMap.put("proxy", jsonObject1);
}

}
}
}

0 comments on commit 594010b

Please sign in to comment.