-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path15962803481021.html
354 lines (222 loc) · 11.8 KB
/
15962803481021.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
OpenClash 安装和简单使用教程及常见错误解决(openwrt) - 阿道博客备份
</title>
<link href="atom.xml" rel="alternate" title="阿道博客备份" type="application/atom+xml">
<link rel="stylesheet" href="asset/css/style.min.css">
<link rel="stylesheet" href="asset/css/doc.css">
<script src="asset/app.js"></script>
</head>
<body>
<section class="hero">
<div class="hero-head">
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="container">
<div class="navbar-brand">
<a target="_self" class="navbar-item " href="index.html">Home</a>
<a target="_self" class="navbar-item " href="archives.html">Archives</a>
<a target="_self" class="navbar-item " href="about.html">关于</a>
<a role="button" id="navbarSNSRssSwitchBtn" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbarSNSRssButtons">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarSNSRssButtons" class="navbar-menu">
<div class="navbar-start">
</div>
<div class="navbar-end">
<div class="navbar-item">
<!--buttons start-->
<div class="buttons">
<a href="atom.xml" target="_blank" title="RSS">
<span class="icon is-large has-text-black-bis">
<svg class="svg-inline--fa fa-rss fa-w-14 fa-lg" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="rss" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 448 512" data-fa-i2svg=""><path fill="currentColor" d="M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"></path></svg><!-- <i class="fas fa-rss fa-lg"></i> -->
</span>
</a>
</div>
<!--buttons end-->
</div>
</div>
</div>
</div>
</nav>
</div>
<div class="hero-body ct-body"></div>
</section>
<section class="ct-body">
<div class="container">
<div class="columns is-variable bd-klmn-columns is-4 is-centered">
<div class="column is-four-fifths">
<div class="post-body single-content">
<div class="card-image">
<figure class="image">
<img src="media/15941064627437/默认文件1601359572043.png">
</figure>
</div>
<h1 class="title">
OpenClash 安装和简单使用教程及常见错误解决(openwrt)
</h1>
<div class="media">
<figure class="media-left">
<p class="image is-48x48">
<img class="is-rounded" src="">
</p>
</figure>
<div class="media-content">
<div class="content">
<p>
<span class="date">2020/09/29</span>
<span class="tran-posted-in">posted in</span>
<span class="posted-in"><a href='%E8%BD%AF%E4%BB%B6.html'>软件</a></span>
<span class="posted-in"><a href='%E7%A1%AC%E4%BB%B6.html'>硬件</a></span>
<a href="https://backup.adao.me/15962803481021.html#disqus_thread"><span class="tran-disqus-comments">comments</span></a>
<br />
<span class="tran-tags">Tags:</span>
</p>
</div>
</div>
</div>
</div>
<article class="markdown-body single-content">
<h2 id="toc_0">项目介绍</h2>
<ul>
<li>项目地址:<a href="https://github.com/vernesong/OpenClash">OpenClash</a></li>
<li>官方文档:<a href="https://github.com/vernesong/OpenClash/wiki">wiki</a></li>
<li>Clash内核:<a href="https://github.com/vernesong/OpenClash/releases/tag/Clash">Clash</a></li>
<li>TUN模式内核:<a href="https://github.com/vernesong/OpenClash/releases/tag/TUN-Premium">clash_tun</a></li>
<li>TUN游戏模式内核:<a href="https://github.com/vernesong/OpenClash/releases/tag/TUN">clash_game</a></li>
<li>历史版本下载:<a href="https://github.com/vernesong/OpenClash/releases">下载</a></li>
</ul>
<h2 id="toc_1">安装</h2>
<h3 id="toc_2">安装环境</h3>
<ul>
<li>架构:MediaTek MT7621 </li>
<li>固件版本:OpenWrt R20.8.27 / LuCI Master (git-20.223.26773-d18ef13)</li>
<li>内核版本:5.4.59</li>
</ul>
<h3 id="toc_3">进入后台</h3>
<p>通过终端行进入</p>
<pre><code class="language-text">ssh [email protected]
</code></pre>
<p>如果不能正常登录,请检查密码是否正确或者后台ssh登录是否开启</p>
<h3 id="toc_4">依赖安装</h3>
<ol>
<li>更新</li>
</ol>
<pre><code class="language-text">opkg update
</code></pre>
<p>如更新错误,请检查系统-软件包-配置内地址是否可用<br/>
小娱路由器软件源(MT7621)</p>
<pre><code class="language-text">src/gz openwrt_core https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/packages/
src/gz openwrt_base https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/base/
src/gz openwrt_luci https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/luci/
src/gz openwrt_packages https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/packages
src/gz openwrt_routing https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/routing
src/gz openwrt_telephony https://downloads.openwrt.org/snapshots/packages/mipsel_24kc/telephony
</code></pre>
<p>2.安装依赖<br/>
coreutils-nohup, bash, iptables, dnsmasq-full, curl, jsonfilter, ca-certificates, ipset, ip-full, iptables-mod-tproxy</p>
<p>按顺序安装以上依赖,每个依赖单独安装</p>
<p>无法安装 kmod-tun(显示内核版本不匹配)<br/>
强制安装</p>
<pre><code class="language-text">opkg install kmod-tun --force-depends
</code></pre>
<p>同样问题都可以使用以上方法解决</p>
<p>报错:opkg_conf_load: Could not lock /var/lock/opkg.lock: Resource temporarily unavailable.</p>
<pre><code class="language-text">rm -f /var/lock/opkg.lock
</code></pre>
<p>确认依赖安装成功后可进行后续的操作</p>
<h2 id="toc_5">主程序安装</h2>
<ol>
<li>进入tmp目录</li>
</ol>
<pre><code class="language-text">cd /tmp/tmp/
</code></pre>
<ol>
<li>下载及安装ipk(目前最新版本0.40.6)</li>
</ol>
<pre><code class="language-text">wget https://github.com/vernesong/OpenClash/releases/download/v0.40.6-beta/luci-app-openclash_0.40.6-beta_all.ipk
opkg install luci-app-openclash_0.40.6-beta_all.ipk
</code></pre>
<p>注意软件名根据下载版本更改</p>
<h2 id="toc_6">内核下载</h2>
<ol>
<li><p>进入到内核目录(根据自己的硬件选择)</p></li>
</ol>
<ul>
<li>clash内核</li>
</ul>
<pre><code class="language-text">cd /etc/openclash/core/
wget https://github.com/vernesong/OpenClash/releases/download/Clash/clash-linux-mipsle-softfloat.tar.gz
tar -zxvf clash-linux-mipsle-softfloat.tar.gz
chmod 777 clash
</code></pre>
<p>其他内核方法一致</p>
<p>安装完毕</p>
<h2 id="toc_7">配置设置</h2>
<h3 id="toc_8">模式设置</h3>
<p>推荐Fake-IP模式</p>
<h3 id="toc_9">常规设置</h3>
<ul>
<li>内核编译版本:linux-mipsle-softfloat<br/>
### DNS设置</li>
<li>本地DNS:启用</li>
<li>自定义上游DNS服务器:启用</li>
<li>勾选以下DNS
<img src="media/15962803481021/16013588803794.jpg" alt="" style="width:982px;"/></li>
</ul>
<h3 id="toc_10">规则设置</h3>
<p><img src="media/15962803481021/16013589558909.jpg" alt="" style="width:852px;"/></p>
<h3 id="toc_11">第三方规则订阅</h3>
<p><img src="media/15962803481021/16013589944993.jpg" alt="" style="width:422px;"/></p>
<h3 id="toc_12">服务器与策略组</h3>
<p><img src="media/15962803481021/16013590866630.jpg" alt="" style="width:839px;"/></p>
<h3 id="toc_13">上传配置文件</h3>
<p>自行研究</p>
<p>保存配置并应用</p>
<h2 id="toc_14">启动成功</h2>
<p><img src="media/15962803481021/16013592605139.jpg" alt="" style="width:980px;"/></p>
<p><img src="media/15962803481021/%E9%BB%98%E8%AE%A4%E6%96%87%E4%BB%B61601359572043.png" alt="默认文件1601359572043"/></p>
</article>
<div class="comments-wrap">
<div class="share-comments">
<div id="disqus_thread"></div>
</div>
</div><!-- end comments wrap -->
</div>
</div><!-- end columns -->
</div><!-- end container -->
</section>
<footer class="footer">
<div class="content has-text-centered">
<p>
Copyright © 2020 adao.me
</p>
</div>
</footer>
<script src="asset/prism.js"></script>
<script type="text/javascript">
var disqus_shortname = 'adao';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<script type="text/javascript">
var disqus_shortname = 'adao';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
</body>
</html>