mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-04-11 03:16:54 +00:00
Compare commits
12 Commits
ed8fd66d1e
...
copilot/an
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a420bad305 | ||
|
|
6ef6e47580 | ||
|
|
94f83ec296 | ||
|
|
702569c701 | ||
|
|
d4940ca9ee | ||
|
|
dbd1c138ca | ||
|
|
0b49c55cf3 | ||
|
|
b1ec3b2eea | ||
|
|
9ea89feee7 | ||
|
|
4a843194a3 | ||
|
|
03503115fd | ||
|
|
1870aef60e |
19
README.md
19
README.md
@@ -1,5 +1,17 @@
|
|||||||
|
<div align="center" style="display:flex; justify-content:center; gap:10px; align-items:flex-start;">
|
||||||
|
<img
|
||||||
|
src="https://github.com/user-attachments/assets/bf266d0a-aaf8-4772-9231-e38a4b7bb6cb"
|
||||||
|
alt="image1"
|
||||||
|
style="width:300px; max-width:300px; flex:none;"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="https://github.com/user-attachments/assets/bb7a85f0-c256-4b4a-a11b-3ceb55afc302"
|
||||||
|
alt="image2"
|
||||||
|
style="width:300px; max-width:300px; flex:none;"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://github.com/user-attachments/assets/87401aae-b0b6-4ffb-bbeb-44756404d26f" alt="项目预览图" />
|
<a href="https://trendshift.io/repositories/12101" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12101" alt="qaiu%2Fnetdisk-fast-download | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -8,10 +20,6 @@
|
|||||||
<a href="https://vertx-china.github.io"><img src="https://img.shields.io/badge/vert.x-4.5.22-blue?style=flat"></a>
|
<a href="https://vertx-china.github.io"><img src="https://img.shields.io/badge/vert.x-4.5.22-blue?style=flat"></a>
|
||||||
<a href="https://raw.githubusercontent.com/qaiu/netdisk-fast-download/master/LICENSE"><img src="https://img.shields.io/github/license/qaiu/netdisk-fast-download?style=flat"></a>
|
<a href="https://raw.githubusercontent.com/qaiu/netdisk-fast-download/master/LICENSE"><img src="https://img.shields.io/github/license/qaiu/netdisk-fast-download?style=flat"></a>
|
||||||
<a href="https://github.com/qaiu/netdisk-fast-download/releases/"><img src="https://img.shields.io/github/v/release/qaiu/netdisk-fast-download?style=flat"></a>
|
<a href="https://github.com/qaiu/netdisk-fast-download/releases/"><img src="https://img.shields.io/github/v/release/qaiu/netdisk-fast-download?style=flat"></a>
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# netdisk-fast-download 网盘分享链接云解析服务
|
# netdisk-fast-download 网盘分享链接云解析服务
|
||||||
QQ交流群:1017480890
|
QQ交流群:1017480890
|
||||||
@@ -61,7 +69,6 @@ main分支依赖JDK17, 提供了JDK11分支[main-jdk11](https://github.com/qaiu/
|
|||||||
|
|
||||||
- [蓝奏云-lz](https://pc.woozooo.com/)
|
- [蓝奏云-lz](https://pc.woozooo.com/)
|
||||||
- [蓝奏云优享-iz](https://www.ilanzou.com/)
|
- [蓝奏云优享-iz](https://www.ilanzou.com/)
|
||||||
- [奶牛快传-cow](https://cowtransfer.com/)
|
|
||||||
- [移动云云空间-ec](https://www.ecpan.cn/web)
|
- [移动云云空间-ec](https://www.ecpan.cn/web)
|
||||||
- [小飞机网盘-fj](https://www.feijipan.com/)
|
- [小飞机网盘-fj](https://www.feijipan.com/)
|
||||||
- [亿方云-fc](https://www.fangcloud.com/)
|
- [亿方云-fc](https://www.fangcloud.com/)
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ public enum PanDomainTemplate {
|
|||||||
|
|
||||||
// https://v2.fangcloud.com/s/
|
// https://v2.fangcloud.com/s/
|
||||||
FC("亿方云",
|
FC("亿方云",
|
||||||
compile("https://v2\\.fangcloud\\.(com|cn)/(s|sharing)/(?<KEY>.+)"),
|
compile("https://v2\\.fangcloud\\.(com|cn)/(s|share|sharing)/(?<KEY>.+)"),
|
||||||
"https://v2.fangcloud.com/s/{shareKey}",
|
"https://v2.fangcloud.com/s/{shareKey}",
|
||||||
"https://www.fangcloud.com/",
|
"https://www.fangcloud.com/",
|
||||||
FcTool.class),
|
FcTool.class),
|
||||||
@@ -142,9 +142,41 @@ public enum PanDomainTemplate {
|
|||||||
compile("https://qfile\\.qq\\.com/q/(?<KEY>.+)"),
|
compile("https://qfile\\.qq\\.com/q/(?<KEY>.+)"),
|
||||||
"https://qfile.qq.com/q/{shareKey}",
|
"https://qfile.qq.com/q/{shareKey}",
|
||||||
QQscTool.class),
|
QQscTool.class),
|
||||||
// https://f.ws59.cn/f/或者https://www.wenshushu.cn/f/
|
// https://f.ws59.cn/f/ 或者 https://www.wenshushu.cn/f/ 等多个镜像域名
|
||||||
|
/*
|
||||||
|
f.wsNN.cn (如 f.ws59.cn, f.ws28.cn 等)
|
||||||
|
www.wenshushu.cn
|
||||||
|
新增域名:
|
||||||
|
www.wenxiaozhan.net
|
||||||
|
www.wenxiaozhan.cn
|
||||||
|
www.wss.show
|
||||||
|
www.ws28.cn
|
||||||
|
www.wss.email
|
||||||
|
www.wss1.cn
|
||||||
|
www.ws59.cn
|
||||||
|
www.wss.cc
|
||||||
|
www.wss.pet
|
||||||
|
www.wss.ink
|
||||||
|
www.wenxiaozhan.com
|
||||||
|
www.wenshushu.com
|
||||||
|
www.wss.zone
|
||||||
|
*/
|
||||||
WS("文叔叔",
|
WS("文叔叔",
|
||||||
compile("https://(f\\.ws(\\d{2})\\.cn|www\\.wenshushu\\.cn)/f/(?<KEY>.+)"),
|
compile("https://(f\\.ws(\\d{2})\\.cn|" +
|
||||||
|
"www\\.wenxiaozhan\\.net|" +
|
||||||
|
"www\\.wenxiaozhan\\.cn|" +
|
||||||
|
"www\\.wss\\.show|" +
|
||||||
|
"www\\.ws28\\.cn|" +
|
||||||
|
"www\\.wss\\.email|" +
|
||||||
|
"www\\.wss1\\.cn|" +
|
||||||
|
"www\\.ws59\\.cn|" +
|
||||||
|
"www\\.wss\\.cc|" +
|
||||||
|
"www\\.wss\\.pet|" +
|
||||||
|
"www\\.wss\\.ink|" +
|
||||||
|
"www\\.wenxiaozhan\\.com|" +
|
||||||
|
"www\\.wenshushu\\.com|" +
|
||||||
|
"www\\.wss\\.zone|" +
|
||||||
|
"www\\.wenshushu\\.cn)/f/(?<KEY>.+)"),
|
||||||
"https://www.wenshushu.cn/f/{shareKey}",
|
"https://www.wenshushu.cn/f/{shareKey}",
|
||||||
WsTool.class),
|
WsTool.class),
|
||||||
// https://www.123pan.com/s/
|
// https://www.123pan.com/s/
|
||||||
@@ -198,7 +230,7 @@ public enum PanDomainTemplate {
|
|||||||
"123635\\.com|" +
|
"123635\\.com|" +
|
||||||
"123242\\.com|" +
|
"123242\\.com|" +
|
||||||
"123795\\.com" +
|
"123795\\.com" +
|
||||||
")/s/(?<KEY>.+)(.html)?"),
|
")/s/(?<KEY>[a-zA-Z0-9_-]+)(?:\\.html)?"),
|
||||||
"https://www.123pan.com/s/{shareKey}",
|
"https://www.123pan.com/s/{shareKey}",
|
||||||
Ye2Tool.class),
|
Ye2Tool.class),
|
||||||
// https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data={code}&isShare=1
|
// https://www.ecpan.cn/web/#/yunpanProxy?path=%2F%23%2Fdrive%2Foutside&data={code}&isShare=1
|
||||||
|
|||||||
@@ -7,11 +7,14 @@ import java.util.Arrays;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static java.util.regex.Pattern.compile;
|
import static java.util.regex.Pattern.compile;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertFalse;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="https://qaiu.top">QAIU</a>
|
* @author <a href="https://qaiu.top">QAIU</a>
|
||||||
@@ -77,6 +80,55 @@ public class PanDomainTemplateTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testWsPatternMatching() {
|
||||||
|
Pattern wsPattern = PanDomainTemplate.WS.getPattern();
|
||||||
|
|
||||||
|
// 历史域名
|
||||||
|
String[] positiveUrls = {
|
||||||
|
"https://f.ws59.cn/f/f25625rv6p6",
|
||||||
|
"https://f.ws28.cn/f/somekey123",
|
||||||
|
"https://www.wenshushu.cn/f/abc123",
|
||||||
|
// 新增域名
|
||||||
|
"https://www.wenxiaozhan.net/f/testkey1",
|
||||||
|
"https://www.wenxiaozhan.cn/f/testkey2",
|
||||||
|
"https://www.wss.show/f/testkey3",
|
||||||
|
"https://www.ws28.cn/f/testkey4",
|
||||||
|
"https://www.wss.email/f/testkey5",
|
||||||
|
"https://www.wss1.cn/f/testkey6",
|
||||||
|
"https://www.ws59.cn/f/testkey7",
|
||||||
|
"https://www.wss.cc/f/testkey8",
|
||||||
|
"https://www.wss.pet/f/testkey9",
|
||||||
|
"https://www.wss.ink/f/testkey10",
|
||||||
|
"https://www.wenxiaozhan.com/f/testkey11",
|
||||||
|
"https://www.wenshushu.com/f/testkey12",
|
||||||
|
"https://www.wss.zone/f/testkey13",
|
||||||
|
};
|
||||||
|
|
||||||
|
for (String url : positiveUrls) {
|
||||||
|
Matcher m = wsPattern.matcher(url);
|
||||||
|
assertTrue("WS pattern should match: " + url, m.matches());
|
||||||
|
assertNotNull("KEY group should not be null for: " + url, m.group("KEY"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证 KEY 提取正确性
|
||||||
|
Matcher m1 = wsPattern.matcher("https://f.ws59.cn/f/f25625rv6p6");
|
||||||
|
assertTrue(m1.matches());
|
||||||
|
assertEquals("f25625rv6p6", m1.group("KEY"));
|
||||||
|
|
||||||
|
Matcher m2 = wsPattern.matcher("https://www.wenshushu.cn/f/abc123");
|
||||||
|
assertTrue(m2.matches());
|
||||||
|
assertEquals("abc123", m2.group("KEY"));
|
||||||
|
|
||||||
|
// 负例:错误路径不匹配
|
||||||
|
assertFalse("Wrong path should not match",
|
||||||
|
wsPattern.matcher("https://www.wenshushu.cn/x/abc123").matches());
|
||||||
|
|
||||||
|
// 负例:非白名单域名不匹配
|
||||||
|
assertFalse("Non-whitelisted domain should not match",
|
||||||
|
wsPattern.matcher("https://www.evil.com/f/abc123").matches());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void verifyDuplicates() {
|
public void verifyDuplicates() {
|
||||||
|
|
||||||
|
|||||||
@@ -274,7 +274,7 @@
|
|||||||
name: '联想乐云'
|
name: '联想乐云'
|
||||||
},
|
},
|
||||||
fangcloud: {
|
fangcloud: {
|
||||||
reg: /https:\/\/v2\.fangcloud\.(com|cn)\/(s|sharing)\/.+/,
|
reg: /https:\/\/v2\.fangcloud\.(com|cn)\/(s|share|sharing)\/.+/,
|
||||||
host: /fangcloud\.(com|cn)/,
|
host: /fangcloud\.(com|cn)/,
|
||||||
name: '亿方云'
|
name: '亿方云'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user