-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
120 lines (118 loc) · 6.34 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GitHub 加速服务</title>
<link rel="icon" href="favicon.ico">
<link href="https://gcore.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body {
background-color: #f8f9fa;
}
.header {
background-color: #343a40;
color: white;
padding: 60px 0;
text-align: center;
}
.header h1 {
margin: 0;
font-size: 2.5em;
}
.header p {
margin: 5px 0 0;
}
.form-container {
margin-top: 30px;
text-align: center;
}
.form-container input, .form-container button {
height: 46px;
}
.form-container input {
width: 60%;
margin-right: 10px;
border: 2px solid #454d55;
border-radius: 5px;
padding: 10px;
background-color: #454d55;
color: white;
}
.form-container input:focus {
background-color: #454d55;
color: white;
border: 2px solid #343a40;
box-shadow: none;
}
.form-container input::placeholder {
color: #d3d3d3;
}
.form-container button {
width: 15%;
background-color: #e9ecef;
border-color: #e9ecef;
color: #212529;
border-radius: 5px;
padding: 10px;
}
.form-container button:hover {
background-color: #495057;
border-color: #495057;
}
.tutorial {
background-color: white;
padding: 20px;
border-radius: 10px;
margin-top: 30px;
}
.tutorial h2 {
margin-top: 0;
}
.tutorial pre {
background-color: #e9ecef;
padding: 10px;
border-radius: 5px;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.getElementById('github-form').addEventListener('submit', function(e) {
e.preventDefault();
var githubUrl = document.getElementById('github-url').value;
window.open(location.href.substr(0, location.href.lastIndexOf('/') + 1) + githubUrl);
});
});
</script>
</head>
<body>
<div class="header">
<svg t="1721905078805" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4242" width="128" height="128"><path d="M498.894518 100.608396c-211.824383 0-409.482115 189.041494-409.482115 422.192601 0 186.567139 127.312594 344.783581 295.065226 400.602887 21.13025 3.916193 32.039717-9.17701 32.039717-20.307512 0-10.101055 1.176802-43.343157 1.019213-78.596056-117.448946 25.564235-141.394311-49.835012-141.394311-49.835012-19.225877-48.805566-46.503127-61.793368-46.503127-61.793368-38.293141-26.233478 3.13848-25.611308 3.13848-25.611308 42.361807 2.933819 64.779376 43.443441 64.779376 43.443441 37.669948 64.574714 98.842169 45.865607 122.912377 35.094286 3.815909-27.262924 14.764262-45.918819 26.823925-56.431244-93.796246-10.665921-192.323237-46.90017-192.323237-208.673623 0-46.071292 16.498766-83.747379 43.449581-113.332185-4.379751-10.665921-18.805298-53.544497 4.076852-111.732757 0 0 35.46063-11.336186 116.16265 43.296085 33.653471-9.330506 69.783343-14.022365 105.654318-14.174837 35.869952 0.153496 72.046896 4.844332 105.753579 14.174837 80.606853-54.631248 116.00813-43.296085 116.00813-43.296085 22.935362 58.18826 8.559956 101.120049 4.180206 111.732757 27.052123 29.584806 43.443441 67.260893 43.443441 113.332185 0 162.137751-98.798167 197.850114-192.799074 208.262254 15.151072 13.088086 28.65155 38.804794 28.65155 78.17957 0 56.484456-0.459464 101.94381-0.459464 115.854635 0 11.235902 7.573489 24.381293 29.014824 20.2543C825.753867 867.330798 933.822165 709.10924 933.822165 522.700713c0-233.155201-224.12657-422.192601-434.927647-422.192601L498.894518 100.608396z" fill="#ffffff" p-id="4243"></path></svg>
<h1>GitHub 加速服务</h1>
<p>对releases,archive,gist,raw等文件代理加速下载服务。</p>
<div class="container form-container">
<form id="github-form" class="d-flex justify-content-center">
<input type="text" id="github-url" class="form-control me-2" placeholder="输入 GitHub 文件链接" required pattern="^((https|http):\/\/)?(github\.com\/.+?\/.+?\/(releases|archive|blob|raw|info|git-|tags)|raw\.(githubusercontent|github)\.com\/.+?\/.+?\/.+?\/.+|gist\.(githubusercontent|github)\.com\/.+?\/.+?\/.+|github\.com\/.+?\/.+?\.git)\/?.*$">
<button type="submit" class="btn btn-primary">下载</button>
</form>
</div>
</div>
<div class="container tutorial">
<h2>使用说明</h2>
<p>支持终端命令行 <code>git clone</code> <code>wget</code> <code>curl</code> 等工具下载。</p>
<p>支持 <code>raw.githubusercontent.com</code> <code>gist.github.com</code> <code>gist.githubusercontent.com</code> 文件下载。</p>
<p>注意:不支持 SSH Key 方式 <code>git clone</code> 下载。</p>
<h4>git clone</h4>
<pre><code>git clone https://gh.suki.icu/https://github.com/nginx/nginx.git</code></pre>
<h4>git clone 私有仓库</h4>
<p>Clone 私有仓库需要用户在 Personal access tokens 申请 Token 配合使用。</p>
<pre><code>git clone https://user:[email protected]/https://github.com/your_name/your_private_repo</code></pre>
<h4>wget & curl</h4>
<pre><code>wget https://gh.suki.icu/https://github.com/nginx/nginx/archive/refs/heads/master.zip
curl -O https://gh.suki.icu/https://raw.githubusercontent.com/nginx/agent/main/README.md</code></pre>
</div>
<script src="https://gcore.jsdelivr.net/npm/[email protected]/jquery.min.js"></script>
<script src="https://gcore.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://gcore.jsdelivr.net/npm/bootstrap/dist/js/bootstrap.min.js"></script>
</body>
</html>