Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@ The Proxy is a modern version of Interstellar, but since release everything has
- Geforce NOW Support

### Install Instructions
```git clone https://github.com/zgr2575/SlowGuardian```

`git clone https://github.com/zgr2575/SlowGuardian`
<br>
```cd SlowGuardian```
`cd SlowGuardian`
<br>
```npm install```
`npm install`
<br>
```npm start```
`npm start`

Updating
```cd SlowGuardian```
```git pull --force --allow-unrelated-histories```

`cd SlowGuardian`
`git pull --force --allow-unrelated-histories`

---

TO UPDATE OR DO ANYTHING ON REPLIT, PLEASE REFFER TO OLD INSTRUCTON ON THE V7
LONG TERM SUPPORT BRANCH, WE NOW SUPPORT EVERYTHING. REPLIT DEVELOPMENT DISCONTINUED

Expand Down
79 changes: 40 additions & 39 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ const server = http.createServer();
const app = express(server);
const bareServer = createBareServer("/o/");
const PORT = process.env.PORT || 8080;
var v = config.version;
var upd = false;
const v = config.version;
let upd = false;
import readline from "readline";
import { exec } from "node:child_process";
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(cors());
Expand All @@ -25,7 +26,7 @@ if (config.routes !== false) {
{ path: "/s", file: "settings.html" },
{ path: "/p", file: "go.html" },
{ path: "/li", file: "login.html" },
{ path: "/tos", file: "tos.html" }
{ path: "/tos", file: "tos.html" },
];

routes.forEach((route) => {
Expand All @@ -34,43 +35,45 @@ if (config.routes !== false) {
});
});
}
var serverid = Math.floor(Math.random() * 101);
const serverid = Math.floor(Math.random() * 101);

