完整可用版本,v1.0.0
This commit is contained in:
parent
87060094d7
commit
9a73082c3c
12 changed files with 1618 additions and 64 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,4 +1,2 @@
|
|||
# private folders
|
||||
tnt/
|
||||
history/
|
||||
wechat/
|
||||
|
|
@ -95,6 +95,7 @@ localhost
|
|||
*.local
|
||||
127.*
|
||||
10.*
|
||||
192.168.*
|
||||
```
|
||||
|
||||
执行 `mh rules reset` 后,`mh` 会把它编译进 `config.yaml` 的 `rules`,例如:
|
||||
|
|
|
|||
9
mh
9
mh
|
|
@ -2,8 +2,8 @@
|
|||
set -euo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}")")" && pwd)" # 指向真正
|
||||
resolve_mihomo_root() {
|
||||
if [[ -n "${MIHOMO_ROOT:-}" ]]; then
|
||||
printf "%s\n" "$MIHOMO_ROOT"
|
||||
|
|
@ -17,7 +17,7 @@ resolve_mihomo_root() {
|
|||
fi
|
||||
}
|
||||
|
||||
MIHOMO_ROOT="$(resolve_mihomo_root)"
|
||||
MIHOMO_ROOT="$(resolve_mihomo_root)" # 等好后面不能有空格
|
||||
MIHOMO_BIN=${MIHOMO_ROOT}/mihomo # 指向二进制文件
|
||||
PID_FILE=${MIHOMO_ROOT}/run.pid # 固定pid文件
|
||||
THEME_FILE=${MIHOMO_ROOT}/theme.current
|
||||
|
|
@ -687,7 +687,7 @@ Commands:
|
|||
sysproxy [on|off|status] 开关 GNOME 系统代理
|
||||
update [all|provider] 更新当前 profile 的 HTTP provider
|
||||
mode rule|global|direct 切换运行模式并重启
|
||||
rules show|reset 查看或重置基础规则
|
||||
rules show|reset 查看或重置基础规则,更新 bypass.list
|
||||
tun [on|off|toggle] 开关 TUN
|
||||
list | -l | --list [kw] 列出节点并可输入序号切换
|
||||
doctor 输出诊断信息
|
||||
|
|
@ -780,6 +780,7 @@ localhost
|
|||
10.*
|
||||
172.*
|
||||
192.168.*
|
||||
*.pcl.ac.cn
|
||||
BYPASS
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
mixed-port: 7890
|
||||
allow-lan: false
|
||||
bind-address: 127.0.0.1
|
||||
mode: global
|
||||
log-level: info
|
||||
|
||||
external-controller: 127.0.0.1:9090
|
||||
secret: ""
|
||||
|
||||
proxy-providers:
|
||||
example:
|
||||
type: http
|
||||
url: "https://example.com/your-subscription.yaml"
|
||||
interval: 3600
|
||||
path: ./providers/example.yaml
|
||||
|
||||
proxy-groups:
|
||||
- name: Proxy
|
||||
type: select
|
||||
use:
|
||||
- example
|
||||
|
||||
# Optional TUN + DNS (enabled via `mh tnu on`):
|
||||
# tun:
|
||||
# enable: true
|
||||
# stack: system
|
||||
# device: mihomo
|
||||
# auto-route: true
|
||||
# auto-detect-interface: true
|
||||
# dns-hijack:
|
||||
# - any:53
|
||||
#
|
||||
# dns:
|
||||
# enable: true
|
||||
# listen: 127.0.0.1:1053
|
||||
# enhanced-mode: fake-ip
|
||||
# nameserver:
|
||||
# - 223.5.5.5
|
||||
# - 119.29.29.29
|
||||
# fallback:
|
||||
# - 1.1.1.1
|
||||
# - 8.8.8.8
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# Example provider file (no real nodes)
|
||||
proxies:
|
||||
- name: "Example-Node"
|
||||
type: ss
|
||||
server: example.com
|
||||
port: 443
|
||||
cipher: aes-128-gcm
|
||||
password: "your-password"
|
||||
udp: true
|
||||
|
||||
proxy-groups:
|
||||
- name: Proxy
|
||||
type: select
|
||||
proxies:
|
||||
- "Example-Node"
|
||||
2
run.pid
2
run.pid
|
|
@ -1 +1 @@
|
|||
2240968
|
||||
4151264
|
||||
|
|
|
|||
1
theme.current
Normal file
1
theme.current
Normal file
|
|
@ -0,0 +1 @@
|
|||
kaomoji
|
||||
13
tnt/bypass.list
Normal file
13
tnt/bypass.list
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
*zhihu.com
|
||||
*zhimg.com
|
||||
*jd.com
|
||||
100ime-iat-api.xfyun.cn
|
||||
*360buyimg.com
|
||||
localhost
|
||||
*.local
|
||||
127.*
|
||||
10.*
|
||||
172.*
|
||||
192.168.*
|
||||
*.pcl.ac.cn
|
||||
*.lihato.icu
|
||||
BIN
tnt/cache.db
Normal file
BIN
tnt/cache.db
Normal file
Binary file not shown.
48
tnt/config.yaml
Normal file
48
tnt/config.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
mixed-port: 7890
|
||||
socks-port: 7891
|
||||
allow-lan: false
|
||||
bind-address: 127.0.0.1
|
||||
mode: rule
|
||||
log-level: error
|
||||
external-controller: 127.0.0.1:9090
|
||||
secret: ''
|
||||
proxy-providers:
|
||||
tnt:
|
||||
type: http
|
||||
url: https://linkuserssnk.xxyjx.cc/s/jBdoEVwWpmI3-67ef99c2?clash=1
|
||||
interval: 86400
|
||||
path: /mnt/data_4t/bfile/others/mihomo/tnt/providers/tnt.yaml
|
||||
proxy-groups:
|
||||
- name: Proxy
|
||||
type: select
|
||||
use:
|
||||
- tnt
|
||||
- name: Final
|
||||
type: select
|
||||
proxies:
|
||||
- Proxy
|
||||
- DIRECT
|
||||
rules:
|
||||
- DOMAIN-SUFFIX,zhihu.com,DIRECT
|
||||
- DOMAIN-SUFFIX,zhimg.com,DIRECT
|
||||
- DOMAIN-SUFFIX,jd.com,DIRECT
|
||||
- DOMAIN,100ime-iat-api.xfyun.cn,DIRECT
|
||||
- DOMAIN-SUFFIX,360buyimg.com,DIRECT
|
||||
- DOMAIN,localhost,DIRECT
|
||||
- DOMAIN-SUFFIX,local,DIRECT
|
||||
- IP-CIDR,127.0.0.0/8,DIRECT,no-resolve
|
||||
- IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
|
||||
- IP-CIDR,172.16.0.0/12,DIRECT,no-resolve
|
||||
- IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
|
||||
- DOMAIN-SUFFIX,pcl.ac.cn,DIRECT
|
||||
- DOMAIN-SUFFIX,lihato.icu,DIRECT
|
||||
- IP-CIDR,100.64.0.0/10,DIRECT,no-resolve
|
||||
- IP-CIDR,224.0.0.0/4,DIRECT,no-resolve
|
||||
- IP-CIDR6,::1/128,DIRECT,no-resolve
|
||||
- IP-CIDR6,fc00::/7,DIRECT,no-resolve
|
||||
- IP-CIDR6,fe80::/10,DIRECT,no-resolve
|
||||
- MATCH,Final
|
||||
dns:
|
||||
enable: false
|
||||
fallback: []
|
||||
fallback-filter: null
|
||||
5
tnt/mihomo.log
Normal file
5
tnt/mihomo.log
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
time="2026-07-02T16:12:00.433908196+08:00" level=info msg="Start initial configuration in progress"
|
||||
time="2026-07-02T16:12:00.434187625+08:00" level=info msg="Geodata Loader mode: memconservative"
|
||||
time="2026-07-02T16:12:00.434212901+08:00" level=info msg="Geosite Matcher implementation: succinct"
|
||||
time="2026-07-02T16:12:00.434485297+08:00" level=info msg="Initial configuration complete, total time: 0ms"
|
||||
time="2026-07-07T11:36:10.431082539+08:00" level=error msg="[Provider] tnt pull error: Get \"https://linkuserssnk.xxyjx.cc/s/jBdoEVwWpmI3-67ef99c2?clash=1\": EOF"
|
||||
1544
tnt/providers/tnt.yaml
Normal file
1544
tnt/providers/tnt.yaml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue