Make preference for IPv6 when IP: :: more explicit for OBP
This commit is contained in:
parent
423bb3e5cd
commit
497fa3143a
@ -333,7 +333,10 @@ def build_config(_config_file):
|
|||||||
try:
|
try:
|
||||||
|
|
||||||
if CONFIG['SYSTEMS'][section]['IP'] == '::':
|
if CONFIG['SYSTEMS'][section]['IP'] == '::':
|
||||||
addr_info = socket.getaddrinfo(CONFIG['SYSTEMS'][section]['TARGET_IP'],CONFIG['SYSTEMS'][section]['TARGET_PORT'],socket.AF_UNSPEC, socket.IPPROTO_IP)
|
try:
|
||||||
|
addr_info = socket.getaddrinfo(CONFIG['SYSTEMS'][section]['TARGET_IP'],CONFIG['SYSTEMS'][section]['TARGET_PORT'],socket.AF_INET6, socket.IPPROTO_IP)
|
||||||
|
except gaierror:
|
||||||
|
addr_info = socket.getaddrinfo(CONFIG['SYSTEMS'][section]['TARGET_IP'],CONFIG['SYSTEMS'][section]['TARGET_PORT'],socket.AF_INET, socket.IPPROTO_IP)
|
||||||
|
|
||||||
elif CONFIG['SYSTEMS'][section]['IP'] and IsIPv6Address(CONFIG['SYSTEMS'][section]['IP']):
|
elif CONFIG['SYSTEMS'][section]['IP'] and IsIPv6Address(CONFIG['SYSTEMS'][section]['IP']):
|
||||||
addr_info = socket.getaddrinfo(CONFIG['SYSTEMS'][section]['TARGET_IP'],CONFIG['SYSTEMS'][section]['TARGET_PORT'],socket.AF_INET6, socket.IPPROTO_IP)
|
addr_info = socket.getaddrinfo(CONFIG['SYSTEMS'][section]['TARGET_IP'],CONFIG['SYSTEMS'][section]['TARGET_PORT'],socket.AF_INET6, socket.IPPROTO_IP)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.7-alpine
|
aplFROM python:3.7-alpine
|
||||||
|
|
||||||
COPY entrypoint-proxy /entrypoint
|
COPY entrypoint-proxy /entrypoint
|
||||||
|
|
||||||
|
@ -11,3 +11,4 @@ services:
|
|||||||
- '62045-62049:62045-62049/udp'
|
- '62045-62049:62045-62049/udp'
|
||||||
- '4321:4321/tcp'
|
- '4321:4321/tcp'
|
||||||
image: 'hacknix/freedmr:latest'
|
image: 'hacknix/freedmr:latest'
|
||||||
|
restart: "unless-stopped"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user