This commit is contained in:
Tim Speckhals 2018-10-02 19:31:00 +02:00
parent 6c83345b25
commit 0dcb939b33
No known key found for this signature in database
GPG Key ID: A62ADB92F7ADEEB6
8 changed files with 109 additions and 19 deletions

View File

@ -64,5 +64,14 @@
},
"blockedSubtitle": {
"message": "Falls du nicht möchtest, dass Universal Bypass deine IP vor bösen Leuten schützt, deaktivere das in den Optionen:"
},
"crowdBypassed": {
"message": "Du musst vielleicht nicht warten!"
},
"crowdBypassedInfo": {
"message": "Andere Universal Bypass-Nutzer haben bereits für dich gewartet und gemeldet, dass das zu % führt."
},
"crowdBypassedIgnore": {
"message": "Was this not correct?"
}
}

View File

@ -64,5 +64,14 @@
},
"blockedSubtitle": {
"message": "If you don't want Universal Bypass to prevent bad actors from getting your IP, disable this in the options:"
},
"crowdBypassed": {
"message": "You might not have to wait!"
},
"crowdBypassedInfo": {
"message": "Other Universal Bypass users have already waited for you and reported that this leads to %"
},
"crowdBypassedIgnore": {
"message": "Was this not correct?"
}
}

View File

@ -64,5 +64,14 @@
},
"blockedSubtitle": {
"message": "Als u uw ip niet wilt omzeilen, schakel dit dan uit in de opties:"
},
"crowdBypassed": {
"message": "U hoeft misschien niet te wachten!"
},
"crowdBypassedInfo": {
"message": "Andere Universal Bypass-gebruikers hebben al aangegeven dat dit aan % ligt"
},
"crowdBypassedIgnore": {
"message": "Klopt dit niet?"
}
}

View File

