mirror of
https://github.com/NewFuture/DDNS.git
synced 2026-10-21 09:50:26 +00:00
add 'none' in config.json - index(4,6)
This commit is contained in:
@@ -87,6 +87,7 @@ python run.py -c /path/to/config.json
|
||||
* `default` 系统访问外网默认IP
|
||||
* `public`使用公网ip(使用公网API查询)
|
||||
* `nku` NKU网关ip(只支持ipv4)
|
||||
* `none` 不更新ipv4/ipv6的DNS解析
|
||||
|
||||
### 配置示例
|
||||
```json
|
||||
|
||||
@@ -62,7 +62,9 @@ def get_ip(ip_type):
|
||||
get IP address
|
||||
"""
|
||||
index = get_config('index' + ip_type) or "default"
|
||||
if str(index).isdigit(): # local eth
|
||||
if index == 'none':
|
||||
return None
|
||||
elif str(index).isdigit(): # local eth
|
||||
value = getattr(ip, "local_v" + ip_type)(index)
|
||||
elif any((c in index) for c in '*.:'): # regex
|
||||
value = getattr(ip, "regex_v" + ip_type)(index)
|
||||
|
||||
Reference in New Issue
Block a user