unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] www: give tor2web some exposure, too
@ 2016-08-23 21:31 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-08-23 21:31 UTC (permalink / raw)
  To: meta

Not everybody can run Tor, hopefully more can use Tor2web
even if it compromises their privacy.  This should help
make system more resilient for users unable to use Tor.
---
 lib/PublicInbox/WwwStream.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index c89e6de..dfbcf41 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -8,6 +8,7 @@ use warnings;
 use PublicInbox::Hval qw(ascii_html);
 use URI;
 our $TOR_URL = 'https://www.torproject.org/';
+our $TOR2WEB_URL = 'https://www.tor2web.org/';
 our $CODE_URL = 'https://public-inbox.org/';
 our $PROJECT = 'public-inbox';
 
@@ -96,6 +97,10 @@ sub _html_end {
 	if ($urls =~ m!\b[^:]+://\w+\.onion/!) {
 		$urls .= "\n note: .onion URLs require Tor: ";
 		$urls .= qq[<a\nhref="$TOR_URL">$TOR_URL</a>];
+		if ($TOR2WEB_URL) {
+			$urls .= "\n       or Tor2web: ";
+			$urls .= qq[<a\nhref="$TOR2WEB_URL">$TOR2WEB_URL</a>];
+		}
 	}
 	my $url = PublicInbox::Hval::prurl($ctx->{env}, $CODE_URL);
 	'<hr><pre>'.join("\n\n",
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-23 21:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 21:31 [PATCH] www: give tor2web some exposure, too Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).