Skip to content

blueveryday/OpenWrt-mihomo

 
 

Repository files navigation

GitHub License GitHub Tag GitHub Downloads (all assets, all releases) GitHub Repo stars Telegram

MihomoTProxy

Transparent Proxy with Mihomo on OpenWrt.

Prerequisites

  • OpenWrt >= 22.03
  • Linux Kernel >= 5.10
  • firewall4

Feature

  • Transparent Proxy (TPROXY/TUN, IPv4 and/or IPv6)
  • Access Control
  • Profile Mixin
  • Profile Editor
  • Scheduled Restart

Install & Update

A. Install From Feed (Recommended)

  1. Add Feed
# only needs to be run once
curl -s -L https://mirror.ghproxy.com/https://github.com/morytyann/OpenWrt-mihomo/raw/refs/heads/main/feed.sh | ash
  1. Install
# you can install from shell or `Software` menu in LuCI
opkg install mihomo
opkg install luci-app-mihomo
opkg install luci-i18n-mihomo-zh-cn

B. Install From Release

curl -s -L https://mirror.ghproxy.com/https://github.com/morytyann/OpenWrt-mihomo/raw/refs/heads/main/install.sh | ash

Uninstall & Reset

curl -s -L https://mirror.ghproxy.com/https://github.com/morytyann/OpenWrt-mihomo/raw/refs/heads/main/uninstall.sh | ash

How To Use

See Wiki

How does it work

  1. Mixin and Update profile.
  2. Run mihomo.
  3. Run hijack prepare script.
  4. Set router hijack.
  5. Set lan hijack with access control.
  6. Set scheduled restart.

Note that the steps above may change base on config.

Compilation

# add feed
echo "src-git mihomo https://github.com/morytyann/OpenWrt-mihomo.git;main" >> "feeds.conf.default"
# update & install feeds
./scripts/feeds update -a
./scripts/feeds install -a
# make package
make package/luci-app-mihomo/compile

The ipk file will be found under bin/packages/your_architecture/mihomo.

Dependencies

  • ca-bundle
  • curl
  • yq
  • firewall4
  • ip-full
  • kmod-inet-diag
  • kmod-nft-tproxy
  • kmod-tun

About

Transparent Proxy with Mihomo on OpenWrt.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 49.1%
  • JavaScript 45.3%
  • Makefile 5.6%