mihomo-kit/router/profile.env.example
2026-10-25 20:01:07 +03:00

77 lines
3.5 KiB
Plaintext

# mihomo-kit profile. On the router:
# /etc/nikki/profiles.d/common.env shared part (secrets: subscriptions, BOOT)
# /etc/nikki/profiles.d/<name>.env per profile, overrides common.env
# e.g. main.env = "LOCATION=main", whitelist.env = "LOCATION=whitelist".
# Then: mihomo-kit.sh build && mihomo-kit.sh use main
# chmod 600: this file holds secrets.
# router | mobile (mobile: no torrent/OpenVPN/Tailscale, FlClash-style DNS)
TARGET=router
# main: normal use (home in Russia or abroad), OpenVPN/Tailscale/own servers go direct;
# whitelist: OpenVPN through OVPN-EXIT (RU node), own servers through MY-EXIT, Tailscale through MY;
# foreign (abroad): ru-inside and .ru through RU, the rest direct, OpenVPN through OVPN-EXIT
LOCATION=main
# subscription URLs, space separated. Provider name = id from the domain
# (https://sub.kittyvpn.com/x -> kittyvpn; repeats -> kittyvpn2), or "name=url"
SUBS="https://sub.example.com/sub/xxxx"
# per subscription, ID = its id in upper case (- -> _), all optional:
#SUB_EXAMPLE_PROXY=DIRECT # fetch through: BOOT (default with BOOT=1) | DIRECT | FOREIGN | any proxy/group | none
#SUB_EXAMPLE_UA="v2rayN/9.99" # User-Agent, default mihomo (with HWID: HWID_UA)
#SUB_EXAMPLE_HWID=1 # send the HWID_* headers below (device-limited subscriptions)
#SUB_EXAMPLE_HEADERS="x-foo=bar; x-baz=two words" # any extra headers
# (old index keys SUB0_*, SUB1_* ... still work)
# HWID headers, shared by all subscriptions with SUB_<ID>_HWID=1
#HWID_UA="v2rayN/9.99"
#HWID_OS=OpenWrt # x-device-os
#HWID_OS_VER=24.10.3 # x-ver-os
#HWID_MODEL="Huasifei WH3000 Pro" # x-device-model
#HWID_ID=xxxxxxxxxxxxxxxx # x-hwid: keep the one the provider already knows
# BOOT: whitelisted vless reality node used to download the subscriptions
BOOT=1
BOOT_SERVER=1.2.3.4
BOOT_PORT=443
BOOT_UUID=00000000-0000-0000-0000-000000000000
BOOT_SNI=eh.vk.ru
BOOT_PBK=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BOOT_SID=xxxxxxxxxxxxxxxx
# torrent group for clients using source ports 20000-20199
TORRENT=1
# own lists, space separated, above torrents / ru-inside / .ru / MAIN; first match:
# MY, FOREIGN, RU. RU on main (home, own white IP) goes directly. IPs: CIDR (bare IP = /32);
# domains: with subdomains ("example.com" = "*.example.com"); MY_*: group MY (HY2 and "[MY] ..." nodes of the subscriptions)
RU_IPS="194.190.191.112/32"
#FOREIGN_IPS="1.2.3.0/24"
#MY_IPS="10.8.0.0/24"
#RU_DOMAINS="example.ru *.example.com"
#FOREIGN_DOMAINS="example.org"
#MY_DOMAINS="home.example.org"
#LOCAL_HOSTS="example.org=192.168.1.10" # own servers in this router's LAN: domain (+ subdomains)=LAN IP
# OpenVPN (BMSTU), needs /etc/nikki/bmstu.env and bmstu-otp.sh
OPENVPN=0
#OVPN_SERVER_HOST=openvpn4.bmstu.ru
#OVPN_SERVER_IPS="195.19.40.7 195.19.33.86"
#OVPN_ROUTES="172.16.0.0/16 172.19.33.0/24 195.19.32.0/19"
# weak routers (256 MB RAM): health checks every 10 min and only with traffic, sniffer
# without QUIC, quiet core; on apply also GOMEMLIMIT (LITE_GOMEMLIMIT, default 64MiB)
# for mihomo, nikki log level warning, no process lookup, interception without TUN
# (TCP redirect, UDP tproxy + kmod-nft-tproxy; LITE_TPROXY=0: leave nikki's modes alone)
LITE=0
#LITE_GOMEMLIMIT=64MiB
#LITE_TPROXY=0
# Tailscale (first login: URL in /var/log/nikki/core.log)
TAILSCALE=0
TS_HOSTNAME=fudy-mihomo
# split-DNS domains of the tailnet besides *.ts.net, space separated
TS_DOMAINS=""
# 1 = Tailscale through TS-EXIT (only ss/hysteria2/tuic nodes work for it)
TS_EXIT=0