@ -5,6 +5,22 @@ chrome.runtime.onInstalled.addListener(details=>{
})
chrome.runtime.setUninstallURL("https://goo.gl/forms/H8FswYQ2a37LSxc13")
//Bypasses of sites specifying the destination in the query
chrome.webRequest.onBeforeRequest.addListener(details=>{
if(details.method=="GET"&&details.type=="main_frame")
return{redirectUrl:decodeURIComponent(details.url.substr(details.url.indexOf("url=")+4))}
},{urls:["*://*.ourl.io/*url=*"]},["blocking"])
chrome.webRequest.onBeforeRequest.addListener(details=>{
if(details.method=="GET"&&details.type=="main_frame")
return{redirectUrl:decodeURIComponent(details.url.substr(details.url.indexOf("link=")+5))}
},{urls:["*://*.spaste.com/r/*link=*"]},["blocking"])
//Cheap trick
chrome.webRequest.onBeforeRequest.addListener(details=>{
if(details.method=="GET"&&details.type=="main_frame")
return{redirectUrl:chrome.runtime.getURL("html/crowd-bypassed.html")+details.url.substr(43)}
},{urls:["https://universal-bypass.org/crowd/bypassed?*"]},["blocking"])
//Disableable Tracker Bypass using api.hell.sh. Privacy Policy: https://hell.sh/privacy
var trackerBypassEnabled=true,blockIPLoggers=true,resolveDestination=url=>{
let xhr=new XMLHttpRequest(),destination
@ -81,14 +97,6 @@ chrome.webRequest.onBeforeRequest.addListener(details=>{
if(blockIPLoggers)
return{redirectUrl:chrome.extension.getURL("/html/blocked.html")}
},{urls:getIPLoggerPatterns()},["blocking"])
chrome.webRequest.onBeforeRequest.addListener(details=>{
if(details.method=="GET"&&details.type=="main_frame")
return{redirectUrl:decodeURIComponent(details.url.substr(details.url.indexOf("url=")+4))}
},{urls:["*://*.ourl.io/*url=*"]},["blocking"])
chrome.webRequest.onBeforeRequest.addListener(details=>{
if(details.method=="GET"&&details.type=="main_frame")
return{redirectUrl:decodeURIComponent(details.url.substr(details.url.indexOf("link=")+5))}
},{urls:["*://*.spaste.com/r/*link=*"]},["blocking"])
function getIPLoggerPatterns()
{
let patterns=[],

View File

@ -45,11 +45,34 @@ if(document instanceof HTMLDocument)
func()
else document.addEventListener("DOMContentLoaded",()=>sT(func,1))
},
contributeAndSafelyNavigate=target=>{
crowdBypass=callback=>ensureDomLoaded(()=>{
if(location.href.substr(location.href.length-18)=="#ignoreCrowdBypass")
{
let fs=document.querySelectorAll("form[action]")
for(let i=0;i<fs.length;i++)
fs[i].action+="#ignoreCrowdBypass"
let ls=document.querySelectorAll("a[href]")
for(let i=0;i<ls.length;i++)
ls[i].href+="#ignoreCrowdBypass"
callback()
return
}
let xhr=new XMLHttpRequest()
xhr.onreadystatechange=()=>{
if(xhr.readyState==4&&xhr.status==200&&xhr.responseText!="")
location.href="https://universal-bypass.org/crowd/bypassed?target="+encodeURIComponent(xhr.responseText)+"&back="+encodeURIComponent(location.href)
else if(document.querySelector("body[data-crowd-bypass-opt-in]")||!document.querySelector("body[data-crowd-bypass-opt-out]"))
callback()
}
xhr.open("POST","https://universal-bypass.org/crowd/query_v1",true)
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
xhr.send("domain="+encodeURIComponent(domain)+"&path="+encodeURIComponent(location.pathname.toString().substr(1)))
}),
contributeAndNavigate=target=>{
let xhr=new XMLHttpRequest()
xhr.onreadystatechange=()=>{
if(xhr.readyState==4)
safelyNavigate(target)
location.href=target
}
xhr.open("POST","https://universal-bypass.org/crowd/contribute_v1",true)
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
@ -493,11 +516,7 @@ if(document instanceof HTMLDocument)
if(url.search&&url.search.indexOf("url="))
safelyNavigate(decodeURIComponent(url.search.split("url=")[1].split("&")[0]))
}
}
else
{
if(document.querySelector("body[data-crowd-bypass-opt-in]")||!document.querySelector("body[data-crowd-bypass-opt-out]"))
{
else crowdBypass(()=>{
let tI=setInterval(()=>{
let a=document.querySelector("a.get-link[href]")
if(!a)
@ -506,10 +525,10 @@ if(document instanceof HTMLDocument)
{
clearInterval(tI)
a.parentNode.removeChild(a)
contributeAndSafelyNavigate(a.href)
contributeAndNavigate(a.href)
}
},50)
}
})
}
}
xhr.open("GET",(location.pathname+"/info").replace("//","/"),true)
@ -788,7 +807,7 @@ if(document instanceof HTMLDocument)
},500)
})
},//
//This method of injecting the script seems to be the fastest (faster than uBlockOrigin — which is crucial)
//This method of injecting the script is faster than any interfering extensions in most cases
injectScript=text=>{
let script=document.createElement("script")
script.innerHTML=text

18
html/crowd-bypassed.html Normal file
View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title data-message="crowdBypassed"></title>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 data-message="crowdBypassed"></h1>
<p data-message="crowdBypassedInfo"></p>
<br>
<p><a id="ignore" href="#" data-message="crowdBypassedIgnore"></a></p>
<hr>
<p>Copyright (c) 2018, <a href="https://hellsh.com" target="_blank">Hellsh</a></p>
<script src="translations.js"></script>
<script src="crowd-bypassed.js"></script>
</body>
</html>

18
html/crowd-bypassed.js Normal file
View File

@ -0,0 +1,18 @@
let object={},searchArr=window.location.search.toString().replace("?", "").split("&")
for(let i in searchArr)
{
let varArr=searchArr[i].split("="),key=decodeURIComponent(varArr[0])
if(key=="")
continue
object[key]=(varArr.length==2?decodeURIComponent(varArr[1]):"")
}
if(object&&object.target&&object.back)
{
let i=document.querySelector('[data-message="crowdBypassedInfo"]')
i.innerHTML=i.innerHTML.replace("%",'<a></a>');
let a=i.querySelector("a")
a.setAttribute("target","_blank")
a.href=a.textContent=object.target
document.getElementById("ignore").href=object.back+"#ignoreCrowdBypass"
}
else history.back()

View File

@ -10,7 +10,7 @@
"name": "Universal Bypass",
"description": "__MSG_appDesc__",
"homepage_url": "https://universal-bypass.org/",
"version": "6.0.1",
"version": "6.1",
"author": "timmyRS",
"minimum_chrome_version": "41",
"options_ui": {