Jump to content

Mihomo/zh: Difference between revisions

From Official NixOS Wiki
Weijia (talk | contribs)
No edit summary
Weijia (talk | contribs)
No edit summary
Line 13: Line 13:


<span id="TUN_Mode"></span>
<span id="TUN_Mode"></span>
<div class="mw-translate-fuzzy">
=== TUN 模式 ===
=== TUN模式 ===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">

Revision as of 16:26, 28 August 2025

mihomo(原名clash-meta)是廣泛使用的反審查代理工具。

在 NixOS 上啟用 mihomo 服務:

services.mihomo = {
  enable = true;
  configFile = "/path/to/config.yaml";
  #...
};

TUN 模式

NOTICE: The tunMode option in NixOS module only grants necessary permissions for the service. To actually enable TUN, you need to edit the configFile. See official documentation.

錯誤排查

如果使用代理軟體透明代理遇到問題,請先:

查看dmesg有無異常,省哦出現大量refuse某一網絡設備的消息:

  • nixos 默認開啟防火牆,關掉防火牆再嘗試

如關掉防火牆後問題解決,依次嘗試:將tun device添加到 trustedInterfaces,關掉 checkReversePath。

更多參考