tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

crossorigin.sub.js (883B)


      1 var httpHostMain = '{{domains[]}}'; //name of the server that this page must accessed over port 80
      2 var httpHostAlias = '{{domains[www]}}'; //another hostname (must be a subdomain so document.domain can be set to a higher domain) that accesses the same content, over HTTP
      3 var httpsHostAlias = httpHostAlias; //another hostname (can be same as httpHostAlias) that accesses the same content, over HTTPS port
      4 var httpPortAlias = {{ports[http][0]}}; //another port that accesses the same content on the current hostname, over HTTP
      5 //XXX HTTPS
      6 //var httpsPortAlias = ports[https][0]; //another port that accesses the same content on the httpsHostAlias, over HTTPS
      7 var httpsPortAlias = 8443;
      8 
      9 function crossOriginUrl(subdomain, relative_url) {
     10  var a = document.createElement("a");
     11  a.href = relative_url;
     12  return a.href.replace(location.href.replace("://", "://" + subdomain + "."));
     13 }