adjust ovpn template, adjust skip criteria

This commit is contained in:
2024-10-30 23:36:50 -05:00
parent 389f35323d
commit 9b65844a6a
2 changed files with 8 additions and 6 deletions

View File

@@ -114,14 +114,15 @@ if not os.path.exists(TEMP_OVPN_DIR):
# Process each server
server_count = len(servers)
for index, server in enumerate(servers):
# Check if the server uses OpenVPN TCP Dedicated technology
# Check if the server uses OpenVPN TCP technology
technologies = server.get('technologies', [])
skip_server = any(tech.get('identifier') == 'openvpn_dedicated_tcp' for tech in technologies)
has_openvpn_tcp = any(tech.get('identifier') == 'openvpn_tcp' for tech in technologies)
has_openvpn_dedicated_tcp = any(tech.get('identifier') == 'openvpn_dedicated_tcp' for tech in technologies)
technologies_str = ', '.join([t.get('identifier', 'N/A') for t in technologies]) # Get technologies as a string
if skip_server:
if not has_openvpn_tcp or has_openvpn_dedicated_tcp:
server_name = server.get('hostname')
debug_print(f"{datetime.datetime.now()} [{index+1}/{server_count}] [{server_name}]: Skipping OpenVPN TCP Dedicated server. Technologies: {technologies_str}")
print(f"{datetime.datetime.now()} [{index+1}/{server_count}] [{server_name}]: Skipping server without OpenVPN TCP or with OpenVPN Dedicated TCP. Technologies: {technologies_str}")
continue # Skip to the next server
server_name = server.get('hostname')

View File

@@ -15,12 +15,13 @@ persist-tun
connect-retry-max 1
reneg-sec 0
comp-lzo no
data-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305
verify-x509-name CN={server_cn}
remote-cert-tls server
auth-user-pass
auth-nocache # Add auth-nocache here
verb 3
pull
cipher AES-256-CBC
auth SHA512
<ca>
-----BEGIN CERTIFICATE-----