From 9cfd57dee469a045b68a20cae9ce4cf279ce1043 Mon Sep 17 00:00:00 2001 From: Aaron Lewis Date: Fri, 25 Jan 2019 10:19:53 +0800 Subject: [PATCH] add console to vmcontext --- lib/pac-file-tester.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pac-file-tester.js b/lib/pac-file-tester.js index 1fa679c..c4f4b5d 100644 --- a/lib/pac-file-tester.js +++ b/lib/pac-file-tester.js @@ -44,6 +44,8 @@ module.exports = { // Taken from the Mozilla PAC file parser (https://dxr.mozilla.org/mozilla/source/netwerk/base/src/nsProxyAutoConfig.js) var myIp = module.exports.ip var context = vm.createContext({ + console: console, + myIpAddress: function(){ return myIp },