ryry-cli 5.2__tar.gz → 5.3__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.
- {ryry_cli-5.2/ryry_cli.egg-info → ryry_cli-5.3}/PKG-INFO +1 -1
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/constant.py +2 -2
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/store.py +1 -1
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/upload.py +14 -24
- {ryry_cli-5.2 → ryry_cli-5.3/ryry_cli.egg-info}/PKG-INFO +1 -1
- {ryry_cli-5.2 → ryry_cli-5.3}/setup.py +1 -1
- {ryry_cli-5.2 → ryry_cli-5.3}/LICENSE +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/README.md +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/__init__.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/daemon_base.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/daemon_manager.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/main.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/proxy_manager.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/ryry_service.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/ryry_widget.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/script_template/daemon.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/script_template/main.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/script_template/run.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/server_func.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/shared_memory.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/task.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/taskUtils.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry/utils.py +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-5.2 → ryry_cli-5.3}/setup.cfg +0 -0
|
@@ -155,7 +155,7 @@ def extend():
|
|
|
155
155
|
_genExtend()
|
|
156
156
|
elif read_data["extend"].get("device_id", "") != read_data.get("deviceInfo", {}).get("device_id", ""):
|
|
157
157
|
_genExtend()
|
|
158
|
-
elif read_data["extend"].get("app", "") == "ryry-cli 5.
|
|
158
|
+
elif read_data["extend"].get("app", "") == "ryry-cli 5.3":
|
|
159
159
|
_genExtend()
|
|
160
160
|
else:
|
|
161
161
|
_genExtend()
|
|
@@ -215,22 +215,6 @@ def ftpUpload(file, new_file_name, subdomain, upload_path=""):
|
|
|
215
215
|
import ftplib
|
|
216
216
|
while retry < 3:
|
|
217
217
|
try:
|
|
218
|
-
#如果ip是外网ip,并且在FTP_REPLACEMENT内有,则先替换成内网ip上传一次
|
|
219
|
-
if retry == 0 and "192.168" not in ip and ip in FTP_REPLACEMENT:
|
|
220
|
-
try:
|
|
221
|
-
local_network_config = DOMAIN_CONFIG[FTP_REPLACEMENT[ip]]["config"]
|
|
222
|
-
ftp = ftplib.FTP()
|
|
223
|
-
ftp.connect(local_network_config["host"], local_network_config["port"], timeout=5)
|
|
224
|
-
ftp.login(local_network_config["username"], local_network_config["password"])
|
|
225
|
-
if upload_path:
|
|
226
|
-
s = deepFtpUpload(file, new_file_name, ftp, upload_path, readpath)
|
|
227
|
-
else:
|
|
228
|
-
s = deepFtpUpload(file, new_file_name, ftp, writepath, readpath)
|
|
229
|
-
ftp.quit()
|
|
230
|
-
return s
|
|
231
|
-
except:
|
|
232
|
-
pass
|
|
233
|
-
|
|
234
218
|
if retry > 0:
|
|
235
219
|
has_bak = FTP_REPLACEMENT.get(ip, None)
|
|
236
220
|
if has_bak:
|
|
@@ -297,7 +281,7 @@ ftp_192_168_50_12={
|
|
|
297
281
|
"writepath" : "cache",
|
|
298
282
|
"readpath" : "ftp://219.136.123.179/mnt/NAS/mcn"
|
|
299
283
|
}
|
|
300
|
-
|
|
284
|
+
ftp_219_136_123_179={
|
|
301
285
|
"host" : "219.136.123.179",
|
|
302
286
|
"port": 2221,
|
|
303
287
|
"username" : "mcn",
|
|
@@ -345,11 +329,11 @@ def get_domain_config(target_domain):
|
|
|
345
329
|
|
|
346
330
|
DOMAIN_CONFIG = {
|
|
347
331
|
"192.168.50.12": {"type": "ftp", "config": ftp_192_168_50_12},
|
|
348
|
-
"219.136.123.179": {"type": "ftp", "config":
|
|
349
|
-
"183.6.90.205": {"type": "ftp", "config":
|
|
332
|
+
"219.136.123.179": {"type": "ftp", "config": ftp_219_136_123_179},
|
|
333
|
+
"183.6.90.205": {"type": "ftp", "config": ftp_219_136_123_179},
|
|
350
334
|
"ftp://192.168.50.12/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_192_168_50_12},
|
|
351
|
-
"ftp://183.6.90.205/mnt/NAS/mcn/cache": {"type": "ftp", "config":
|
|
352
|
-
"ftp://219.136.123.179/mnt/NAS/mcn/cache": {"type": "ftp", "config":
|
|
335
|
+
"ftp://183.6.90.205/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_219_136_123_179},
|
|
336
|
+
"ftp://219.136.123.179/mnt/NAS/mcn/cache": {"type": "ftp", "config": ftp_219_136_123_179},
|
|
353
337
|
"res.zjtemplate.com": {"type": "oss", "config": oss_res_config},
|
|
354
338
|
"upload.zjtemplate.com": {"type": "oss", "config": oss_upload_config},
|
|
355
339
|
"oss.zjtemplate.com": {"type": "oss", "config": oss_template_config},
|
|
@@ -360,16 +344,22 @@ DOMAIN_CONFIG = {
|
|
|
360
344
|
FTP_REPLACEMENT = {
|
|
361
345
|
"192.168.50.12": "219.136.123.179",
|
|
362
346
|
"219.136.123.179": "192.168.50.12",
|
|
347
|
+
"183.6.90.205": "219.136.123.179",
|
|
348
|
+
"183.6.90.205": "192.168.50.12",
|
|
363
349
|
}
|
|
364
350
|
|
|
365
351
|
SUBDOMAIN = {
|
|
352
|
+
"183.6.90.205": [
|
|
353
|
+
ftp_192_168_50_12,
|
|
354
|
+
ftp_219_136_123_179,
|
|
355
|
+
],
|
|
366
356
|
"219.136.123.179": [
|
|
367
357
|
ftp_192_168_50_12,
|
|
368
|
-
|
|
358
|
+
ftp_219_136_123_179,
|
|
369
359
|
],
|
|
370
|
-
"192.168.50.
|
|
360
|
+
"192.168.50.12": [
|
|
371
361
|
ftp_192_168_50_12,
|
|
372
|
-
|
|
362
|
+
ftp_219_136_123_179,
|
|
373
363
|
]
|
|
374
364
|
}
|
|
375
365
|
|
|
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
|