use PublicInbox::Hval qw(ascii_html);
use URI;
use constant PI_URL => 'https://public-inbox.org/';
+our $TOR_URL = 'https://www.torproject.org/';
sub close {}
chop $http;
my %seen = ( $http => 1 );
my @urls = ($http);
+ my $need_tor;
foreach my $u (@{$obj->cloneurl}) {
next if $seen{$u};
+ $need_tor = 1 if $u =~ m!\A[^:]+://\w+\.onion/!;
$seen{$u} = 1;
push @urls, $u =~ /\Ahttps?:/ ? qq(<a\nhref="$u">$u</a>) : $u;
}
$urls .= "\n" .
join("\n", map { "\tgit clone --mirror $_" } @urls);
}
+
+ if ($need_tor) {
+ $urls .= "\n note: .onion URLs require Tor: ";
+ $urls .= qq[<a\nhref="$TOR_URL">$TOR_URL</a>];
+ }
my $url = PublicInbox::Hval::prurl($ctx->{env}, PI_URL);
- '<hr><pre>'.join("\n",
- '- ' . $desc,
+ '<hr><pre>'.join("\n\n",
+ $desc,
$urls,
'Served with public-inbox: '.
- qq(git clone <a\nhref="$url">$url</a> public-inbox),
+ qq(git clone <a\nhref="$url">$url</a> public-inbox)
).'</pre></body></html>';
}