RootedGlobal/node-casperjs-aws-lambda

how can I use proxy

francoismartin opened this issue · 1 comments

Hi,

How can I use a proxy with casperjs and your project ?

I try :


function runCasper(scriptName, callback) {
    var casperPath = path.join(__dirname, 'node_modules', 'casperjs', 'bin', 'casperjs') +" --proxy=ip:port--proxy-auth=user:pwd"; // TRY HERE
    var outputData = [];
    var error = null;
    var childArgs = [
        path.join(__dirname, scriptName),
       "--proxy=ip:port--proxy-auth=user:pwd" // < AND HERE
    ];
    var childOptions = {
        'PHANTOMJS_EXECUTABLE': getPhantomFileName()
    };
    
}

But It didn't work

Thanks

I found, I forget the space between " and --proxy=ip:port--proxy-auth=user:pwd

So the exact setence is

var childArgs = [
        path.join(__dirname, scriptName),
       " --proxy=ip:port--proxy-auth=user:pwd"
];