Skip to content

Commit

Permalink
Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
Someguy123 committed Apr 26, 2016
1 parent ffa1ecd commit 42a6707
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.xpi
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#HiddenEverywhere
An add-on to help TOR users find hidden services for ClearNet sites they use every day

Often, I tell people of [Facebook's hidden service](http://arstechnica.com/security/2014/10/facebook-offers-hidden-service-to-tor-users/) only to hear they didn't know. It's been around since 2014, offering TOR users additional security, compared to the Clearnet.

The most recent encounter with someone who actively used TOR for their daily activities had me think, "what if Firefox could tell you when a site you're using has a hidden service, even if you're stuck behind a Cloudflare Captcha?".

And thus, this extension was born. When you visit a site such as [LiteVault.net](https://www.litevault.net) or Facebook.com, the extension will inform you that you should be using the hidden service, with a direct link to it.

![Screenshot](https://i.imgur.com/g2UNL3c.png)

For your privacy, this extension makes NO HTTP REQUESTS, and it does not log your requests in any form. The extension checks against a local text file, containing a list of websites and their verified hidden services.


Install
=======
If you're just wanting to use the extension, you can grab the release from here:

[Github Release Download Link](https://github.com/Someguy123/HiddenEverywhere/releases)

If you're wanting to develop this extension, simply `git clone` the repo and:

npm install -g jpm # if you haven't already got JPM (firefox extension development)
jpm run # builds and runs the extension in a new Firefox profile

# if you want the XPI file to handle yourself
jpm xpi

New Domains
===========

To add a new domain, simply fork the repo, add it to `data/urls.txt` at the bottom of the list, and submit a pull request. It will be added ASAP.

The format is: TITLE URL-PATTERN ONION-URL

We only support the EXACT and WILDCARD matches in the [URL Pattern](https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/util_match-pattern)

License
=======
This extension is released under the MIT License, see LICENSE for more information.

Donations
=====
If this donation has helped you out, please donate!

BTC: 17PPTHmS8N34KYKdDc4Gn1psabteGS8EE3

LTC: LNWEjx3DKSAWKX5fkWfCwa2tWSQeo7ZmnR


27 changes: 27 additions & 0 deletions data/bottombar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// {TITLE} is the name of the service
// {HIDDEN} is the URL of the service, without http in front
var bar_text = "Good news! {TITLE} has a hidden service. Simply click the link (new tab): "
+ '<a style="color:#3cd81e" href="http://{HIDDEN}" target="_BLANK">{HIDDEN}</a>'
+ '<a style="text-align: right; float: right;" href="#" onClick="document.getElementById(\'hiddenservicebar\').remove();">Close</a>';

function showBar(title, hidden) {
var bar = document.createElement("div");
bar.id = "hiddenservicebar";
var replaced = bar_text.replace(/\{TITLE\}/g, title)
.replace(/\{HIDDEN\}/g, hidden);
// add the text to the bar
var bar_p = document.createElement("p");
bar_p.innerHTML = replaced;
bar_p.style.color = "rgb(221, 221, 221)";
bar.appendChild(bar_p);
// style the bar
bar.style.backgroundColor = "rgb(95, 51, 180)";
bar.style.width = "100%";
bar.style.position = "fixed";
bar.style.height = "35px";
bar.style.padding = "5px";
bar.style.top = "0";
bar.style.zIndex = 99999999;
// now inject it at the beginning of the document
document.body.insertBefore(bar,document.body.children[0]);
}
2 changes: 2 additions & 0 deletions data/urls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
LiteVault *.litevault.net vaultu7dxw5bbg37.onion
Facebook *.facebook.com facebookcorewwwi.onion
20 changes: 20 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var self = require("sdk/self");
var pageMod = require("sdk/page-mod");

// Load URL data from a flat txt file
var urls = self.data.load('urls.txt').trim().split('\n');
for(var url_index in urls) {
console.log(url);
var url = urls[url_index],
split_url = url.trim().split(' '),
match = split_url[1],
title = split_url[0],
hidden = split_url[2];

pageMod.PageMod({
include: match,
contentScriptFile: self.data.url("bottombar.js"),
contentScript: "showBar('"+title+"', '"+hidden+"');"
});
}

16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"title": "HiddenEverywhere",
"name": "hiddeneverywhere",
"version": "0.0.1",
"description": "An add-on to help TOR users find hidden services for ClearNet sites they use every day",
"main": "index.js",
"author": "Someguy123",
"engines": {
"firefox": ">=38.0a1",
"fennec": ">=38.0a1"
},
"license": "MIT",
"keywords": [
"jetpack"
]
}

0 comments on commit 42a6707

Please sign in to comment.