Closed webaddicto closed 7 years ago
Found the Javascript code that checks the window location and redirects to the main site (jumping outside the proxy), here it is:
if (typeof window.isIframe == 'undefined' && top.location.host != 'www.site.com') {
top.location.host = 'www.site.com';
}
And another one:
var dm=document.location.hostname.toLowerCase(),dr='elgoog',dl='oohay';
dr = dr.split('').reverse().join('');
if (dm.indexOf(dr) < 0) top.location = "//" + dl.split('').reverse().join('') + ".com/?s";
And another one:
if(["site1.com","site2.com"].indexOf(document.location.hostname)==-1 || window.self!==window.top){window.top.location.replace("https://site2.com/");};
A simple fix would be to create a plugin that removes all scripts on that sites, i.e:
$output = preg_replace('/<script.*?<\/script>/sm', '', $output);
I was testing a few sites and noticed that if I browse with the proxy porntube.com or baidu.com then the addressbar of the web browser is changed to the proxied website (i.e baidu.com). Looks like an anti-proxy js script or similar. Seems like if it "jumps" outside the proxy.