pymecli 0.5.1__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pymecli-0.5.1 → pymecli-0.5.2}/PKG-INFO +1 -1
- {pymecli-0.5.1 → pymecli-0.5.2}/cli/dst.py +9 -9
- {pymecli-0.5.1 → pymecli-0.5.2}/cli/util.py +4 -8
- {pymecli-0.5.1 → pymecli-0.5.2}/core/config.py +1 -1
- pymecli-0.5.2/data/template.yaml +156 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/pyproject.toml +1 -1
- pymecli-0.5.1/data/template.yaml +0 -70
- {pymecli-0.5.1 → pymecli-0.5.2}/.gitignore +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/README.md +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/api/__init__.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/api/v1/__init__.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/api/v1/clash.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/api/v1/redis.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/cli/__init__.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/cli/bitget.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/cli/example.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/cli/fast.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/cli/gate.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/cli/redis_csv.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/core/__init__.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/core/clash.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/core/redis_client.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/crypto/__init__.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/crypto/bitget.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/crypto/gate.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/data/__init__.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/data/dou_dict.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/data/dou_list.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/data/main.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/models/__init__.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/models/douzero_model.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/models/ocr_model.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/models/response.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/__init__.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/elapsed.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/helper.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/logger.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/mysql.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/path.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/pd.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/pyredis.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/sleep.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/text.py +0 -0
- {pymecli-0.5.1 → pymecli-0.5.2}/utils/toml.py +0 -0
|
@@ -149,13 +149,13 @@ def convert_update(
|
|
|
149
149
|
continue
|
|
150
150
|
mod_data = versions.get(wid)
|
|
151
151
|
if mod_data is None:
|
|
152
|
-
typer.secho(f"
|
|
152
|
+
typer.secho(f"✗ {mod_key}: 未获取到版本信息", fg=typer.colors.YELLOW)
|
|
153
153
|
continue
|
|
154
154
|
new_version = mod_data.get("version")
|
|
155
155
|
title = mod_data.get("title", "")
|
|
156
156
|
if new_version is None:
|
|
157
157
|
typer.secho(
|
|
158
|
-
f"
|
|
158
|
+
f"✗ {mod_key} ({title}): 未获取到版本信息", fg=typer.colors.YELLOW
|
|
159
159
|
)
|
|
160
160
|
continue
|
|
161
161
|
old_version = mod_info.get("version")
|
|
@@ -163,7 +163,7 @@ def convert_update(
|
|
|
163
163
|
mod_info["version"] = new_version
|
|
164
164
|
updated_count += 1
|
|
165
165
|
typer.secho(
|
|
166
|
-
f"
|
|
166
|
+
f"✓ {mod_key} ({title}): {old_version} -> {new_version}",
|
|
167
167
|
fg=typer.colors.GREEN,
|
|
168
168
|
)
|
|
169
169
|
else:
|
|
@@ -185,9 +185,9 @@ def convert_update(
|
|
|
185
185
|
raise typer.Exit(code=1)
|
|
186
186
|
|
|
187
187
|
if updated_count > 0:
|
|
188
|
-
typer.secho(f"
|
|
188
|
+
typer.secho(f"🎉 成功更新 {updated_count} 个 mod 版本", fg=typer.colors.GREEN)
|
|
189
189
|
else:
|
|
190
|
-
typer.secho("
|
|
190
|
+
typer.secho("✓ 所有MOD已是最新版本", fg=typer.colors.YELLOW)
|
|
191
191
|
|
|
192
192
|
|
|
193
193
|
@app.command()
|
|
@@ -255,12 +255,12 @@ def mod_setup(
|
|
|
255
255
|
title = mod_data.get("title", "")
|
|
256
256
|
|
|
257
257
|
typer.secho(
|
|
258
|
-
f"
|
|
258
|
+
f"{item} ({title}): {new_version}",
|
|
259
259
|
fg=typer.colors.WHITE,
|
|
260
260
|
)
|
|
261
261
|
|
|
262
262
|
typer.secho(
|
|
263
|
-
f"
|
|
263
|
+
f"📢 client_mods({len(client_ids)}):",
|
|
264
264
|
fg=typer.colors.GREEN,
|
|
265
265
|
)
|
|
266
266
|
|
|
@@ -277,14 +277,14 @@ def mod_setup(
|
|
|
277
277
|
title = mod_data.get("title", "")
|
|
278
278
|
|
|
279
279
|
typer.secho(
|
|
280
|
-
f"
|
|
280
|
+
f"{item} ({title}): {new_version}",
|
|
281
281
|
fg=typer.colors.WHITE,
|
|
282
282
|
)
|
|
283
283
|
|
|
284
284
|
for p in output:
|
|
285
285
|
with open(p, "w", encoding="utf-8") as f:
|
|
286
286
|
f.write("\n".join(setup_list))
|
|
287
|
-
typer.secho(f"
|
|
287
|
+
typer.secho(f"💾 <setup_list>已保存到: {p}", fg=typer.colors.CYAN)
|
|
288
288
|
|
|
289
289
|
|
|
290
290
|
if __name__ == "__main__":
|
|
@@ -68,12 +68,8 @@ def emoji():
|
|
|
68
68
|
emoji_list = [
|
|
69
69
|
"『",
|
|
70
70
|
"』",
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"❗",
|
|
74
|
-
"⭕",
|
|
75
|
-
"❓",
|
|
76
|
-
"❌",
|
|
71
|
+
"✓",
|
|
72
|
+
"✗",
|
|
77
73
|
"⤴︎",
|
|
78
74
|
"⤵︎",
|
|
79
75
|
"⇡",
|
|
@@ -147,7 +143,7 @@ def say():
|
|
|
147
143
|
@app.command()
|
|
148
144
|
def ipv6():
|
|
149
145
|
"""
|
|
150
|
-
获取本地
|
|
146
|
+
获取本地 IPv6 稳定地址
|
|
151
147
|
"""
|
|
152
148
|
ips = []
|
|
153
149
|
adapters = ifaddr.get_adapters(include_unconfigured=False)
|
|
@@ -178,7 +174,7 @@ def ipv6():
|
|
|
178
174
|
print("未找到稳定 IPV6 地址")
|
|
179
175
|
return ips
|
|
180
176
|
|
|
181
|
-
print(f"
|
|
177
|
+
print(f"IPv6 稳定地址: {ips}")
|
|
182
178
|
|
|
183
179
|
r = get_redis_client_sync()
|
|
184
180
|
r.set("local.IPv6", ips[0])
|
|
@@ -19,7 +19,7 @@ class Settings(BaseSettings):
|
|
|
19
19
|
REDIS_PASSWORD: str = ""
|
|
20
20
|
|
|
21
21
|
PROJECT_DESCRIPTION: str = (
|
|
22
|
-
f"{metadata['Summary']}, FastAPI提供: clash订阅转换、
|
|
22
|
+
f"{metadata['Summary']}, FastAPI提供: clash订阅转换、redis API"
|
|
23
23
|
)
|
|
24
24
|
PROJECT_VERSION: str = metadata["Version"]
|
|
25
25
|
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
external-controller: ""
|
|
2
|
+
ipv6: true
|
|
3
|
+
mode: rule
|
|
4
|
+
mixed-port: 7897
|
|
5
|
+
socks-port: 0
|
|
6
|
+
port: 0
|
|
7
|
+
redir-port: 0
|
|
8
|
+
tproxy-port: 0
|
|
9
|
+
allow-lan: true
|
|
10
|
+
unified-delay: true
|
|
11
|
+
tcp-concurrent: false
|
|
12
|
+
log-level: info
|
|
13
|
+
find-process-mode: strict
|
|
14
|
+
bind-address: "*"
|
|
15
|
+
lan-allowed-ips:
|
|
16
|
+
- 0.0.0.0/0
|
|
17
|
+
- ::/0
|
|
18
|
+
lan-disallowed-ips: []
|
|
19
|
+
authentication: []
|
|
20
|
+
skip-auth-prefixes:
|
|
21
|
+
- 127.0.0.1/32
|
|
22
|
+
- ::1/128
|
|
23
|
+
tun:
|
|
24
|
+
enable: false
|
|
25
|
+
stack: mixed
|
|
26
|
+
auto-route: true
|
|
27
|
+
auto-redirect: false
|
|
28
|
+
auto-detect-interface: true
|
|
29
|
+
dns-hijack:
|
|
30
|
+
- any:53
|
|
31
|
+
route-exclude-address: []
|
|
32
|
+
mtu: 1500
|
|
33
|
+
device: Mihomo
|
|
34
|
+
dns:
|
|
35
|
+
enable: true
|
|
36
|
+
ipv6: true
|
|
37
|
+
enhanced-mode: fake-ip
|
|
38
|
+
fake-ip-range: 198.18.0.1/16
|
|
39
|
+
fake-ip-filter:
|
|
40
|
+
- "*"
|
|
41
|
+
- +.lan
|
|
42
|
+
- +.local
|
|
43
|
+
- time.*.com
|
|
44
|
+
- ntp.*.com
|
|
45
|
+
- +.market.xiaomi.com
|
|
46
|
+
use-hosts: false
|
|
47
|
+
use-system-hosts: false
|
|
48
|
+
respect-rules: true
|
|
49
|
+
default-nameserver:
|
|
50
|
+
- https://223.5.5.5/dns-query
|
|
51
|
+
- https://223.6.6.6/dns-query
|
|
52
|
+
- https://8.8.8.8/dns-query
|
|
53
|
+
- https://1.1.1.1/dns-query
|
|
54
|
+
- 223.5.5.5
|
|
55
|
+
nameserver:
|
|
56
|
+
- https://dns.alidns.com/dns-query
|
|
57
|
+
- https://doh.pub/dns-query
|
|
58
|
+
proxy-server-nameserver:
|
|
59
|
+
- https://cloudflare-dns.com/dns-query
|
|
60
|
+
- https://dns.google/dns-query
|
|
61
|
+
- https://dns.alidns.com/dns-query
|
|
62
|
+
- https://doh.pub/dns-query
|
|
63
|
+
direct-nameserver:
|
|
64
|
+
- https://dns.alidns.com/dns-query
|
|
65
|
+
- https://doh.pub/dns-query
|
|
66
|
+
fallback:
|
|
67
|
+
- https://cloudflare-dns.com/dns-query
|
|
68
|
+
- https://dns.google/dns-query
|
|
69
|
+
fallback-filter:
|
|
70
|
+
geoip: true
|
|
71
|
+
geoip-code: CN
|
|
72
|
+
ipcidr:
|
|
73
|
+
- 240.0.0.0/4
|
|
74
|
+
- 0.0.0.0/32
|
|
75
|
+
- 127.0.0.0/8
|
|
76
|
+
- 10.0.0.0/8
|
|
77
|
+
- 192.168.0.0/16
|
|
78
|
+
domain:
|
|
79
|
+
- +.google.com
|
|
80
|
+
- +.facebook.com
|
|
81
|
+
- +.youtube.com
|
|
82
|
+
direct-nameserver-follow-policy: true
|
|
83
|
+
prefer-h3: false
|
|
84
|
+
nameserver-policy:
|
|
85
|
+
geosite:cn:
|
|
86
|
+
- https://dns.alidns.com/dns-query
|
|
87
|
+
- https://doh.pub/dns-query
|
|
88
|
+
geosite:geolocation-!cn:
|
|
89
|
+
- https://cloudflare-dns.com/dns-query
|
|
90
|
+
- https://dns.google/dns-query
|
|
91
|
+
+.jsdelivr.net:
|
|
92
|
+
- https://cloudflare-dns.com/dns-query
|
|
93
|
+
- https://dns.google/dns-query
|
|
94
|
+
+.github.com:
|
|
95
|
+
- https://cloudflare-dns.com/dns-query
|
|
96
|
+
- https://dns.google/dns-query
|
|
97
|
+
+.githubusercontent.com:
|
|
98
|
+
- https://cloudflare-dns.com/dns-query
|
|
99
|
+
- https://dns.google/dns-query
|
|
100
|
+
+.githubassets.com:
|
|
101
|
+
- https://cloudflare-dns.com/dns-query
|
|
102
|
+
- https://dns.google/dns-query
|
|
103
|
+
+.fastly.net:
|
|
104
|
+
- https://cloudflare-dns.com/dns-query
|
|
105
|
+
- https://dns.google/dns-query
|
|
106
|
+
sniffer:
|
|
107
|
+
enable: true
|
|
108
|
+
parse-pure-ip: true
|
|
109
|
+
force-dns-mapping: true
|
|
110
|
+
override-destination: true
|
|
111
|
+
sniff:
|
|
112
|
+
HTTP:
|
|
113
|
+
ports:
|
|
114
|
+
- "80"
|
|
115
|
+
- 8080-8880
|
|
116
|
+
override-destination: true
|
|
117
|
+
TLS:
|
|
118
|
+
ports:
|
|
119
|
+
- "443"
|
|
120
|
+
- "8443"
|
|
121
|
+
QUIC:
|
|
122
|
+
ports:
|
|
123
|
+
- "443"
|
|
124
|
+
- "8443"
|
|
125
|
+
- "4433"
|
|
126
|
+
skip-domain:
|
|
127
|
+
- +.push.apple.com
|
|
128
|
+
skip-dst-address:
|
|
129
|
+
- 91.105.192.0/23
|
|
130
|
+
- 91.108.4.0/22
|
|
131
|
+
- 91.108.8.0/21
|
|
132
|
+
- 91.108.16.0/21
|
|
133
|
+
- 91.108.56.0/22
|
|
134
|
+
- 95.161.64.0/20
|
|
135
|
+
- 149.154.160.0/20
|
|
136
|
+
- 185.76.151.0/24
|
|
137
|
+
- 2001:67c:4e8::/48
|
|
138
|
+
- 2001:b28:f23c::/47
|
|
139
|
+
- 2001:b28:f23f::/48
|
|
140
|
+
- 2a0a:f280:203::/48
|
|
141
|
+
profile:
|
|
142
|
+
store-selected: true
|
|
143
|
+
store-fake-ip: true
|
|
144
|
+
geo-auto-update: false
|
|
145
|
+
geo-update-interval: 24
|
|
146
|
+
geodata-mode: true
|
|
147
|
+
geox-url:
|
|
148
|
+
geoip: https://fastly.jsdelivr.net/gh/Loyalsoldier/geoip@release/geoip.dat
|
|
149
|
+
mmdb: https://fastly.jsdelivr.net/gh/Loyalsoldier/geoip@release/Country.mmdb
|
|
150
|
+
asn: https://fastly.jsdelivr.net/gh/Loyalsoldier/geoip@release/GeoLite2-ASN.mmdb
|
|
151
|
+
geosite: https://fastly.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat
|
|
152
|
+
proxies: []
|
|
153
|
+
proxy-providers: {}
|
|
154
|
+
proxy-groups: []
|
|
155
|
+
rule-providers: {}
|
|
156
|
+
rules: []
|
pymecli-0.5.1/data/template.yaml
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
mixed-port: 7897
|
|
2
|
-
allow-lan: true
|
|
3
|
-
mode: rule
|
|
4
|
-
log-level: warning
|
|
5
|
-
external-controller: "127.0.0.1:9097"
|
|
6
|
-
client-fingerprint: chrome
|
|
7
|
-
unified-delay: true
|
|
8
|
-
ipv6: true
|
|
9
|
-
profile:
|
|
10
|
-
store-selected: true
|
|
11
|
-
tun:
|
|
12
|
-
mtu: 1500
|
|
13
|
-
dns:
|
|
14
|
-
enable: true
|
|
15
|
-
listen: ":53"
|
|
16
|
-
enhanced-mode: "fake-ip"
|
|
17
|
-
fake-ip-range: "198.18.0.1/16"
|
|
18
|
-
fake-ip-filter-mode: "blacklist"
|
|
19
|
-
prefer-h3: false
|
|
20
|
-
respect-rules: false
|
|
21
|
-
use-hosts: false
|
|
22
|
-
use-system-hosts: false
|
|
23
|
-
ipv6: true
|
|
24
|
-
fake-ip-filter:
|
|
25
|
-
- "*.lan"
|
|
26
|
-
- "*.local"
|
|
27
|
-
- "*.arpa"
|
|
28
|
-
- "time.*.com"
|
|
29
|
-
- "ntp.*.com"
|
|
30
|
-
- "time.*.com"
|
|
31
|
-
- "+.market.xiaomi.com"
|
|
32
|
-
- "localhost.ptlogin2.qq.com"
|
|
33
|
-
- "*.msftncsi.com"
|
|
34
|
-
- "www.msftconnecttest.com"
|
|
35
|
-
default-nameserver:
|
|
36
|
-
- "system"
|
|
37
|
-
- "223.6.6.6"
|
|
38
|
-
- "8.8.8.8"
|
|
39
|
-
- "2400:3200::1"
|
|
40
|
-
- "2001:4860:4860::8888"
|
|
41
|
-
nameserver:
|
|
42
|
-
- "8.8.8.8"
|
|
43
|
-
- "https://doh.pub/dns-query"
|
|
44
|
-
- "https://dns.alidns.com/dns-query"
|
|
45
|
-
direct-nameserver-follow-policy: false
|
|
46
|
-
fallback-filter:
|
|
47
|
-
geoip: true
|
|
48
|
-
geoip-code: "CN"
|
|
49
|
-
ipcidr:
|
|
50
|
-
- "240.0.0.0/4"
|
|
51
|
-
- "0.0.0.0/32"
|
|
52
|
-
domain:
|
|
53
|
-
- "+.google.com"
|
|
54
|
-
- "+.facebook.com"
|
|
55
|
-
- "+.youtube.com"
|
|
56
|
-
fallback: []
|
|
57
|
-
proxy-server-nameserver:
|
|
58
|
-
- "https://doh.pub/dns-query"
|
|
59
|
-
- "https://dns.alidns.com/dns-query"
|
|
60
|
-
- "tls://223.5.5.5"
|
|
61
|
-
direct-nameserver: []
|
|
62
|
-
external-controller-cors:
|
|
63
|
-
allow-private-network: true
|
|
64
|
-
allow-origins:
|
|
65
|
-
- "*"
|
|
66
|
-
proxies: []
|
|
67
|
-
proxy-providers: {}
|
|
68
|
-
proxy-groups: []
|
|
69
|
-
rule-providers: {}
|
|
70
|
-
rules: []
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|