From c639877531eb2d3dda401fd40409c554d452efe1 Mon Sep 17 00:00:00 2001 From: TheEmeraldStarr <46467239+Epicloudygamer@users.noreply.github.com> Date: Sat, 3 Oct 2020 20:24:46 -0700 Subject: [PATCH] Cookie Auth --- public/b.html | 31 +++++++++++-------------------- public/expr/load.js | 10 +++++----- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/public/b.html b/public/b.html index d9c1e23f..d6f6e3e9 100644 --- a/public/b.html +++ b/public/b.html @@ -75,36 +75,27 @@
-
+

Node Unblocker

A flexible secondary proxy compared to Alloy, PM and PD.

-
diff --git a/public/expr/load.js b/public/expr/load.js index 4b4ae760..5d3bc2e5 100644 --- a/public/expr/load.js +++ b/public/expr/load.js @@ -8,23 +8,23 @@ function $(id) { $('nprox').onclick = function() { document.cookie = 'nu_auth=yes; expires=' + (Date.now() + 259200) + '; sameSite=none; domain=.' + auth + '; path=/; secure;'; - return false; + return true; }; $('pdprox').onclick = function() { document.cookie = 'pd_auth=yes; expires=' + (Date.now() + 259200) + '; sameSite=none; domain=.' + auth + '; path=/; secure;'; - return false; + return true; }; $('pmprox').onclick = function() { document.cookie = 'pm_auth=yes; expires=' + (Date.now() + 259200) + '; sameSite=none; domain=.' + auth + '; path=/; secure;'; - return false; + return true; }; // AL Auth $('al').onclick = function() { document.cookie = 'al_auth=yes; expires=' + (Date.now() + 259200) + '; sameSite=none; domain=.' + auth + '; path=/; secure;'; - return false; + return true; }; // Cookie Auth @@ -34,7 +34,7 @@ if (host.length == 3) { auth = `${host[1]}.${host[2]}`; } -Array.from(document.getElementsByTagName('button')).forEach(e => { +Array.from(document.getElementById('auth')).forEach(e => { e.addEventListener('click', () => { document.cookie = 'session; max-age=259200; sameSite=lax; domain=' + auth + '; path=/; secure;'; });