var db=
let db =
"server: Smarter Back End v5" +
" | version: " +
v +
" | update available: " +
upd +
"| server uptime:" +
process.uptime() +
" | server memory: " +
process.memoryUsage().heapUsed / 1024 / 1024 +
" | serverid: " +
serverid +
" | server identity: " +
"could not get";
app.get("/d/data", (req, res, next) => {
console.log(
"[SMARTERBACKEND]: SERVER DATA HAS BEEN REQUESTED | STATUS: PACKAGING",
);
db =
"server: Smarter Back End v5" +
" | version: " +
v +
" | update avalible: " +
" | update available: " +
upd +
"| server uptime:" +
"| server uptime: " +
process.uptime() +
" | server memory: " +
process.memoryUsage().heapUsed / 1024 / 1024 +
"serverid: " +
" | serverid: " +
serverid +
"server identity: " +
"could not get";
app.get("/d/data", (req, res, next) => {
console.log("[SMARTERBACKEND]: SERVER DATA HAS BEEN REQUESTED | STATUS: PACKAGING");
db =
"server: Smarter Back End v5" +
" | version: " +
v +
" | update avalible: " +
upd +
"| server uptime:" +
process.uptime() +
" | server memory: " +
process.memoryUsage().heapUsed / 1024 / 1024 +
" serverid: " +
serverid +
" server identity: " +
"SG SERVER"
;
console.log("[SMARTERBACKEND]: SERVER DATA HAS BEEN PACKAGED | STATUS: PACKAGED, SENDING");
res.send(db);
console.log("[SMARTERBACKEND]: SERVER DATA HAS BEEN SENT | STATUS: SENT");

" server identity: " +
"SG SERVER";
console.log(
"[SMARTERBACKEND]: SERVER DATA HAS BEEN PACKAGED | STATUS: PACKAGED, SENDING",
);
res.send(db);
console.log("[SMARTERBACKEND]: SERVER DATA HAS BEEN SENT | STATUS: SENT");
});
if (config.local !== false) {
app.get("/e/*", (req, res, next) => {
Expand Down Expand Up @@ -111,7 +114,7 @@ server.on("upgrade", (req, socket, head) => {
fetch("https://raw.githubusercontent.com/zgr2575/SlowGuardian/main/version.txt")
.then((response) => response.text())
.then((data) => {
console.log("[SLOWGUARDIAN]: CURRENT VERSION: " + data);
console.log("[SLOWGUARDIAN]: CURRENT VERSION: " + data);
if (v == parseInt(data)) {
console.log("[SLOWGUARDIAN]: UP TO DATE");
upd = true;
Expand All @@ -132,9 +135,8 @@ fetch("https://raw.githubusercontent.com/zgr2575/SlowGuardian/main/version.txt")
}
console.log(`Update: ${stdout}`);
});
}
else {
conosle.log("Okay, exiting...");
} else {
console.log("Okay, exiting...");
process.exit(0);
}
rl.close();
Expand Down Expand Up @@ -183,10 +185,9 @@ if (config.challenge) {
}
// -------------------------

server.on("listening", () => {
console.log(`[SBE]: LISTENING ON PORT ${PORT}`);
});

server.on("listening", () => {
console.log(`[SBE]: LISTENING ON PORT ${PORT}`);
});

server.listen({
port: PORT,
Expand Down
78 changes: 39 additions & 39 deletions static/assets/scripts/h.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,52 @@
let inFrame
let inFrame;

try {
inFrame = window !== top
inFrame = window !== top;
} catch (e) {
inFrame = true
inFrame = true;
}

if (!inFrame && !navigator.userAgent.includes("Firefox")) {
const popup = open("about:blank", "_blank")
const popup = open("about:blank", "_blank");
if (!popup || popup.closed) {
alert("Please allow popups and redirects.")
alert("Please allow popups and redirects.");
} else {
const doc = popup.document
const iframe = doc.createElement("iframe")
const style = iframe.style
const link = doc.createElement("link")
const doc = popup.document;
const iframe = doc.createElement("iframe");
const style = iframe.style;
const link = doc.createElement("link");

const name = localStorage.getItem("name") || "My Drive - Google Drive"
const icon = localStorage.getItem("icon") || "https://ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png"
const name = localStorage.getItem("name") || "My Drive - Google Drive";
const icon =
localStorage.getItem("icon") ||
"https://ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png";

doc.title = name
link.rel = "icon"
link.href = icon
doc.title = name;
link.rel = "icon";
link.href = icon;

iframe.src = location.href
style.position = "fixed"
style.top = style.bottom = style.left = style.right = 0
style.border = style.outline = "none"
style.width = style.height = "100%"
iframe.src = location.href;
style.position = "fixed";
style.top = style.bottom = style.left = style.right = 0;
style.border = style.outline = "none";
style.width = style.height = "100%";

doc.head.appendChild(link)
doc.body.appendChild(iframe)
doc.head.appendChild(link);
doc.body.appendChild(iframe);

const pLink = localStorage.getItem(encodeURI("pLink")) || "https://www.nasa.gov/"
location.replace(pLink)
const pLink =
localStorage.getItem(encodeURI("pLink")) || "https://www.nasa.gov/";
location.replace(pLink);

const script = doc.createElement("script")
const script = doc.createElement("script");
script.textContent = `
window.onbeforeunload = function (event) {
const confirmationMessage = 'Leave Site?';
(event || window.event).returnValue = confirmationMessage;
return confirmationMessage;
};
`
doc.head.appendChild(script)
`;
doc.head.appendChild(script);
}
}
// Particles
Expand Down Expand Up @@ -158,24 +161,21 @@ document.addEventListener("DOMContentLoaded", function (event) {
},
},
retina_detect: true,
}
particlesJS("particles-js", particlesConfig)
};
particlesJS("particles-js", particlesConfig);
}
})
});
// Splash
let SplashT = [
"SlowGuardian will be back next year!",
let SplashT = ["SlowGuardian will be back next year!"];

];

let SplashI = Math.floor(Math.random() * SplashT.length)
const SplashE = document.getElementById("splash")
let SplashI = Math.floor(Math.random() * SplashT.length);
const SplashE = document.getElementById("splash");

function US() {
SplashI = (SplashI + 1) % SplashT.length
SplashE.innerText = SplashT[SplashI]
SplashI = (SplashI + 1) % SplashT.length;
SplashE.innerText = SplashT[SplashI];
}

SplashE.innerText = SplashT[SplashI]
SplashE.innerText = SplashT[SplashI];

SplashE.addEventListener("click", US)
SplashE.addEventListener("click", US);
Loading