Skip to content

Commit

Permalink
docs: update faq tun mode question
Browse files Browse the repository at this point in the history
  • Loading branch information
keiko233 committed Mar 13, 2024
1 parent fb8ccd9 commit e2caff3
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
34 changes: 34 additions & 0 deletions others/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,37 @@ Starting from v1.5.1, Clash Nyanpasu supports customizing the application direct
- Find `verge.yaml` (later may be renamed to `nyanpasu.yaml`) in the **App Dir**, find `app_log_level` to modify the diary level, and restart the program after saving.

> Optional diary levels include: `trace`, `debug`, `info`, `warn`, `error`, or leave blank (no log recording).
### 4. How to Enable TUN Mode?

::: info Note
TUN mode requires certain permissions.

- On Windows, run Clash Nyanpasu as an administrator to enable TUN mode.
- On macOS, click the Settings icon next to Clash Kernel on the Settings page, open kernel settings, click the small lock icon on the kernel side, enter the password for authorization, and restart the kernel.
- On Linux, similar to macOS, you can run with sudo to achieve authorization.
:::

- In the Settings page, under System Settings, enable TUN Mode.

#### Manual Authorization on macOS

- If authorization is not successful, you can manually enter the following command lines. After authorization, a restart is still required.

```bash
# clash core
sudo chown root:admin /Applications/Clash\ Nyanpasu.app/Contents/MacOS/clash
sudo chmod +sx /Applications/Clash\ Nyanpasu.app/Contents/MacOS/clash

# meta core
sudo chown root:admin /Applications/Clash\ Nyanpasu.app/Contents/MacOS/mihomo
sudo chmod +sx /Applications/Clash\ Nyanpasu.app/Contents/MacOS/mihomo

# meta alpha core
sudo chown root:admin /Applications/Clash\ Nyanpasu.app/Contents/MacOS/mihomo-alpha
sudo chmod +sx /Applications/Clash\ Nyanpasu.app/Contents/MacOS/mihomo-alpha

# clash rust core
sudo chown root:admin /Applications/Clash\ Nyanpasu.app/Contents/MacOS/clash-rs
sudo chmod +sx /Applications/Clash\ Nyanpasu.app/Contents/MacOS/clash-rs
```
34 changes: 34 additions & 0 deletions zh-CN/others/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,37 @@ sudo xattr -r -d com.apple.quarantine /Applications/Clash\ Nyanpasu.app
-**应用目录** 下找到 `verge.yaml`(之后可能更名为 `nyanpasu.yaml`),找到 `app_log_level` 修改日记等级,保存后需要重启程序。

> 可选的日记级别有:`trace``debug``info``warn``error`、留空(不记录日记)。
### 4. 如何开启 TUN 模式?

::: info 提示
TUN 模式需要一定的权限

- 在 Windows 系统下请以管理员运行 Clash Nyanpasu 才能开启。
- 在 macOS 下请点击 **设置页****Clash 内核** 旁边的 **设置图标**,打开内核设置,点击内核一侧的 **小锁图标**,输入密码后授权,重启内核即可。
- 在 Linux 下同 macOS,当然你也可以以 sudo 运行达到授权效果。
:::

-**设置页****系统设置** 选项中,打开 **TUN 模式**

#### macOS 手动授权

如果授权不成功可以手输入命令行完成,授权后同样需要重启。

```bash
# clash core
sudo chown root:admin /Applications/Clash\ Nyanpasu.app/Contents/MacOS/clash
sudo chmod +sx /Applications/Clash\ Nyanpasu.app/Contents/MacOS/clash

# meta core
sudo chown root:admin /Applications/Clash\ Nyanpasu.app/Contents/MacOS/mihomo
sudo chmod +sx /Applications/Clash\ Nyanpasu.app/Contents/MacOS/mihomo

# meta alpha core
sudo chown root:admin /Applications/Clash\ Nyanpasu.app/Contents/MacOS/mihomo-alpha
sudo chmod +sx /Applications/Clash\ Nyanpasu.app/Contents/MacOS/mihomo-alpha

# clash rust core
sudo chown root:admin /Applications/Clash\ Nyanpasu.app/Contents/MacOS/clash-rs
sudo chmod +sx /Applications/Clash\ Nyanpasu.app/Contents/MacOS/clash-rs
```

0 comments on commit e2caff3

Please sign in to comment.