|
3 | 3 | // @name:zh-CN Github 增强 - 高速下载 |
4 | 4 | // @name:zh-TW Github 增強 - 高速下載 |
5 | 5 | // @name:en Github Enhancement - High Speed Download |
6 | | -// @version 1.8.6 |
| 6 | +// @version 1.8.7 |
7 | 7 | // @author X.I.U |
8 | 8 | // @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) |
9 | 9 | // @description:zh-CN 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁) |
|
30 | 30 | 'use strict'; |
31 | 31 | var backColor = '#ffffff', fontColor = '#888888', menu_raw_fast = GM_getValue('xiu2_menu_raw_fast'), menu_menu_raw_fast_ID, menu_feedBack_ID; |
32 | 32 | const download_url = [ |
33 | | - ['https://pd.zwc365.com/seturl/https://github.com', '美国 1'], |
34 | | - ['https://gh.xiu.workers.dev/https://github.com', '美国 2'], |
35 | | - ['https://gh.api.99988866.xyz/https://github.com', '美国 3'], |
36 | | - ['https://github.rc1844.workers.dev', '美国 4'], |
37 | | - ['https://ghgo.feizhuqwq.workers.dev/https://github.com', '美国 5'], |
38 | | - ['https://git.yumenaka.net/https://github.com', '美国 6'], |
39 | | - ['https://github.do/https://github.com', '中国'], |
| 33 | + //['https://pd.zwc365.com/seturl/https://github.com', '美国 1'], |
| 34 | + ['https://gh.xiu.workers.dev/https://github.com', '美国 1'], |
| 35 | + //['https://gh.api.99988866.xyz/https://github.com', '美国 2'], |
| 36 | + ['https://github.rc1844.workers.dev', '美国 2'], |
| 37 | + ['https://ghgo.feizhuqwq.workers.dev/https://github.com', '美国 3'], |
| 38 | + ['https://git.yumenaka.net/https://github.com', '美国 4'], |
| 39 | + ['https://gh.ddlc.top/https://github.com', '美国 5'], |
| 40 | + ['https://github.do/https://github.com', '中国国内'], |
| 41 | + ['https://github.ddlc.love/https://github.com', '中国香港'], |
40 | 42 | ['https://download.fastgit.org', '日本'], |
41 | 43 | ['https://ghproxy.com/https://github.com', '韩国'] |
42 | | - //['https://ghproxy.fsou.cc/https://github.com', '香港'] |
43 | 44 | ], |
44 | 45 | clone_url = [ |
45 | | - ['https://github.do/https://github.com', '中国'], |
46 | | - ['https://gitclone.com', '中国'], |
| 46 | + ['https://github.do/https://github.com', '中国国内'], |
| 47 | + //['https://gitclone.com', '中国国内'], |
| 48 | + ['https://api.mtr.pub', '中国香港'], |
47 | 49 | ['https://hub.fastgit.xyz', '日本'], |
48 | 50 | ['https://ghproxy.com/https://github.com', '韩国'], |
49 | 51 | ['https://hub.0z.gs', '美国'], |
|
54 | 56 | ['git@git.zhlh6.cn', '美国'] |
55 | 57 | ], |
56 | 58 | raw_url = [ |
57 | | - ['https://raw.githubusercontent.com', 'Github 原生',''], |
| 59 | + ['https://raw.githubusercontent.com', 'Github 原生', ''], |
58 | 60 | //['https://ghproxy.fsou.cc/https://github.com', '中国香港 1', ''], |
59 | 61 | //['https://pd.zwc365.com/seturl/https://raw.githubusercontent.com', '中国香港 2', ''], |
60 | | - ['https://github.do/https://raw.githubusercontent.com','中国', '注意: - 首次访问速度可能较慢,后续因缓存会快很多。'], |
| 62 | + ['https://github.do/https://raw.githubusercontent.com', '中国国内', '注意: - 首次访问速度可能较慢,后续因缓存会快很多,但也意味着可能不是最新的。'], |
| 63 | + ['https://hk1.monika.love', '中国香港', ''], |
61 | 64 | ['https://ghproxy.com/https://raw.githubusercontent.com', '韩国', ''], |
62 | | - ['https://fastly.jsdelivr.net/gh','日本 1', '注意: - 该加速源存在缓存机制(24小时),所以文件可能不是最新。 - 该加速源不支持大小超过 50 MB 的文件。 - 当前 分支名 为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], |
63 | | - ['https://cdn.staticaly.com/gh','日本 2', '注意: - 该加速是全球 Anycast CDN,国内一般分配到日本节点。'], |
64 | | - ['https://raw.fastgit.org','日本 3', '注意: - 单个文件太大时可能会提示超时(实时获取中),请重试。'], |
65 | | - ['https://cdn.jsdelivr.net/gh','美国', '注意: - 该加速源存在缓存机制(24小时),所以文件可能不是最新。 - 该加速源不支持大小超过 50 MB 的文件。 - 当前 分支名 为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], |
66 | | - ['https://gcore.jsdelivr.net/gh','香港/日本', '适合 [移动/电信] 用户,移动走香港,电信走日本。 注意: - 该加速源存在缓存机制(24小时),所以文件可能不是最新。 - 该加速源不支持大小超过 50 MB 的文件。 - 当前 分支名 为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], |
67 | | - ['https://raw.githubusercontents.com', '香港/新加坡等','该加速源有香港、新加坡、美国等服务器,并不固定。 - 该加速源不支持大小超过 1 MB 的文件。'] |
| 65 | + ['https://fastly.jsdelivr.net/gh', '日本 1', '注意: - 该加速源存在缓存机制(24小时),所以文件可能不是最新。 - 该加速源不支持大小超过 50 MB 的文件。 - 当前 分支名 为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], |
| 66 | + ['https://cdn.staticaly.com/gh', '日本 2', '注意: - 该加速是全球 Anycast CDN,国内一般分配到日本节点。'], |
| 67 | + ['https://raw.fastgit.org', '日本 3', '注意: - 单个文件太大时可能会提示超时(实时获取中),请重试。'], |
| 68 | + ['https://cdn.jsdelivr.net/gh', '美国', '注意: - 该加速源存在缓存机制(24小时),所以文件可能不是最新。 - 该加速源不支持大小超过 50 MB 的文件。 - 当前 分支名 为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], |
| 69 | + ['https://gcore.jsdelivr.net/gh', '中国香港/日本', '适合 [移动/电信] 用户,移动走香港,电信走日本。 注意: - 该加速源存在缓存机制(24小时),所以文件可能不是最新。 - 该加速源不支持大小超过 50 MB 的文件。 - 当前 分支名 为版本号格式时(如 v1.2.3),该高速下载链接因格式限制不可用。'], |
| 70 | + ['https://raw.githubusercontents.com', '中国香港/新加坡等', '该加速源有香港、新加坡、美国等服务器,并不固定。 - 该加速源不支持大小超过 1 MB 的文件。'] |
68 | 71 | ], |
69 | 72 | svg = [ |
70 | 73 | '<svg class="octicon octicon-file-zip mr-2" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>', |
|
168 | 171 | url = '', _html = ''; |
169 | 172 |
|
170 | 173 | for (let i=0;i<download_url.length;i++) { |
| 174 | + if (download_url[i][0] === 'https://github.ddlc.love/https://github.com') continue |
171 | 175 | url = download_url[i][0] + href.split(location.host)[1] |
172 | 176 | if (location.host === 'hub.fastgit.org') url = url.replace('hub.fastgit.org','github.com') |
173 | 177 | if (download_url[i][0] === 'https://download.fastgit.org' && url.indexOf('/archive/') > -1) url = url.replace('https://download.fastgit.org','https://archive.fastgit.org') |
|
223 | 227 |
|
224 | 228 | for (let i=1;i<raw_url.length;i++) { |
225 | 229 | switch(i) { |
226 | | - //case 1: |
| 230 | + //case 1: // ghproxy.fsou.cc |
227 | 231 | // url = raw_url[i][0] + href; break; |
228 | | - case 3: |
229 | | - case 6: |
230 | | - case 7: |
| 232 | + case 4: // fastly.jsdelivr.net |
| 233 | + case 7: // cdn.jsdelivr.net |
| 234 | + case 8: // gcore.jsdelivr.net |
231 | 235 | url = raw_url[i][0] + href.replace('/blob/','@'); break; |
232 | 236 | default: |
233 | 237 | url = raw_url[i][0] + href2; |
|
272 | 276 | href2 = href.replace('/blob/','/'), url, url_name, url_tip = ''; |
273 | 277 |
|
274 | 278 | switch(menu_raw_fast) { |
275 | | - //case 1: |
| 279 | + //case 1: // ghproxy.fsou.cc |
276 | 280 | // url = raw_url[menu_raw_fast][0] + href; break; |
277 | | - case 3: |
278 | | - case 6: |
279 | | - case 7: |
| 281 | + case 4: // fastly.jsdelivr.net |
| 282 | + case 7: // cdn.jsdelivr.net |
| 283 | + case 8: // gcore.jsdelivr.net |
280 | 284 | url = raw_url[menu_raw_fast][0] + href.replace('/blob/','@'); break; |
281 | 285 | default: |
282 | 286 | url = raw_url[menu_raw_fast][0] + href2; |
|
0 commit comments