From: Koushk Roy Date: Mon, 1 Jun 2020 04:28:54 +0000 (-0700) Subject: Allow option to force ipv4 X-Git-Tag: v2.7.10~7^2 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=345b1efd480972459be1e569b242647d03d808db;p=elpher.git Allow option to force ipv4 --- diff --git a/elpher.el b/elpher.el index f2ea987..09fdb6f 100644 --- a/elpher.el +++ b/elpher.el @@ -152,6 +152,11 @@ the time when the text is rendered." "Specify the name of the file where elpher bookmarks will be saved." :type '(file)) +(defcustom elpher-force-ipv4 nil + "If non-nil, force elpher to use ipv4 instead of trying an ipv6 address +and falling back to an ipv4 address" + :type '(boolean)) + ;; Face customizations (defgroup elpher-faces nil @@ -576,7 +581,7 @@ to ADDRESS." (progn (message "Disabling TLS mode.") (setq elpher-use-tls nil) - (elpher-get-selector address renderer)) + (elpher-get-selector address renderer elpher-force-ipv4)) (elpher-network-error address "Could not establish encrypted connection"))) ('connect (elpher-process-cleanup) @@ -640,7 +645,7 @@ once they are retrieved from the gopher server." (elpher-with-clean-buffer (insert "LOADING... (use 'u' to cancel)\n")) (condition-case the-error - (elpher-get-selector address renderer) + (elpher-get-selector address renderer elpher-force-ipv4) (error (elpher-network-error address the-error)))))) @@ -813,7 +818,7 @@ The response is rendered using the rendering function RENDERER." (elpher-with-clean-buffer (insert "LOADING RESULTS... (use 'u' to cancel)")) - (elpher-get-selector search-address renderer)) + (elpher-get-selector search-address renderer elpher-force-ipv4)) (if aborted (elpher-visit-previous-page))))))