Jump to content

Mihomo/zh: Difference between revisions

From NixOS Wiki
Oluceps (talk | contribs)
Created page with "(原名clash-meta)是广泛使用的反审查代理工具。"
FuzzyBot (talk | contribs)
Updating to match new version of source page
Line 1: Line 1:
<languages/>
<languages/>
<div class="mw-translate-fuzzy">
(原名clash-meta)是广泛使用的反审查代理工具。
(原名clash-meta)是广泛使用的反审查代理工具。
</div>


<div class="mw-translate-fuzzy">
在NixOS上启用mihomo服务:
在NixOS上启用mihomo服务:
</div>


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 13: Line 17:


<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">
<span lang="en" dir="ltr">NOTICE: The [https://search.nixos.org/options?channel=unstable&show=services.mihomo.tunMode&from=0&size=50&sort=relevance&type=packages&query=mihomo tunMode option] in NixOS module only grants necessary permissions for the service. To actually enable TUN, you need to edit the '''configFile'''. See [https://wiki.metacubex.one/config/inbound/listeners/tun/?h=tun official documentation].</span>
NOTICE: The [https://search.nixos.org/options?channel=unstable&show=services.mihomo.tunMode&from=0&size=50&sort=relevance&type=packages&query=mihomo tunMode option] in NixOS module only grants necessary permissions for the service. To actually enable TUN, you need to edit the '''configFile'''. See [https://wiki.metacubex.one/config/inbound/listeners/tun/?h=tun official documentation].
</div>
</div>


<span id="Troubleshooting"></span>
<span id="Troubleshooting"></span>
<div class="mw-translate-fuzzy">
=== 错误排查 ===
=== 错误排查 ===
</div>


<div class="mw-translate-fuzzy">
如果使用代理软件透明代理遇到问题,请先:
如果使用代理软件透明代理遇到问题,请先:


Line 27: Line 36:
* nixos 默认开启防火墙,关掉防火墙再尝试
* nixos 默认开启防火墙,关掉防火墙再尝试
如关掉防火墙后问题解决,依次尝试:将tun device添加到 trustedInterfaces,关掉 checkReversePath。
如关掉防火墙后问题解决,依次尝试:将tun device添加到 trustedInterfaces,关掉 checkReversePath。
</div>


<span id="See_also"></span>
<span id="See_also"></span>
<div class="mw-translate-fuzzy">
=== 更多参考 ===
=== 更多参考 ===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
* [https://blog.nyaw.xyz/nixos-inwall-install <span lang="en" dir="ltr">NixOS installation and usage under a censored network (zh-cn)</span>]
* [https://blog.nyaw.xyz/nixos-inwall-install NixOS installation and usage under a censored network (zh-cn)]
</div>
</div>
[[Category:Applications]]
[[Category:Networking]]

Revision as of 16:22, 28 August 2025

(原名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。

更多参考