adjust vpn config, adjust retry config

This commit is contained in:
2024-09-12 19:59:25 -05:00
parent 5b0c2c9038
commit 00d63eebd6
3 changed files with 5 additions and 10 deletions

View File

@@ -170,7 +170,6 @@ for index, server in enumerate(servers):
print(f"{datetime.datetime.now()} [{index+1}/{server_count}] [{server_name}]: VPN connection failed to establish.")
else:
print(f"{datetime.datetime.now()} [{index+1}/{server_count}] [{server_name}]: Error starting OpenVPN connection: {connection_message}")
# Disconnect VPN
disconnect_vpn()
print(f"{datetime.datetime.now()} [{index+1}/{server_count}] [{server_name}]: VPN disconnected.")

View File

@@ -17,8 +17,7 @@ def establish_vpn_connection(ovpn_file, credential_file, log_file, debug_print=N
# Establish VPN connection (capture stdout and stderr)
openvpn_command = ["/usr/sbin/openvpn", "--config", ovpn_file,
"--auth-user-pass", credential_file,
"--verb", "1"]
"--auth-user-pass", credential_file, "--verb", "1"]
if debug_print:
debug_print(f"OpenVPN command: {' '.join(openvpn_command)}") # Debug print

View File

@@ -4,7 +4,7 @@ client
dev tun
proto tcp
remote {server_ip} 443
resolv-retry infinite
resolv-retry 3
remote-random
nobind
tun-mtu 1500
@@ -12,9 +12,7 @@ tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ping 15
ping-restart 0
ping-timer-rem
connect-retry-max 1
reneg-sec 0
comp-lzo no
verify-x509-name CN={server_cn}
@@ -22,7 +20,6 @@ remote-cert-tls server
auth-user-pass
verb 3
pull
fast-io
cipher AES-256-CBC
auth SHA512
<ca>