ddns 4.0.0b3__tar.gz → 4.0.0b4__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.
Potentially problematic release.
This version of ddns might be problematic. Click here for more details.
- {ddns-4.0.0b3 → ddns-4.0.0b4}/PKG-INFO +1 -1
- {ddns-4.0.0b3 → ddns-4.0.0b4}/ddns.egg-info/PKG-INFO +1 -1
- {ddns-4.0.0b3 → ddns-4.0.0b4}/dns/dnspod.py +4 -3
- {ddns-4.0.0b3 → ddns-4.0.0b4}/run.py +8 -6
- {ddns-4.0.0b3 → ddns-4.0.0b4}/setup.py +1 -1
- {ddns-4.0.0b3 → ddns-4.0.0b4}/util/cache.py +2 -3
- {ddns-4.0.0b3 → ddns-4.0.0b4}/LICENSE +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/README.md +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/ddns.egg-info/SOURCES.txt +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/ddns.egg-info/dependency_links.txt +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/ddns.egg-info/entry_points.txt +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/ddns.egg-info/top_level.txt +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/dns/__init__.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/dns/alidns.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/dns/callback.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/dns/cloudflare.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/dns/dnscom.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/dns/dnspod_com.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/dns/he.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/dns/huaweidns.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/setup.cfg +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/util/__init__.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/util/config.py +0 -0
- {ddns-4.0.0b3 → ddns-4.0.0b4}/util/ip.py +0 -0
|
@@ -106,10 +106,11 @@ def get_domain_id(domain):
|
|
|
106
106
|
return get_domain_id.domain_list[domain]
|
|
107
107
|
else:
|
|
108
108
|
try:
|
|
109
|
-
|
|
110
|
-
except Exception:
|
|
109
|
+
d_info = request('Domain.Info', domain=domain)
|
|
110
|
+
except Exception as e:
|
|
111
|
+
info("get_domain_id(%s) error: %s", domain, e)
|
|
111
112
|
return
|
|
112
|
-
did =
|
|
113
|
+
did = d_info.get("domain", {}).get("id")
|
|
113
114
|
if did:
|
|
114
115
|
get_domain_id.domain_list[domain] = did
|
|
115
116
|
return did
|
|
@@ -19,7 +19,7 @@ from util import ip
|
|
|
19
19
|
from util.cache import Cache
|
|
20
20
|
from util.config import init_config, get_config
|
|
21
21
|
|
|
22
|
-
__version__ = "v4.0.0-
|
|
22
|
+
__version__ = "v4.0.0-beta4@2025-06-10T17:58:37+00:00" # CI 时会被Tag替换
|
|
23
23
|
__description__ = "automatically update DNS records to dynamic local IP [自动更新DNS记录指向本地IP]"
|
|
24
24
|
__doc__ = """
|
|
25
25
|
ddns[%s]
|
|
@@ -28,7 +28,7 @@ ddns[%s]
|
|
|
28
28
|
Copyright (c) New Future (MIT License)
|
|
29
29
|
""" % (__version__)
|
|
30
30
|
|
|
31
|
-
environ["DDNS_VERSION"] = "v4.0.0-
|
|
31
|
+
environ["DDNS_VERSION"] = "v4.0.0-beta4"
|
|
32
32
|
|
|
33
33
|
if getattr(sys, 'frozen', False):
|
|
34
34
|
# https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OpenSSL-Certificate
|
|
@@ -153,7 +153,7 @@ def main():
|
|
|
153
153
|
if cache is False:
|
|
154
154
|
info('Cache is disabled!')
|
|
155
155
|
elif not get_config('config_modified_time') or get_config('config_modified_time') >= cache.time:
|
|
156
|
-
warning('Cache file is
|
|
156
|
+
warning('Cache file is outdated.')
|
|
157
157
|
cache.clear()
|
|
158
158
|
else:
|
|
159
159
|
debug('Cache is empty.')
|
|
@@ -162,8 +162,10 @@ def main():
|
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
if __name__ == '__main__':
|
|
165
|
-
|
|
165
|
+
encoding = sys.stdout.encoding
|
|
166
|
+
if encoding is not None and encoding.lower() != 'utf-8':
|
|
167
|
+
# 兼容windows 和部分ASCII编码的老旧系统
|
|
166
168
|
from io import TextIOWrapper
|
|
167
|
-
sys.stdout = TextIOWrapper(sys.stdout.
|
|
168
|
-
sys.stderr = TextIOWrapper(sys.stderr.
|
|
169
|
+
sys.stdout = TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
170
|
+
sys.stderr = TextIOWrapper(sys.stderr.buffer, encoding='utf-8')
|
|
169
171
|
main()
|
|
@@ -38,7 +38,7 @@ elif 'BUILD_SOURCEBRANCHNAME' in environ:
|
|
|
38
38
|
elif 'GITHUB_REF_NAME' in environ: # github actions
|
|
39
39
|
ref = environ['GITHUB_REF_NAME']
|
|
40
40
|
if ref == 'master' or ref == 'main': # CI
|
|
41
|
-
version = '
|
|
41
|
+
version = '4.0.b' + str(int(time()))
|
|
42
42
|
elif ref.startswith('v') or ref.startswith('V'): # Tag
|
|
43
43
|
version = ref
|
|
44
44
|
else: # PR
|
|
@@ -11,10 +11,9 @@ from time import time
|
|
|
11
11
|
|
|
12
12
|
from logging import info, debug, warning
|
|
13
13
|
|
|
14
|
-
try:
|
|
14
|
+
try: # python 3
|
|
15
15
|
from collections.abc import MutableMapping
|
|
16
|
-
except ImportError:
|
|
17
|
-
# Python 2 imports
|
|
16
|
+
except ImportError: # python 2
|
|
18
17
|
from collections import MutableMapping
|
|
19
18
|
|
|
20
19
|
|
|
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
|