Explorar o código

references 'granax' to comply with licensing requirements

Zachary Boyd %!s(int64=6) %!d(string=hai) anos
pai
achega
a9e8baa27f
Modificáronse 3 ficheiros con 7 adicións e 23 borrados
  1. 5 0
      CHANGELOG.md
  2. 1 1
      package.json
  3. 1 22
      src/default_config.js

+ 5 - 0
CHANGELOG.md

@@ -1,5 +1,10 @@
 # Changelog
 
+## [4.0.3] - 2018-09-15
+
+### Changed
+- References granax in `default_config.js` to comply with licensing requirements.
+
 ## [4.0.2] - 2018-09-15
 
 ### Added

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "tor-router",
-  "version": "4.0.2",
+  "version": "4.0.3",
   "main": "src/index.js",
   "repository": "git@github.com:znetstar/tor-router.git",
   "author": "Zachary Boyd <zachary@zacharyboyd.nyc>",

+ 1 - 22
src/default_config.js

@@ -21,28 +21,7 @@ module.exports = {
 		"Log": "notice stdout",
 		"NewCircuitPeriod": "10"
 	},
-	"torPath": (() => {
-	  let platform = require('os').platform();
-	  let BIN_PATH = path.join(__dirname, '..', 'node_modules', 'granax', 'bin');
-		/**
-		 * @author gordonhall on GitLab <https://bit.ly/2xcahjY>
-		 */
-	  switch (platform) {
-	    case 'win32':
-	      return path.join(BIN_PATH, 'Browser', 'TorBrowser', 'Tor', 'tor.exe');
-	      break;
-	    case 'darwin':
-	      return path.join(BIN_PATH, '.tbb.app', 'Contents', 'Resources',
-	                          'TorBrowser', 'Tor', 'tor');
-	      break;
-	    case 'android':
-	    case 'linux':
-	      return path.join(BIN_PATH, 'tor-browser_en-US', 'Browser', 'TorBrowser', 'Tor', 'tor');
-	      break;
-	    default:
-	      return "tor"; 
-	  }
-	})(),
+	"torPath": require('granax').tor(require('os').platform()),
 	"instances": null,
 	"dns": {
 		"timeout": 10000,