Last active
July 5, 2023 12:38
Revisions
-
Auax revised this gist
Jul 5, 2023 . 1 changed file with 50 additions and 33 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,49 +2,66 @@ // @name ThePirateBay-Block-Redirect // @namespace http://tampermonkey.net/ // @version 0.1 // @description If The Pirate Bay is blocked in your country, launch a croxyproxy instance and bypass it! // @author Auax // @match https://thepiratebay.org/ // @icon https://www.google.com/s2/favicons?sz=64&domain=thepiratebay.org // @grant GM_xmlhttpRequest // ==/UserScript== (function () { 'use strict'; if (!window.onload) { let repeatRequest = true; let repeatCount = 0; const maxAttempts = 10; function makeRequest() { // Try random server ID const serverID = Math.floor(Math.random() * 41) + 100; GM_xmlhttpRequest({ method: 'POST', url: 'https://www.croxyproxy.com/requests?fso=', headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'Accept-Language': 'en-US,en;q=0.5', 'Content-Type': 'application/x-www-form-urlencoded', 'Upgrade-Insecure-Requests': '1', 'Sec-Fetch-Dest': 'document', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-Site': 'same-origin', 'Sec-GPC': '1' }, referrer: 'https://www.croxyproxy.com/servers', data: `url=thepiratebay.org&proxyServerId=${serverID}&demo=0&frontOrigin=https%3A%2F%2Fwww.croxyproxy.com`, onload: function (response) { if (response.status !== 500) { repeatRequest = false; const reURL = response.finalUrl; if (reURL.trim().length !== 0) { window.location.href = reURL; } } repeatCount++; console.warn(`Server ID ${serverID} didn't work! Retrying...`); if (repeatRequest && repeatCount < maxAttempts) { setTimeout(makeRequest, 1000); } }, onerror: function (error) { console.error(error); repeatCount++; console.error(`Request failed for Server ID ${serverID}! Retrying...`); if (repeatRequest && repeatCount < maxAttempts) { setTimeout(makeRequest, 1000); } } }); } makeRequest(); } })(); -
Auax revised this gist
Jul 3, 2023 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,7 +46,5 @@ console.error(error); } }); } })(); -
Auax revised this gist
Jul 3, 2023 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,8 +14,6 @@ (function () { 'use strict'; if (!window.onload) { // Make a request to load the website GM_xmlhttpRequest({ method: 'POST', -
Auax revised this gist
Jul 3, 2023 . No changes.There are no files selected for viewing
-
Auax revised this gist
Jul 3, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ // @name ThePirateBay-Block-Redirect // @namespace http://tampermonkey.net/ // @version 0.1 // @description Bypass imposed blocks to thepiratebay.org website by redirecting you to a CroxyProxy url. // @author Auax // @match https://thepiratebay.org/ // @icon https://www.google.com/s2/favicons?sz=64&domain=thepiratebay.org -
Auax created this gist
Jul 3, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ // ==UserScript== // @name ThePirateBay-Block-Redirect // @namespace http://tampermonkey.net/ // @version 0.1 // @description If thepiratebay is blocked in your country, launch a croxyproxy instance and bypass this! // @author Auax // @match https://thepiratebay.org/ // @icon https://www.google.com/s2/favicons?sz=64&domain=thepiratebay.org // @grant GM_xmlhttpRequest // ==/UserScript== (function () { 'use strict'; if (!window.onload) { // Define the URL you want to load // Make a request to load the website GM_xmlhttpRequest({ method: 'POST', url: 'https://www.croxyproxy.com/requests?fso=', headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', 'Accept-Language': 'en-US,en;q=0.5', 'Content-Type': 'application/x-www-form-urlencoded', 'Upgrade-Insecure-Requests': '1', 'Sec-Fetch-Dest': 'document', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-Site': 'same-origin', 'Sec-GPC': '1' }, referrer: 'https://www.croxyproxy.com/servers', data: 'url=thepiratebay.org&proxyServerId=154&demo=0&frontOrigin=https%3A%2F%2Fwww.croxyproxy.com', onload: function (response) { // Handle the response here console.log(response); const reURL = response.finalUrl; console.log(reURL); if (reURL.trim().length !== 0) { window.location.href = reURL; } }, onerror: function(error) { // Handle any errors here console.error(error); } }); } })();