diff --git a/files/wstunnel-client b/files/wstunnel-client index 260dc4c..39eca2e 100755 --- a/files/wstunnel-client +++ b/files/wstunnel-client @@ -52,7 +52,7 @@ TLS_CERTIFICATE="" TLS_PRIVATE_KEY="" DNS_RESOLVER=() DNS_RESOLVER_PREFER_IPV4="" -REVERSE_RECONNECT_MAX_DELAY="" +REVERSE_TUNNEL_CONNECTION_RETRY_MAX_BACKOFF="" # Function to trim whitespace trim() { @@ -179,8 +179,8 @@ while IFS='=' read -r key value; do dns_resolver_prefer_ipv4) DNS_RESOLVER_PREFER_IPV4="$value" ;; - reverse_reconnect_max_delay) - REVERSE_RECONNECT_MAX_DELAY="$value" + reverse_tunnel_connection_retry_max_backoff) + REVERSE_TUNNEL_CONNECTION_RETRY_MAX_BACKOFF="$value" ;; esac done < "$CONFIG_FILE" @@ -223,7 +223,7 @@ done [ -n "$HTTP_HEADERS_FILE" ] && CMD+=("--http-headers-file" "$HTTP_HEADERS_FILE") [ -n "$TLS_CERTIFICATE" ] && CMD+=("--tls-certificate" "$TLS_CERTIFICATE") [ -n "$TLS_PRIVATE_KEY" ] && CMD+=("--tls-private-key" "$TLS_PRIVATE_KEY") -[ -n "$REVERSE_RECONNECT_MAX_DELAY" ] && CMD+=("--reverse-reconnect-max-delay" "$REVERSE_RECONNECT_MAX_DELAY") +[ -n "$REVERSE_TUNNEL_CONNECTION_RETRY_MAX_BACKOFF" ] && CMD+=("--reverse-tunnel-connection-retry-max-backoff" "$REVERSE_TUNNEL_CONNECTION_RETRY_MAX_BACKOFF") for resolver in "${DNS_RESOLVER[@]}"; do CMD+=("--dns-resolver" "$resolver") done diff --git a/files/wstunnel.conf b/files/wstunnel.conf index fee9fcd..6f3f2e1 100644 --- a/files/wstunnel.conf +++ b/files/wstunnel.conf @@ -158,6 +158,8 @@ websocket_ping_frequency = 30s ; Prefer IPv4 over IPv6 for DNS resolution (useful for broken IPv6 connections) ; dns_resolver_prefer_ipv4 = false -; Exponential backoff for the delay between reconnect attempts -; The maximum reconnect delay -; reverse_reconnect_max_delay = 1s +; When using reverse tunnel, the client will try to always keep a connection to the server to await for new tunnels +; This delay is the maximum of time the client will wait before trying to reconnect to the server in case of failure +; The client follows an exponential backoff strategy until it reaches this maximum delay +; By default, the client tries to reconnect every 1 second +; reverse_tunnel_connection_retry_max_backoff = 1s diff --git a/package.yml b/package.yml index 7d8afc2..2d5fcfe 100644 --- a/package.yml +++ b/package.yml @@ -1,6 +1,6 @@ name : wstunnel version : 10.3.0 -release : 4 +release : 5 source : - https://github.com/erebe/wstunnel/archive/refs/tags/v10.3.0.tar.gz : ede8dfb23fbab3ed5090a256ea79290c036b04e3312b8ad487d47bc5e71ff570 homepage : https://github.com/erebe/wstunnel