user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] www: give tor2web some exposure, too
@ 2016-08-23 21:31  7% Eric Wong
  0 siblings, 0 replies; 1+ results
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	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-08-23 21:31  7% [PATCH] www: give tor2web some exposure, too Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).