From 2a9ef4c27e0a0faf5401af8eb0cfd6586c17263e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?youngchief=20btw=20=E3=83=84?= <33383463+youngchief-btw@users.noreply.github.com> Date: Fri, 17 Apr 2020 17:34:09 +0000 Subject: [PATCH] Initial Commit --- LICENSE.txt | 1 + ListOfInstances.txt | 4 ++++ README.md | 29 +++++++++++++++++++++++++++++ package.json | 14 ++++++++++++++ robots.txt | 2 ++ src/ProxyChief.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 92 insertions(+) create mode 100644 LICENSE.txt create mode 100644 ListOfInstances.txt create mode 100644 README.md create mode 100644 package.json create mode 100644 robots.txt create mode 100644 src/ProxyChief.js diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..fa86dfc --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1 @@ +© 2020 youngchief btw ツ, All rights reserved. \ No newline at end of file diff --git a/ListOfInstances.txt b/ListOfInstances.txt new file mode 100644 index 0000000..afda9cf --- /dev/null +++ b/ListOfInstances.txt @@ -0,0 +1,4 @@ +https://proxychief.glitch.me:443/ +https://proxychief.glitch.me:3000/ +http://proxychief.glitch.me:3000/ +https://proxychief.now.sh:443/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1ea6200 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# ProxyChief + +--- + +**Made by [youngchief btw ツ](https://github.com/youngchief-btw), with ❤️** + +--- + +**This proxy is made to be the very best, and is super lightweight.** + +--- + +**_Access using any of these [URLs](/ListOfInstances.txt)_** + +--- + +Format for entries: `protocol://domain:port/` + +`protocol` is `http` or `https`. + +`domain` is the domain (subdomains count as their own different domain) or IP. + +`port` is the port it is running (make a new entry for each port). + +--- + +Run your own instance: + +Run `wget -O proxychief.zip https://github.com/youngchief-btw/ProxyChief/archive/master.zip` (I recommend doing `git clone https://github.com/youngchief-btw/ProxyChief.git` instead to pull in the latest changes) \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..f7c5e62 --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "engines": { + "node": "12.x" + }, + "main": "node src/ProxyChief", + "scripts": { + "start": "node src/ProxyChief.js" + }, + "dependencies": { + "express": "^4.17.1", + "unblocker": "^2.0.5", + "http-proxy": "^1.18.0" + } +} \ No newline at end of file diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..77470cb --- /dev/null +++ b/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file diff --git a/src/ProxyChief.js b/src/ProxyChief.js new file mode 100644 index 0000000..d7436bf --- /dev/null +++ b/src/ProxyChief.js @@ -0,0 +1,42 @@ +/* + * ProxyChief + * © 2020 youngchief btw ツ, All rights reserved. + */ +const https = require("https"); +const http = require("http"); +const fs = require("fs"); +const Unblocker = require("unblocker"); +const unblocker = Unblocker({}); +const express = require("express"); +const app = express(); +const httpProxy = require("http-proxy"); +var proxy = httpProxy.createProxyServer({}); + +function miniCPU() { + // This function lowers memory, disk?, and CPU on request + process.exit(); + process.kill(); + process.abort(); +} + +// http.createServer(app).listen(80); +// https.createServer(null, app).listen(443); + +// this must be one of the first app.use() calls and must not be on a subdirectory to work properly +app.use(new Unblocker({ prefix: "/proxy/" })); +app.get("/proxy/", function(req, res) { + miniCPU(); +}); + +app.get("/", function(req, res) { + res.send( + '

ProxyChief

Proxy Format: /proxy/SITE-TO-VISIT

Made by youngchief btw ツ, with ❤️


This proxy is made to be the very best, and is super lightweight.


Access using any of these URLs

' + ); +}); + +app.listen(8080); + +// app.listen = function() { +// var server = http.createServer(this); +// return server.listen.apply(server, arguments); +// };