From b3e1dc1799b811b2cb5ac5c82142597f05911db5 Mon Sep 17 00:00:00 2001 From: Simon Nicolussi Date: Sun, 4 Oct 2020 18:34:28 +0200 Subject: [PATCH] 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). --- elpher.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) -- 2.20.1