Jump to content

Mihomo/zh: Difference between revisions

From NixOS Wiki
Oluceps (talk | contribs)
Created page with "=== 错误排查 ==="
Oluceps (talk | contribs)
Created page with "如果使用代理软件透明代理遇到问题,请先: 查看dmesg有无异常,省哦出现大量refuse某一网络设备的消息: * nixos 默认开启防火墙,关掉防火墙再尝试 如关掉防火墙后问题解决,依次尝试:将tun device添加到 trustedInterfaces,关掉 checkReversePath。"
Line 24: Line 24:
=== 错误排查 ===
=== 错误排查 ===


<div lang="en" dir="ltr" class="mw-content-ltr">
如果使用代理软件透明代理遇到问题,请先:
<span lang="en" dir="ltr">If encountering issues with transparent proxy:</span>
 
* <span lang="en" dir="ltr">Check kernel logs with <code>dmesg</code></span>
查看dmesg有无异常,省哦出现大量refuse某一网络设备的消息:
* <span lang="en" dir="ltr">If seeing massive "refuse" messages for specific network devices:</span>
* nixos 默认开启防火墙,关掉防火墙再尝试
** <span lang="en" dir="ltr">NixOS enables firewall by default, try disabling firewall</span>
如关掉防火墙后问题解决,依次尝试:将tun device添加到 trustedInterfaces,关掉 checkReversePath
** <span lang="en" dir="ltr">If problem is solved, try sequentially:</span>
*** <span lang="en" dir="ltr">Add tun device to <code>trustedInterfaces</code></span>
*** <span lang="en" dir="ltr">Disable <code>checkReversePath</code></span>
* <span lang="en" dir="ltr">If seeing massive "refuse" messages for specific ports:</span>
** <span lang="en" dir="ltr">Try allow the tproxy port in firewall if you're trying tproxy transparent proxy.</span>
</div>


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

Revision as of 14:55, 28 February 2025

mihomo (formerly known as clash-meta), is a widely-used anti-censorship proxy application.

在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。

See also