本期视频详细介绍了在RB5009中通过container安装clash的过程,一看就会,能帮你省掉一台openwrt旁路由,借助5009的强悍性能,翻墙速度非常快;
1.开启container功能,ros路由器升级原则 1:01
2.格式化u盘 4:43
3.配置虚拟网卡 5:29
4.配置挂载mounts 7:16
5.安装clash 8:47
6.设置clash配置文件 11:37
7.使用clash代理服务 20:11
1、开启container功能并安装扩展包、物理按键激活
/system/device-mode/update container=yes
2、配置U盘
把u盘插入5009的U盘口,winbox里,在system的disks下, 格式化U盘为ext4文件格式, u盘名称改为disk1,便于后面复制脚本快速构建;
3、设置虚拟网卡
到interfaces 的 veth里创建一个当前网段下的虚拟网卡,填写网关和网址
4、配置挂载
/container/mounts add name=clash-config src=disk1/clash-config/ dst=/etc/clash/
5、下载和安装clash-docker
从ros里拉取镜像容易失败,推荐通过电脑(arm64)先拉取clash的镜像文件再安装,镜像地址 hub.docker.com/r/tinyserve/cl...
或者到电报群获取clash镜像文件 t.me/+vGsnbiF_VNYyZWNl
通过winbox拖拽方式上传clash镜像文件,配置网口、挂载和安装目录。
6、设置clash的配置文件
准备一个ftp工具,用来编辑并更新clash的配置文件
到这里下载ftp工具,winscp.net/eng/download.php
下载window下的clash客户端,用来获取里面的代理配置thirdislandchain.com/download...
用下面一段脚本作为头部文件,与从clash客户端里获取的代理配置合并为一个文件,ip地址根据自己内网段替换
mixed-port: 7890
interface-name: eth0
bind-address: '192.168.2.3'
allow-lan: true
mode: rule
log-level: info
external-ui: ui
external-controller: '192.168.2.3:9090'
tun:
enable: true
stack: system
dns-hijack:
- any:53
- tcp://any:53
dns:
enable: true
ipv6: false
listen: ':53'
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
default-nameserver:
- 114.114.114.114
- 223.5.5.5
- 223.6.6.6
- 8.8.8.8
- 1.0.0.1
fake-ip-filter:
- '*.lan'
nameserver:
- 223.6.6.6/dns-query
- rubyfish.cn/dns-query
- dns.pub/dns-query
- dns.alidns.com/dns-query
- tls://dns.alidns.com:853
7、通过192.168.2.3:9090/ui/访问clash控制台,记得在设置里把Allow LAN开了。电脑端,在设置代理服务器地址为192.168.2.3
好了,恭喜你,大功告成。
10 июл 2024