From: Simon Nicolussi Date: Sun, 4 Oct 2020 16:34:28 +0000 (+0200) Subject: Provide an option to visit clearnet sites over Tor X-Git-Tag: v3.0.0~22^2~50 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=b3e1dc1799b811b2cb5ac5c82142597f05911db5;p=elpher.git Provide an option to visit clearnet sites over Tor Simply reuse the mechanism to access onion services, with all of its disadvantages (e.g., connections are opened synchronously). --- diff --git a/elpher.el b/elpher.el index 2a7648b..e1a2192 100644 --- a/elpher.el +++ b/elpher.el @@ -179,6 +179,11 @@ This can be useful when browsing from a computer that supports IPv6, because some servers which do not support IPv6 can take a long time to time-out." :type '(boolean)) +(defcustom elpher-socks-always nil + "If non-nil, elpher will establish network connections over a SOCKS proxy. +Otherwise, the SOCKS proxy is only used for connections to onion services." + :type '(boolean)) + ;; Face customizations (defgroup elpher-faces nil @@ -623,7 +628,7 @@ the host operating system and the local network capabilities." (port (elpher-address-port address)) (service (if (> port 0) port default-port)) (host (elpher-address-host address)) - (socks (string-suffix-p ".onion" host)) + (socks (or elpher-socks-always (string-suffix-p ".onion" host))) (response-string-parts nil) (bytes-received 0) (hkbytes-received 0)