754

clash for windows允许局域网连接,TAP和TUN模式

 2 years ago
source link: https://www.mihu.live/archives/208/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

clash for windows(简称cfw)是一款非常好用的代理软件,这里介绍一下它的两个不常用但很好用的功能。
下载地址:https://github.com/Fndroid/clash_for_windows_pkg/releases
参考:
1.https://docs.cfw.lbyczf.com
2.https://matters.news/@zhangdou/clash-for-windows%E4%B8%AD%E5%90%AF%E7%94%A8tap%E6%A8%A1%E5%BC%8F%E7%9A%84%E6%96%B9%E6%B3%95-bafyreid7mavpmacoelzi523ucwtycnci7cddukad3ijn7kmal2d4q7c4ri

允许局域网连接

此功能可以共享网络环境给同一局域网的其他设备。这里要注意的是(以一台电脑和一部手机为例),手机和电脑都连接同一个wifi,而不是手机连接电脑开的热点。

  1. 打开电脑cfw的Allow LAN开关,然后鼠标悬浮在上这个选项上,底部会显示IP地址。
  2. 手机打开连接的wifi设置——高级设置——代理服务器选择手动——代理主机名填刚才显示的IP,代理端服务器端口7890——保存

之后手机就可以拥有科学上网环境了。
Allow LAN
手机设置

非系统代理应用上网

浏览器之类的应用都是使用系统代理的,一些非系统代理应用,可以通过设置被cfw接管。
目前有两种模式,TAP模式和TUN模式,更推荐使用TUN模式(下面是windows系统方法,mac参考https://docs.cfw.lbyczf.com)。

TUN模式

从V0.17.2开始,安装时会自动装wintun.dll,不需要再自己装了
进入网站https://www.wintun.net,点击界面中Download Wintun xxx下载压缩包,根据系统版本将对应目录中wintun.dll(Windows10一般都选amd64)复制至cfw的Home Directory目录中(General页面的Home Directory点击就可以打开)
1.点击General中Service Mode右边Manage,在打开窗口中安装服务模式,安装完成应用会自动重启,Service Mode右边地球图标变为绿色(点击manage会出现Current status:Active)即安装成功
点击settings——Profile Mixin——YAML,点击edit,输入下面的内容,点击保存
2.作者在v0.19.0版本后在主页面加入了TUN手动配置页面(TUN Mode),可以手动配置项目(如下图),保存后打开TUN Mode开关
TUN模式配置
TUN模式

TAP模式

  1. 点击General页面中TAP Device选项的Manage按钮,在弹出对话框中选择Install将会安装 TAP 网卡,此网卡用于接管系统流量,安装完成可在系统网络连接中看到名为cfw-tap的网卡
  2. 启动 TAP 模式:点击settings——Profile Mixin——YAML,点击edit,输入下面的内容,点击保存
  3. 返回general页面开启Mixin即可
mixin: 
  dns:
    enable: true    
    enhanced-mode: redir-host
    listen: :53
    nameserver: 
      - https://doh.dns.sb/dns-query
      - https://dns.adguard.com/dns-query
      - https://cdn-doh.ssnm.xyz/dns-query
      - 119.29.29.29 #腾讯
      - 223.5.5.5 #阿里

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK