pymecli 0.3.5__tar.gz → 0.3.6__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.
Files changed (44) hide show
  1. {pymecli-0.3.5 → pymecli-0.3.6}/PKG-INFO +1 -1
  2. {pymecli-0.3.5 → pymecli-0.3.6}/cli/baidu.py +1 -1
  3. {pymecli-0.3.5 → pymecli-0.3.6}/core/clash.py +17 -3
  4. pymecli-0.3.6/data/template.yaml +120 -0
  5. {pymecli-0.3.5 → pymecli-0.3.6}/pyproject.toml +1 -1
  6. pymecli-0.3.5/data/template.yaml +0 -150
  7. {pymecli-0.3.5 → pymecli-0.3.6}/.gitignore +0 -0
  8. {pymecli-0.3.5 → pymecli-0.3.6}/README.md +0 -0
  9. {pymecli-0.3.5 → pymecli-0.3.6}/api/__init__.py +0 -0
  10. {pymecli-0.3.5 → pymecli-0.3.6}/api/v1/__init__.py +0 -0
  11. {pymecli-0.3.5 → pymecli-0.3.6}/api/v1/clash.py +0 -0
  12. {pymecli-0.3.5 → pymecli-0.3.6}/api/v1/redis.py +0 -0
  13. {pymecli-0.3.5 → pymecli-0.3.6}/cli/__init__.py +0 -0
  14. {pymecli-0.3.5 → pymecli-0.3.6}/cli/bitget.py +0 -0
  15. {pymecli-0.3.5 → pymecli-0.3.6}/cli/example.py +0 -0
  16. {pymecli-0.3.5 → pymecli-0.3.6}/cli/fast.py +0 -0
  17. {pymecli-0.3.5 → pymecli-0.3.6}/cli/gate.py +0 -0
  18. {pymecli-0.3.5 → pymecli-0.3.6}/cli/redis_csv.py +0 -0
  19. {pymecli-0.3.5 → pymecli-0.3.6}/cli/util.py +0 -0
  20. {pymecli-0.3.5 → pymecli-0.3.6}/core/__init__.py +0 -0
  21. {pymecli-0.3.5 → pymecli-0.3.6}/core/config.py +0 -0
  22. {pymecli-0.3.5 → pymecli-0.3.6}/core/redis_client.py +0 -0
  23. {pymecli-0.3.5 → pymecli-0.3.6}/crypto/__init__.py +0 -0
  24. {pymecli-0.3.5 → pymecli-0.3.6}/crypto/bitget.py +0 -0
  25. {pymecli-0.3.5 → pymecli-0.3.6}/crypto/gate.py +0 -0
  26. {pymecli-0.3.5 → pymecli-0.3.6}/data/__init__.py +0 -0
  27. {pymecli-0.3.5 → pymecli-0.3.6}/data/dou_dict.py +0 -0
  28. {pymecli-0.3.5 → pymecli-0.3.6}/data/dou_list.py +0 -0
  29. {pymecli-0.3.5 → pymecli-0.3.6}/data/main.py +0 -0
  30. {pymecli-0.3.5 → pymecli-0.3.6}/models/__init__.py +0 -0
  31. {pymecli-0.3.5 → pymecli-0.3.6}/models/douzero_model.py +0 -0
  32. {pymecli-0.3.5 → pymecli-0.3.6}/models/ocr_model.py +0 -0
  33. {pymecli-0.3.5 → pymecli-0.3.6}/models/response.py +0 -0
  34. {pymecli-0.3.5 → pymecli-0.3.6}/utils/__init__.py +0 -0
  35. {pymecli-0.3.5 → pymecli-0.3.6}/utils/elapsed.py +0 -0
  36. {pymecli-0.3.5 → pymecli-0.3.6}/utils/helper.py +0 -0
  37. {pymecli-0.3.5 → pymecli-0.3.6}/utils/logger.py +0 -0
  38. {pymecli-0.3.5 → pymecli-0.3.6}/utils/mysql.py +0 -0
  39. {pymecli-0.3.5 → pymecli-0.3.6}/utils/path.py +0 -0
  40. {pymecli-0.3.5 → pymecli-0.3.6}/utils/pd.py +0 -0
  41. {pymecli-0.3.5 → pymecli-0.3.6}/utils/pyredis.py +0 -0
  42. {pymecli-0.3.5 → pymecli-0.3.6}/utils/sleep.py +0 -0
  43. {pymecli-0.3.5 → pymecli-0.3.6}/utils/text.py +0 -0
  44. {pymecli-0.3.5 → pymecli-0.3.6}/utils/toml.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymecli
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: My CLI
5
5
  Project-URL: Homepage, https://pypi.org/project/pymecli
6
6
  Project-URL: Repository, https://github.com/meme2046/pymecli
@@ -20,7 +20,7 @@ def acsToken(
20
20
  help="request url",
21
21
  ),
22
22
  timeout: int = typer.Option(
23
- 3,
23
+ 10,
24
24
  "--timeout",
25
25
  "-t",
26
26
  help="timeout内如果没有请求完整,会强制中断,然后从已有的请求中获取数据",
@@ -104,12 +104,16 @@ class ClashYamlGenerator:
104
104
 
105
105
  # 获取rules
106
106
  rule_list = [
107
- [f"{self.my_rule_base_url}/direct.yaml", "DIRECT,no-resolve"],
107
+ [f"{self.my_rule_base_url}/direct.yaml", "DIRECT"],
108
108
  [f"{self.my_rule_base_url}/proxy.yaml", "全局选择"],
109
109
  [
110
110
  f"{self.my_rule_base_url}/round.yaml",
111
111
  "轮询",
112
112
  ],
113
+ [
114
+ f"{self.my_rule_base_url}/xbox.yaml",
115
+ "全局选择",
116
+ ],
113
117
  ]
114
118
 
115
119
  for item in rule_list:
@@ -128,6 +132,7 @@ class ClashYamlGenerator:
128
132
  {
129
133
  "applications": {
130
134
  "type": "http",
135
+ "format": "yaml",
131
136
  "behavior": "classical",
132
137
  "url": f"{self.rule_base_url}/applications.txt",
133
138
  "path": "./ruleset/applications.yaml",
@@ -135,6 +140,7 @@ class ClashYamlGenerator:
135
140
  },
136
141
  "private": {
137
142
  "type": "http",
143
+ "format": "yaml",
138
144
  "behavior": "domain",
139
145
  "url": f"{self.rule_base_url}/private.txt",
140
146
  "path": "./ruleset/private.yaml",
@@ -142,6 +148,7 @@ class ClashYamlGenerator:
142
148
  },
143
149
  "icloud": {
144
150
  "type": "http",
151
+ "format": "yaml",
145
152
  "behavior": "domain",
146
153
  "url": f"{self.rule_base_url}/icloud.txt",
147
154
  "path": "./ruleset/icloud.yaml",
@@ -149,6 +156,7 @@ class ClashYamlGenerator:
149
156
  },
150
157
  "apple": {
151
158
  "type": "http",
159
+ "format": "yaml",
152
160
  "behavior": "domain",
153
161
  "url": f"{self.rule_base_url}/apple.txt",
154
162
  "path": "./ruleset/apple.yaml",
@@ -156,6 +164,7 @@ class ClashYamlGenerator:
156
164
  },
157
165
  "google": {
158
166
  "type": "http",
167
+ "format": "yaml",
159
168
  "behavior": "domain",
160
169
  "url": f"{self.rule_base_url}/google.txt",
161
170
  "path": "./ruleset/google.yaml",
@@ -163,6 +172,7 @@ class ClashYamlGenerator:
163
172
  },
164
173
  "proxy": {
165
174
  "type": "http",
175
+ "format": "yaml",
166
176
  "behavior": "domain",
167
177
  "url": f"{self.rule_base_url}/proxy.txt",
168
178
  "path": "./ruleset/proxy.yaml",
@@ -170,6 +180,7 @@ class ClashYamlGenerator:
170
180
  },
171
181
  "direct": {
172
182
  "type": "http",
183
+ "format": "yaml",
173
184
  "behavior": "domain",
174
185
  "url": f"{self.rule_base_url}/direct.txt",
175
186
  "path": "./ruleset/direct.yaml",
@@ -177,6 +188,7 @@ class ClashYamlGenerator:
177
188
  },
178
189
  "lancidr": {
179
190
  "type": "http",
191
+ "format": "yaml",
180
192
  "behavior": "ipcidr",
181
193
  "url": f"{self.rule_base_url}/lancidr.txt",
182
194
  "path": "./ruleset/lancidr.yaml",
@@ -184,6 +196,7 @@ class ClashYamlGenerator:
184
196
  },
185
197
  "cncidr": {
186
198
  "type": "http",
199
+ "format": "yaml",
187
200
  "behavior": "ipcidr",
188
201
  "url": f"{self.rule_base_url}/cncidr.txt",
189
202
  "path": "./ruleset/cncidr.yaml",
@@ -191,6 +204,7 @@ class ClashYamlGenerator:
191
204
  },
192
205
  "telegramcidr": {
193
206
  "type": "http",
207
+ "format": "yaml",
194
208
  "behavior": "ipcidr",
195
209
  "url": f"{self.rule_base_url}/telegramcidr.txt",
196
210
  "path": "./ruleset/telegramcidr.yaml",
@@ -210,8 +224,8 @@ class ClashYamlGenerator:
210
224
  "RULE-SET,google,全局选择",
211
225
  "RULE-SET,proxy,全局选择",
212
226
  "RULE-SET,direct,DIRECT",
213
- "RULE-SET,lancidr,DIRECT",
214
- "RULE-SET,cncidr,DIRECT",
227
+ "RULE-SET,lancidr,DIRECT,no-resolve",
228
+ "RULE-SET,cncidr,DIRECT,no-resolve",
215
229
  "RULE-SET,telegramcidr,全局选择",
216
230
  "GEOIP,LAN,DIRECT,no-resolve",
217
231
  "GEOIP,CN,DIRECT,no-resolve",
@@ -0,0 +1,120 @@
1
+ mixed-port: 7897
2
+ allow-lan: false
3
+ mode: rule
4
+ log-level: warning
5
+ external-controller: "127.0.0.1:9097"
6
+ global-client-fingerprint: chrome
7
+ unified-delay: true
8
+ ipv6: false
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: false
24
+ cache-algorithm: arc
25
+ fake-ip-filter:
26
+ - "*.lan"
27
+ - "*.local"
28
+ - "*.arpa"
29
+ - "*.time.*"
30
+ - "*.ntp.*"
31
+ - "*.music.*"
32
+ - "*.msftncsi.com"
33
+ - "*.msftconnecttest.com"
34
+ - "+.market.xiaomi.com"
35
+ - "localhost.ptlogin2.qq.com"
36
+ - "stun.*"
37
+ - "*.srv.nintendo.net"
38
+ - "*.stun.playstation.net"
39
+ - "xbox.*.microsoft.com"
40
+ - "*.ipv6.microsoft.com"
41
+ - "*.xboxlive.com"
42
+ - "speedtest.cros.wr.pvp.net"
43
+ default-nameserver:
44
+ - "223.5.5.5"
45
+ - "119.29.29.29"
46
+ - "1.1.1.1"
47
+ - "8.8.8.8"
48
+ - "2400:3200::1"
49
+ - "2001:4860:4860::8888"
50
+ nameserver:
51
+ # 国内DNS服务器↓
52
+ - "https://dns.alidns.com/dns-query" # 阿里云公共DNS
53
+ - "https://doh.pub/dns-query" # 腾讯DNSPod
54
+ - "https://doh.360.cn/dns-query" # 360安全DNS
55
+ - "https://1.1.1.1/dns-query" # Cloudflare(主)
56
+ # 国外DNS服务器↓
57
+ - "https://1.0.0.1/dns-query" # Cloudflare(备)
58
+ - "https://208.67.222.222/dns-query" # OpenDNS(主)
59
+ - "https://208.67.220.220/dns-query" # OpenDNS(备)
60
+ - "https://194.242.2.2/dns-query" # Mullvad(主)
61
+ - "https://194.242.2.3/dns-query" # Mullvad(备)
62
+ direct-nameserver-follow-policy: false
63
+ fallback-filter:
64
+ geoip: true
65
+ geoip-code: "CN"
66
+ ipcidr:
67
+ - "240.0.0.0/4"
68
+ - "0.0.0.0/32"
69
+ - "127.0.0.1/32"
70
+ - "192.168.0.0/16"
71
+ - "10.0.0.0/8"
72
+ - "172.16.0.0/12"
73
+ domain:
74
+ - "+.google.com"
75
+ - "+.facebook.com"
76
+ - "+.twitter.com"
77
+ - "+.youtube.com"
78
+ - "+.googleapis.com"
79
+ - "+.gvt1.com"
80
+ fallback: []
81
+ proxy-server-nameserver:
82
+ # 国内DNS服务器↓
83
+ - "https://dns.alidns.com/dns-query" # 阿里云公共DNS
84
+ - "https://doh.pub/dns-query" # 腾讯DNSPod
85
+ - "https://doh.360.cn/dns-query" # 360安全DNS
86
+ # 国外DNS服务器↓
87
+ - "https://1.1.1.1/dns-query" # Cloudflare(主)
88
+ - "https://1.0.0.1/dns-query" # Cloudflare(备)
89
+ - "https://208.67.222.222/dns-query" # OpenDNS(主)
90
+ - "https://208.67.220.220/dns-query" # OpenDNS(备)
91
+ - "https://194.242.2.2/dns-query" # Mullvad(主)
92
+ - "https://194.242.2.3/dns-query" # Mullvad(备)
93
+ nameserver-policy:
94
+ "geosite:private,cn,geolocation-cn":
95
+ # 国内DNS服务器↓
96
+ - "https://dns.alidns.com/dns-query" # 阿里云公共DNS
97
+ - "https://doh.pub/dns-query" # 腾讯DNSPod
98
+ - "https://doh.360.cn/dns-query" # 360安全DNS
99
+ "geosite:google,youtube,telegram,gfw,geolocation-!cn":
100
+ # 国外DNS服务器↓
101
+ - "https://1.1.1.1/dns-query" # Cloudflare(主)
102
+ - "https://1.0.0.1/dns-query" # Cloudflare(备)
103
+ - "https://208.67.222.222/dns-query" # OpenDNS(主)
104
+ - "https://208.67.220.220/dns-query" # OpenDNS(备)
105
+ - "https://194.242.2.2/dns-query" # Mullvad(主)
106
+ - "https://194.242.2.3/dns-query" # Mullvad(备)
107
+ direct-nameserver:
108
+ # 国内DNS服务器↓
109
+ - "https://dns.alidns.com/dns-query" # 阿里云公共DNS
110
+ - "https://doh.pub/dns-query" # 腾讯DNSPod
111
+ - "https://doh.360.cn/dns-query" # 360安全DNS
112
+ external-controller-cors:
113
+ allow-private-network: true
114
+ allow-origins:
115
+ - "*"
116
+ proxies: []
117
+ proxy-providers: {}
118
+ proxy-groups: []
119
+ rule-providers: {}
120
+ rules: []
@@ -30,7 +30,7 @@
30
30
  name = "pymecli"
31
31
  readme = "README.md"
32
32
  requires-python = ">=3.10"
33
- version = "0.3.5"
33
+ version = "0.3.6"
34
34
 
35
35
  [project.urls]
36
36
  Homepage = "https://pypi.org/project/pymecli"
@@ -1,150 +0,0 @@
1
- mixed-port: 7897
2
- allow-lan: false
3
- mode: rule
4
- log-level: warning
5
- external-controller: "127.0.0.1:9097"
6
- global-client-fingerprint: chrome
7
- unified-delay: true
8
- ipv6: false
9
- profile:
10
- store-selected: true
11
- tun:
12
- mtu: 1500
13
- dns:
14
- enable: true
15
- ipv6: false
16
- use-system-hosts: false
17
- listen: "127.0.0.1:5335"
18
- enhanced-mode: fake-ip
19
- fake-ip-range: 198.18.0.1/16
20
- fake-ip-filter:
21
- [
22
- "*.lan",
23
- "stun.*.*.*",
24
- "stun.*.*",
25
- time.windows.com,
26
- time.nist.gov,
27
- time.apple.com,
28
- time.asia.apple.com,
29
- "*.ntp.org.cn",
30
- "*.openwrt.pool.ntp.org",
31
- time1.cloud.tencent.com,
32
- time.ustc.edu.cn,
33
- pool.ntp.org,
34
- ntp.ubuntu.com,
35
- ntp.aliyun.com,
36
- ntp1.aliyun.com,
37
- ntp2.aliyun.com,
38
- ntp3.aliyun.com,
39
- ntp4.aliyun.com,
40
- ntp5.aliyun.com,
41
- ntp6.aliyun.com,
42
- ntp7.aliyun.com,
43
- time1.aliyun.com,
44
- time2.aliyun.com,
45
- time3.aliyun.com,
46
- time4.aliyun.com,
47
- time5.aliyun.com,
48
- time6.aliyun.com,
49
- time7.aliyun.com,
50
- "*.time.edu.cn",
51
- time1.apple.com,
52
- time2.apple.com,
53
- time3.apple.com,
54
- time4.apple.com,
55
- time5.apple.com,
56
- time6.apple.com,
57
- time7.apple.com,
58
- time1.google.com,
59
- time2.google.com,
60
- time3.google.com,
61
- time4.google.com,
62
- music.163.com,
63
- "*.music.163.com",
64
- "*.126.net",
65
- musicapi.taihe.com,
66
- music.taihe.com,
67
- songsearch.kugou.com,
68
- trackercdn.kugou.com,
69
- "*.kuwo.cn",
70
- api-jooxtt.sanook.com,
71
- api.joox.com,
72
- joox.com,
73
- y.qq.com,
74
- "*.y.qq.com",
75
- streamoc.music.tc.qq.com,
76
- mobileoc.music.tc.qq.com,
77
- isure.stream.qqmusic.qq.com,
78
- dl.stream.qqmusic.qq.com,
79
- aqqmusic.tc.qq.com,
80
- amobile.music.tc.qq.com,
81
- "*.xiami.com",
82
- "*.music.migu.cn",
83
- music.migu.cn,
84
- "*.msftconnecttest.com",
85
- "*.msftncsi.com",
86
- localhost.ptlogin2.qq.com,
87
- "*.*.*.srv.nintendo.net",
88
- "*.*.stun.playstation.net",
89
- "xbox.*.*.microsoft.com",
90
- "*.ipv6.microsoft.com",
91
- "*.*.xboxlive.com",
92
- speedtest.cros.wr.pvp.net,
93
- ]
94
- default-nameserver:
95
- [
96
- system,
97
- 180.76.76.76,
98
- 182.254.118.118,
99
- 8.8.8.8,
100
- 180.184.2.2,
101
- "2400:3200::1",
102
- ]
103
- nameserver:
104
- [
105
- "https://223.5.5.5/dns-query#skip-cert-verify=true",
106
- "https://doh.pub/dns-query#skip-cert-verify=true",
107
- "https://dns.alidns.com/dns-query#skip-cert-verify=true",
108
- "tls://223.5.5.5#skip-cert-verify=true",
109
- "tls://dot.pub#skip-cert-verify=true",
110
- "tls://dns.alidns.com#skip-cert-verify=true",
111
- "https://223.6.6.6/dns-query#skip-cert-verify=true&h3=true",
112
- "https://cloudflare-dns.com/dns-query#skip-cert-verify=true",
113
- ]
114
- proxy-server-nameserver:
115
- [
116
- "https://223.5.5.5/dns-query#skip-cert-verify=true",
117
- "https://doh.pub/dns-query#skip-cert-verify=true",
118
- "https://dns.alidns.com/dns-query#skip-cert-verify=true",
119
- "tls://223.5.5.5#skip-cert-verify=true",
120
- "tls://dot.pub#skip-cert-verify=true",
121
- "tls://dns.alidns.com#skip-cert-verify=true",
122
- "https://223.6.6.6/dns-query#skip-cert-verify=true&h3=true",
123
- "https://cloudflare-dns.com/dns-query#skip-cert-verify=true",
124
- ]
125
- fallback-filter:
126
- {
127
- geoip: true,
128
- ipcidr: [240.0.0.0/4, 0.0.0.0/32, 127.0.0.1/32],
129
- domain:
130
- [
131
- +.google.com,
132
- +.facebook.com,
133
- +.twitter.com,
134
- +.youtube.com,
135
- +.xn--ngstr-lra8j.com,
136
- +.google.cn,
137
- +.googleapis.cn,
138
- +.googleapis.com,
139
- +.gvt1.com,
140
- ],
141
- }
142
- external-controller-cors:
143
- allow-private-network: true
144
- allow-origins:
145
- - "*"
146
- proxies: []
147
- proxy-providers: {}
148
- proxy-groups: []
149
- rule-providers: {}
150
- 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
File without changes