在 CFW 使用 TUN 或 TAP 代理 EMBY
事先准备
Clash for Windows Wintun ( TUN 必须, TAP 可以忽略)
教程主要关注启用 TUN 和 TAP , CFW 安装部分不再赘述
启用 TUN
放置 Wintun.dll
打开 Wintun 官网下载
下载得到压缩包 wintun/bin 下为各种架构的 wintun.dll,64位选择 amd 64 的 wintun.dll,否则 TUN 不会生效
点击 Open Folder 将对应 wintun.dll 放入打开的文件夹
安装 Service Mode
点击 Service Mode 右边的 Manage 点击 Install
在 Mixin 添加开启 TUN 的配置文件
虽然 TUN 可以直接在配置文件中添加来启用,但更推荐在 Mixin 中添加,启用 TUN 更灵活
点击 Settings ,向下滑动,找到 Profile Mixin ,点击 YAML 右边的 Edit
将如下代码粘贴
mixin: # object
dns:
enable: true
enhanced-mode: redir-host
nameserver:
- 1.1.1.1 # 真实请求DNS,可多设置几个
# interface-name: WLAN # 出口网卡名称,或者使用下方的自动检测
tun:
enable: true
stack: gvisor
dns-hijack:
- 198.18.0.2:53
macOS-auto-route: true
macOS-auto-detect-interface: true # 自动检测出口网卡
如图所示
注意缩进,否则不会生效
点击右下角保存按钮
最后在 General 中启用 Mixin 即可启用 TUN
此时将光标移至右下角网络图标处,会多出一个 Clash,则证明 TUN 开启成功
启用 TAP
由于 TAP 模式性能不佳(相对 TUN 模式),且不支持 PROCESS-NAME ,所以不做详细描述,了解即可
点击 TAP Device 的 Manage,点击 Install,安装 TAP 网卡
同样在 Mixin 添加开启 TAP 的配置文件
mixin: # object
dns:
enable: true
enhanced-mode: fake-ip # 或 redir-host
listen: 0.0.0.0:53
nameserver:
- 223.5.5.5
此时在 General 中启用 Mixin 即可启用 TAP
在 CFW 使用 TUN 或 TAP 代理 EMBYLast updated
Was this helpful?