GitHub Action
commited on
Commit
·
9dfa634
1
Parent(s):
9d5b735
Sync from GitHub with Git LFS
Browse files- agents/config.yml +2 -2
- agents/examples/config.yml +2 -2
- agents/init.py +4 -2
agents/config.yml
CHANGED
@@ -22,11 +22,11 @@ dht_update: true # Регулярные обновления и
|
|
22 |
bootstrap_responder: true # Агент отвечает на bootstrap-запросы (включено принудительно!)
|
23 |
|
24 |
# Список "protocol://IP:port" которые слушает агент, protocol может быть tcp, utp или any - tcp+utp
|
25 |
-
|
26 |
- "tcp://95.80.96.17:4000"
|
27 |
- "utp://195.112.230.165:4000"
|
28 |
- "any://[201:ab61:1403:b973:909c:ef3:26b8:49c2]:4000"
|
29 |
-
|
30 |
- "any://192.168.0.10:4000"
|
31 |
- "any://192.168.1.10:4000"
|
32 |
- "any://127.0.0.1:4000"
|
|
|
22 |
bootstrap_responder: true # Агент отвечает на bootstrap-запросы (включено принудительно!)
|
23 |
|
24 |
# Список "protocol://IP:port" которые слушает агент, protocol может быть tcp, utp или any - tcp+utp
|
25 |
+
global_addresses: # глобальные адреса
|
26 |
- "tcp://95.80.96.17:4000"
|
27 |
- "utp://195.112.230.165:4000"
|
28 |
- "any://[201:ab61:1403:b973:909c:ef3:26b8:49c2]:4000"
|
29 |
+
local_addresses: # локальные адреса
|
30 |
- "any://192.168.0.10:4000"
|
31 |
- "any://192.168.1.10:4000"
|
32 |
- "any://127.0.0.1:4000"
|
agents/examples/config.yml
CHANGED
@@ -22,11 +22,11 @@ dht_update: true # Регулярные обновления и
|
|
22 |
bootstrap_responder: true # Агент отвечает на bootstrap-запросы (включено принудительно!)
|
23 |
|
24 |
# Список "protocol://IP:port" которые слушает агент, protocol может быть tcp, utp или any - tcp+utp
|
25 |
-
|
26 |
- "tcp://95.80.96.17:4000"
|
27 |
- "utp://195.112.230.165:4000"
|
28 |
- "any://[201:ab61:1403:b973:909c:ef3:26b8:49c2]:4000"
|
29 |
-
|
30 |
- "any://192.168.0.10:4000"
|
31 |
- "any://192.168.1.10:4000"
|
32 |
- "any://127.0.0.1:4000"
|
|
|
22 |
bootstrap_responder: true # Агент отвечает на bootstrap-запросы (включено принудительно!)
|
23 |
|
24 |
# Список "protocol://IP:port" которые слушает агент, protocol может быть tcp, utp или any - tcp+utp
|
25 |
+
global_addresses: # глобальные адреса
|
26 |
- "tcp://95.80.96.17:4000"
|
27 |
- "utp://195.112.230.165:4000"
|
28 |
- "any://[201:ab61:1403:b973:909c:ef3:26b8:49c2]:4000"
|
29 |
+
local_addresses: # локальные адреса
|
30 |
- "any://192.168.0.10:4000"
|
31 |
- "any://192.168.1.10:4000"
|
32 |
- "any://127.0.0.1:4000"
|
agents/init.py
CHANGED
@@ -110,8 +110,10 @@ def init_config_table(storage, config):
|
|
110 |
flat_config = {k: v for k, v in config.items() if k not in exclude_keys}
|
111 |
|
112 |
# 🟢 разворачиваем any:// только для addresses
|
113 |
-
if "
|
114 |
-
flat_config["
|
|
|
|
|
115 |
|
116 |
for key, value in flat_config.items():
|
117 |
storage.set_config(key, json.dumps(value))
|
|
|
110 |
flat_config = {k: v for k, v in config.items() if k not in exclude_keys}
|
111 |
|
112 |
# 🟢 разворачиваем any:// только для addresses
|
113 |
+
if "local_addresses" in flat_config:
|
114 |
+
flat_config["local_addresses"] = expand_addresses(flat_config["local_addresses"])
|
115 |
+
if "global_addresses" in flat_config:
|
116 |
+
flat_config["global_addresses"] = expand_addresses(flat_config["global_addresses"])
|
117 |
|
118 |
for key, value in flat_config.items():
|
119 |
storage.set_config(key, json.dumps(value))
|