tengo un problema extraño con el navegador Tor y Violentmonkey,
este guión:
// ==UserScript== // @name New script // @namespace Violentmonkey Scripts // @match https://example.org/ // @grant GM_xmlhttpRequest // @run-at document-end // @version 1.0 // @author - // @description 4/18/2022, 4:00:43 PM // ==/UserScript== "use strict"; try { (function() { "use strict"; GM_xmlhttpRequest({ method: "GET", synchronous: false, url: "http://127.0.0.1/", onload: function() { alert("loaded!"); }, onerror: function(err) { alert("GM_xmlhttpRequest error"); console.log(err); } }); })(); } catch (ex) { alert("greasemonkey crashed! " + ex); }funciona bien en Firefox, pero en el navegador Tor, el "onload" nunca se llama, y el "onerror" se llama con este objeto
{ "finalUrl": "http://127.0.0.1/", "responseHeaders": "", "readyState": 4, "status": 0, "statusText": "", "response": "", "responseText": "", "lengthComputable": false, "loaded": 0, "total": 0 }y no hay error en la consola, y la solicitud http real nunca se envía ... y el argumento onerror no parece contener ninguna información útil sobre por qué falló la solicitud. esto sucede con "NoScript"+"HTTPS Everywhere" habilitado y deshabilitado (no hay diferencia)... de ahí la pregunta, ¿cómo cargo localhost con GM_xmlhttpRequest en el navegador TOR?