Mihomo/zh
Appearance
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.
错误排查
If encountering issues with transparent proxy:
- Check kernel logs with
dmesg
- If seeing massive "refuse" messages for specific network devices:
- NixOS enables firewall by default, try disabling firewall
- If problem is solved, try sequentially:
- Add tun device to
trustedInterfaces
- Disable
checkReversePath
- Add tun device to
- If seeing massive "refuse" messages for specific ports:
- Try allow the tproxy port in firewall if you're trying tproxy transparent proxy.