OpenWrt-nikki
OpenWrt-nikki copied to clipboard
Transparent Proxy with Mihomo on OpenWrt.
MihomoTProxy
Transparent Proxy with Mihomo on OpenWrt.
Prerequisites
- OpenWrt >= 23.05
- 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)
- Add Feed
# only needs to be run once
curl -s -L https://github.com/morytyann/OpenWrt-mihomo/raw/refs/heads/main/feed.sh | ash
- Install
# you can install from shell or `Software` menu in LuCI
# for opkg
opkg install mihomo
opkg install luci-app-mihomo
opkg install luci-i18n-mihomo-zh-cn
# for apk
apk add --allow-untrusted mihomo
apk add --allow-untrusted luci-app-mihomo
apk add --allow-untrusted luci-i18n-mihomo-zh-cn
B. Install From Release
curl -s -L https://github.com/morytyann/OpenWrt-mihomo/raw/refs/heads/main/install.sh | ash
Uninstall & Reset
curl -s -L https://github.com/morytyann/OpenWrt-mihomo/raw/refs/heads/main/uninstall.sh | ash
How To Use
See Wiki
How does it work
- Mixin and Update profile.
- Run mihomo.
- Run hijack prepare script.
- Set router hijack.
- Set lan hijack with access control.
- 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/apk 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