0

I have a CasperJS Script duolingo.js and I run the script using a MeteorJS App using a Meteor Method like this:

// define server methods so that the clients will have access to server components
Meteor.methods({
  runCasperJS: function() {
    // This method call won't return immediately, it will wait for the
    // asynchronous code to finish, so we call unblock to allow this client
    // to queue other method calls (see Meteor docs)
    this.unblock();
    // run synchonous system command
    var result = process_exec_sync('casperjs duolingo.js --engine=slimerjs --disk-cache=no --proxy=178.166.41.225:80 --proxy-type=HTTP');
    // check for error
    if (result.error) {
      throw new Meteor.Error("exec-fail", "Error running CasperJS: " + result.error.message);
    }
    // success
    return true;
  }
});

I need to run the CasperJS Instance using a proxy IP V6. But I don't have any idea, the official documentations of slimerjs and casperjs did not say anything. Here is the exact part of the code where I use an IP V4 Proxy.

  var result = process_exec_sync('casperjs duolingo.js 
--engine=slimerjs --disk-cache=no --proxy=178.166.41.225:80 
--proxy-type=HTTP');

Thank you for your time and help.

Gerardo Cordero
  • 164
  • 4
  • 14

0 Answers0