How to Turn On TUN Mode in Clash For Windows (CFW)

There is a new type of application in Windows 10 that cannot be easily proxied, called UWP, which UWP Loopback can solve this problem. In addition, if people need computers proxied in a more efficient way, they are recommended to turn on the TUN MODE.

Unfortunately, I encountered a problem that my computer cannnot run TUN MODE smoothly so I decided to search for a solution, trying different ways but they did not work. Most of them were badly disrupting my network which brought about malfunctions of video meetings such as Skype and Zoom.

Finally I had to give up before inccidently finding out a really working method for me, and I reposted it. Here is what I found.

  1. Visit: https://www.wintun.net and then click Download Wintun XXX to download its ZIP. Checking the bit of your PC, if you have a 64-bit PC, then copy the DLL under amd64 folder. Select the right wintun.dll file and copy it to Home Directory, to which you can access through Clash For Windows dashboard.
  2. Open dashboard in Clash For Windows and find Service Mode in General. Click Manage and install Service Mode. Wait for the software installing the mode and rebooting, then check the Earth icon turned green, which means Service Mode is successfully installed. (If you fail installing, then check the Step 5)
  3. Find Setting in dashboard and find Profile Mixin. Click Edit behind YAML. Type the following codes:
    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
    mixin: 
    hosts:
    'mtalk.google.com': 108.177.125.188
    'services.googleapis.cn': 74.125.203.94
    'raw.githubusercontent.com': 151.101.76.133
    dns:
    enable: true
    default-nameserver:
    - 223.5.5.5
    - 1.0.0.1
    ipv6: false
    enhanced-mode: redir-host # Mode: 'redir-host' or 'fake-ip'. redir-host required in TUN MODE and recommended in both modes
    nameserver:
    - https://dns.rubyfish.cn/dns-query
    - https://223.5.5.5/dns-query
    - https://dns.pub/dns-query
    - 1.1.1.1 # Cloudflare
    - 8.8.4.4 # GoogleDNS
    - 8.8.8.8 # GoogleDNS
    - 185.222.222.222 # DNS.sb
    - 185.184.222.222 # DNS.sb
    - 223.5.5.5 # AliDNS
    - 180.76.76.76 # Baidu DNS
    - 119.29.29.29 # Tencent DNS
    - 117.50.11.11 # ONE DNS Ver. Blocking Ads
    - 117.50.10.10 # ONE DNS Ver. Pure Results
    - 114.114.114.114 # 114DNS
    - https://dns.alidns.com/dns-query # Ali DoH DNS
    - https://doh.360.cn/dns-query # 360 DoH DNS
    fallback:
    - https://1.0.0.1/dns-query
    - https://public.dns.iij.jp/dns-query
    - https://dns.twnic.tw/dns-query
    fallback-filter:
    geoip: true
    ipcidr:
    - 240.0.0.0/4
    - 0.0.0.0/32
    - 127.0.0.1/32
    domain:
    - +.google.com
    - +.facebook.com
    - +.twitter.com
    - +.youtube.com
    - +.xn--ngstr-lra8j.com
    - +.google.cn
    - +.googleapis.cn
    - +.gvt1.com
    tun:
    enable: true
    stack: system # The core 'Clash Premium 2021.05.08' or newer required. If not, please use 'gvisor'. Check your CFW version!
    dns-hijack:
    - 198.18.0.2:53
    auto-route: true
    auto-detect-interface: true
    and then save it.
  4. In General you should turn on Mixin. It will work. (End)
  5. (If Step 2 fails, then see here.) Open Home Directory folder and access to C:\Users\yourusername\.config\clash\service. Open cmd with administrator permission.
  6. Type the code:
    1
    service install clash-core-service.exe
    and Enter, then waiting for installation completed.
  7. Save and close all applications, and then reboot your PC.
  8. And this is the same. Find Setting in dashboard and find Profile Mixin. Click Edit behind YAML. Type the following codes:
    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
    mixin: 
    hosts:
    'mtalk.google.com': 108.177.125.188
    'services.googleapis.cn': 74.125.203.94
    'raw.githubusercontent.com': 151.101.76.133
    dns:
    enable: true
    default-nameserver:
    - 223.5.5.5
    - 1.0.0.1
    ipv6: false
    enhanced-mode: redir-host # Mode: 'redir-host' or 'fake-ip'. redir-host required in TUN MODE and recommended in both modes
    nameserver:
    - https://dns.rubyfish.cn/dns-query
    - https://223.5.5.5/dns-query
    - https://dns.pub/dns-query
    - 1.1.1.1 # Cloudflare
    - 8.8.4.4 # GoogleDNS
    - 8.8.8.8 # GoogleDNS
    - 185.222.222.222 # DNS.sb
    - 185.184.222.222 # DNS.sb
    - 223.5.5.5 # AliDNS
    - 180.76.76.76 # Baidu DNS
    - 119.29.29.29 # Tencent DNS
    - 117.50.11.11 # ONE DNS Ver. Blocking Ads
    - 117.50.10.10 # ONE DNS Ver. Pure Results
    - 114.114.114.114 # 114DNS
    - https://dns.alidns.com/dns-query # Ali DoH DNS
    - https://doh.360.cn/dns-query # 360 DoH DNS
    fallback:
    - https://1.0.0.1/dns-query
    - https://public.dns.iij.jp/dns-query
    - https://dns.twnic.tw/dns-query
    fallback-filter:
    geoip: true
    ipcidr:
    - 240.0.0.0/4
    - 0.0.0.0/32
    - 127.0.0.1/32
    domain:
    - +.google.com
    - +.facebook.com
    - +.twitter.com
    - +.youtube.com
    - +.xn--ngstr-lra8j.com
    - +.google.cn
    - +.googleapis.cn
    - +.gvt1.com
    tun:
    enable: true
    stack: system # The core 'Clash Premium 2021.05.08' or newer required. If not, please use 'gvisor'. Check your CFW version!
    dns-hijack:
    - 198.18.0.2:53
    auto-route: true
    auto-detect-interface: true
    remember save it before closing the window!
  9. Check it over and enjoy!

NOTICE

Reposted and adapted from EdNovas小站

Reference