diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 35c3f63bd0..7c954268f8 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -692,6 +692,15 @@ gruntConfig = { pathsFromDevBuild: ['lib/simple-socks', 'lib/churn-pipe', 'lib/loggingprovider'] pathsFromThirdPartyBuild: ['freedom-port-control'] localDestPath: 'lib/samples/simple-socks-firefoxapp/data/' + libsForSimpleSocksNode: + Rule.copyLibs + npmLibNames: ['freedom-for-node'] + pathsFromDevBuild: ['lib/simple-socks', 'lib/churn-pipe', 'lib/loggingprovider'] + pathsFromThirdPartyBuild: [ + 'uproxy-obfuscators' + 'freedom-port-control' + ] + localDestPath: 'lib/samples/simple-socks-node/' libsForSimpleChatChromeApp: Rule.copyLibs @@ -1068,6 +1077,7 @@ taskManager.add 'simpleSocks', [ 'browserify:simpleSocksFreedomModule' 'copy:libsForSimpleSocksChromeApp' 'copy:libsForSimpleSocksFirefoxApp' + 'copy:libsForSimpleSocksNode' ] taskManager.add 'uprobe', [ diff --git a/src/lib/samples/simple-socks-node/index.js b/src/lib/samples/simple-socks-node/index.js new file mode 100644 index 0000000000..c6d023e533 --- /dev/null +++ b/src/lib/samples/simple-socks-node/index.js @@ -0,0 +1,10 @@ +var freedom = require('freedom-for-node'); + +freedom.freedom('./lib/simple-socks/freedom-module.json', { + 'logger': './lib/loggingprovider/freedom-module.json', + 'debug': 'debug' +}).then(function(moduleFactory) { + moduleFactory(); +}, function(e) { + console.error('could not load freedomjs module: ' + e.message); +});