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。

更多参考