mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-22 14:17:16 +00:00
chg: [websockets client] bind client ip
This commit is contained in:
parent
1dfa796dca
commit
19969a02b2
2 changed files with 10 additions and 0 deletions
|
@ -20,6 +20,14 @@ sys.path.append(os.environ['AIL_BIN'])
|
|||
# Import Project packages
|
||||
##################################
|
||||
from core import ail_2_ail
|
||||
from lib.ConfigLoader import ConfigLoader
|
||||
|
||||
config_loader = ConfigLoader()
|
||||
local_addr = config_loader.get_config_str('AIL_2_AIL', 'local_addr')
|
||||
if not local_addr or local_addr == None:
|
||||
local_addr = None
|
||||
config_loader = None
|
||||
|
||||
|
||||
#### LOGS ####
|
||||
redis_logger = publisher
|
||||
|
@ -112,6 +120,7 @@ async def ail_to_ail_client(ail_uuid, sync_mode, api, ail_key=None, client_id=No
|
|||
async with websockets.connect(
|
||||
uri,
|
||||
ssl=ssl_context,
|
||||
local_addr=local_addr,
|
||||
#open_timeout=10, websockers 10.0 /!\ python>=3.7
|
||||
extra_headers={"Authorization": f"{ail_key}"}
|
||||
) as websocket:
|
||||
|
|
|
@ -60,6 +60,7 @@ DiffMaxLineLength = 10000
|
|||
[AIL_2_AIL]
|
||||
server_host = 0.0.0.0
|
||||
server_port = 4443
|
||||
local_addr =
|
||||
|
||||
#### Modules ####
|
||||
[BankAccount]
|
||||
|
|
Loading…
Reference in a new issue