how to configure FoxyProxy for localhost correctly?

An error occurred http://prntscr.com/9m1pwu which I can't solve. That I use a server-node js the simplest serverok in which the request handlers are my piece of code

var taskpath = __dirname + '/public/task.json';
app.post('/task',function(req, res){
 var readable = fs.createReadStream(taskpath);
 readable.pipe(res);
});

On the client greasemonkey Sample script:

$(document).ready(function() {
var t = {};
GM_xmlhttpRequest({
  method: 'POST',
  url: 'http://localhost:7575/task',
  onload: function(data) {
    var json_text = JSON.stringify(data.response, null, 2),
      your_object = JSON.parse(json_text);

    var href = $('#guide-channels').find('li:contains(' + your_object[0].task[0].channel + ')').find('a').attr('href'),
      videos = 'http://www.youtube.com' + href + '/videos',
      channel = {};
      channel['channel'] = videos;
    GM_xmlhttpRequest({
      method: 'POST',
      data: JSON.stringify(channel),
      contentType: 'application/json',
      url: 'http://localhost:8081/getHttp',
      onload: function(xhr) {
        console.log('xhr__', xhr.responseText);
      }
    });
   }
 });
});

Everything works without a proxy, and an error occurs when installing a proxy. I think that you need a setting that I do not know. How to make friends with a proxy and localhost?

Tell me where to dig

Author: little_boy, 2016-01-04

1 answers

As I understand it, FoxyProxy is just a switch between proxy servers. It is not a proxy server itself. Judging by the error in the screenshot, the request goes to localhost: 8081 waiting for a proxy server, and you do not have it installed, or port 8081 is closed by a firewall.

 1
Author: Андрей Козлов, 2016-01-04 19:07:24