diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..15af1aa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.xpi diff --git a/README.md b/README.md new file mode 100644 index 0000000..332fb2a --- /dev/null +++ b/README.md @@ -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 + + diff --git a/data/bottombar.js b/data/bottombar.js new file mode 100644 index 0000000..caad7a9 --- /dev/null +++ b/data/bottombar.js @@ -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]); +} diff --git a/data/urls.txt b/data/urls.txt new file mode 100644 index 0000000..c462e28 --- /dev/null +++ b/data/urls.txt @@ -0,0 +1,2 @@ +LiteVault *.litevault.net vaultu7dxw5bbg37.onion +Facebook *.facebook.com facebookcorewwwi.onion diff --git a/index.js b/index.js new file mode 100644 index 0000000..a61c9d5 --- /dev/null +++ b/index.js @@ -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+"');" + }); +} + diff --git a/package.json b/package.json new file mode 100644 index 0000000..f85f4a8 --- /dev/null +++ b/package.json @@ -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" + ] +}