SagerNet / SagerNet/sing-tun

TUN cannot be enabled

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
237
Forks
228
PR merge metrics
No merged PRs in 30d

Description

Reproduction
  1. Registry Editor HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache Change “Start” to 4
  2. Restart the computer
    Open Throne → TUN mode
  3. Connection failed: TUN unavailable


Because I need the hosts file to block ads.

Download hosts1, rename it to hosts, and copy it to C:\Windows\System32\drivers\etc

Since the hosts file exceeds 3MB, starting the computer, opening the browser, or changing proxy circuits can cause your computer to have no network for over 10 minutes.

To resolve this issue, it is necessary to disable Dnscache. However, this will lead to TUN activation failures.

Please refer to the 1.1.1.1 WARP client. It allows the use of TUN (creating a network adapter) even when Dnscache is disabled.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing this on Windows with Dnscache set to Start=4, then enable TUN mode and observe the failure. The issue names no source files or tests, so trace the TUN initialization entry point and compare the behavior with the referenced WARP client. Done means TUN can create its network adapter while Dnscache remains disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.