From e3b4d116df41222a5e1e9886eb8b81ada68e8830 Mon Sep 17 00:00:00 2001 From: QuiteAFancyEmerald Date: Thu, 12 Nov 2020 20:44:18 +0000 Subject: [PATCH] Some optimization changes. --- app.js | 57 ++++++++------- views/error.html | 177 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+), 25 deletions(-) create mode 100644 views/error.html diff --git a/app.js b/app.js index 4498b6ff..1474d5db 100644 --- a/app.js +++ b/app.js @@ -3,8 +3,33 @@ /* MIT license: http://opensource.org/licenses/MIT /* ----------------------------------------------- */ -const - express = require('express'), + const[express,alloy,http,fs,path,char_insert]=[require('express'),require('alloyproxy'),require('http'),require('fs'),require('path'),require('./src/charinsert.js')],[app,config]=[express(),JSON.parse(fs.readFileSync('./config.json',{encoding:'utf8'}))],server=http.createServer(app),localprox=new alloy({prefix:'/fetch/',request:[],response:[],injection:!0}); + +app.use(localprox.app); + +localprox.ws(server); + +//Cloudflare Attack Mode Fix + +app.post('/', async(req, res) => { + switch (req.url) { + case '/': + return res.send(fs.readFileSync(path.join(__dirname, 'views', 'index.html'), 'utf8')); + } +}); + +//Querystring Navigation + +app.get('/', async(req, res, t) => res.send(fs.readFileSync(path.join(__dirname, 'views', 'pages,index.html,info.html,archive,archive,hidden.html'.split(',')['/,/?in,/?fg,/?rr,/?j'.split(',').indexOf(req.url) + 1], ',surf.html,f.html,run.html,frames,redirects3,proxnav5,nav7'.replace(/,[^,]+/g, e => ([] + e.match(/\D+/)).repeat(+e.match(/\d+/) + 1)).split(',')[t = 'z,fg,rr,k,dd,n,yh,ym,a,b,y,e,d,p,c,f,g,h,i,m,t,x'.split(',').indexOf(req.url.slice(2)) + 1], (t = ',,,,krunker,discordprox,chatbox,ythub,ytmobile,alloy,node,youtube,pydodge,discordhub,pmprox,credits,flash,gtools,games5,icons,gba,terms,bookmarklets'.split(',')[t]) && t + '.html'), 'utf8'))); + +app.use(char_insert.static(path.join(__dirname, 'views'))); + +server.listen(process.env.PORT || config.port); + +/* +// Easier to read version of app.js. Remove this if you would like an optimized version + + const express = require('express'), alloy = require('alloyproxy'), app = express(), http = require('http'), @@ -19,30 +44,15 @@ const config = JSON.parse(fs.readFileSync('./config.json', { const server = http.createServer(app); //Local Alloy Proxy -const unblocker = new alloy({ + +const localprox = new alloy({ prefix: '/fetch/', + error: (proxy) => { return proxy.res.send(fs.readFileSync(path.join(__dirname, 'views', 'error.html'), 'utf8'));}, request: [], response: [], - injection: true, + injection: true }); -app.use(unblocker.app); - -unblocker.ws(server); - -//Cloudflare Attack Mode Fix - -app.post('/', async(req, res) => { - switch (req.url) { - case '/': - return res.send(fs.readFileSync(path.join(__dirname, 'views', 'index.html'), 'utf8')); - } -}); - -//Querystrings -app.get('/', async(req, res, t) => res.send(fs.readFileSync(path.join(__dirname, 'views', 'pages,index.html,info.html,archive,archive,hidden.html'.split(',')['/,/?in,/?fg,/?rr,/?j'.split(',').indexOf(req.url) + 1], ',surf.html,f.html,run.html,frames,redirects3,proxnav5,nav7'.replace(/,[^,]+/g, e => ([] + e.match(/\D+/)).repeat(+e.match(/\d+/) + 1)).split(',')[t = 'z,fg,rr,k,dd,n,yh,ym,a,b,y,e,d,p,c,f,g,h,i,m,t,x'.split(',').indexOf(req.url.slice(2)) + 1], (t = ',,,,krunker,discordprox,chatbox,ythub,ytmobile,alloy,node,youtube,pydodge,discordhub,pmprox,credits,flash,gtools,games5,icons,gba,terms,bookmarklets'.split(',')[t]) && t + '.html'), 'utf8'))); - -/* app.get('/', async (req, res) => { const path = require("path"); //Use this for path. @@ -196,7 +206,4 @@ app.get('/', async (req, res) => { return res.send(fs.readFileSync(path.join(__dirname, 'views', 'hidden.html'), 'utf8')) } -}); */ -app.use(char_insert.static(path.join(__dirname, 'views'))); - -server.listen(process.env.PORT || config.port); \ No newline at end of file +}); */ \ No newline at end of file diff --git a/views/error.html b/views/error.html new file mode 100644 index 00000000..91161fde --- /dev/null +++ b/views/error.html @@ -0,0 +1,177 @@ + + + + + + + + H​oly Unb​loc​ke​r + + + + + + + + + + + + + + + + + + + + + + Boost your confidence in the kitchen with our trusted tips, tricks and expert advice to master the basics and build upon your existing cooking skills and knowledge. + + +
+
+ + + + Sous Vide is a cooking method that came from a French term that means under pressure. In the process, food is sealed in an airtight bag made from plastic material. The food is then cooked in the water longer than the usual cooking time. This can be done in meats and vegetables through precisely regulated temperature, which is much lower than usually used for cooking. The temperature normally ranges from 120 deg to 160 deg depending of desired doneness. This method is intentionally done so that meats and vegetables are cooked evenly without overcooking the outside portion while keeping the food's inside portion properly done as well as keeping its juiciness. There are several ways how the Sous Vide method can be used in our property whether or not using a Sous Vide machine. The Sous Vide method is a practice that has been used in many fine-dining restaurants with famous chefs. However, this kind of cooking method is now being used for home cooking because available solutions are now increasing its availability in the market. . For home use, applying the Sous Vide method can be done even without using a Sous Vide machine. A submersion heater can be used as an alternative, which goes into a pot with almost full of water. The heater will create some air bubbles that will circulate the heat within the pot. This method works like a Sous Vide machine in which the heat will slowly go into the food's inner portion making it well-done inside and out. The Sous Vide technique can be used at home. People will be able to enjoy the same doneness without leaving their property. At home, an improvised Sous Vide technique can be done using immersion circulators together with water that is temperature-controlled are the basic tools that are needed. Also, Sous Vide cooking can be done using a ziplock bag, stove, pot, and digital thermometer so that your Sous Vide style cooking can be accomplished. This cooking technique is also the answer for home chefs who are on a budget. My opinion is that cooking is the best hobby to have, because it can be very useful in life. Cooking is my hobby and has been for several years. I was about five years old, when I started learning how to cook. Cooking is something that I inherited from my grandmother; my grandmother was a professional chef and owned her own restaurant, where I learned how to cook. After I finish getting my nursing and business degree’s I would like to go to culinary school like my grandmother, and open my own restaurant, or become a culinary professor, and share my love of cooking with someone who shares the same passion for cooking as I do. There are so many reasons I love to cook, cooking is one of those things that just comes naturally for me, and I think I inherited, because I can cook almost anything and nail it on the first try, much like my grandmother. But the main reason I love to cook is because it keeps me stress free. For example when I am cooking I have very little time to think, because the cooking is challenging my mind and taking my mind off the stress of everyday life. I have had other hobbies such as agate hunting but with agate hunting I found myself getting frustrated because I could not find any agate’s and it eventually became more of a head ach trying to find them than they were worth. But with cooking I can always find what I am looking for and it is not frustrating like trying to finding little pebbles in the sand. I know many people will disagree when I say cooking is a skill that is essential in reducing their stress levels but it works for me, but it also enables me to expand my cooking abilities and makes me a better cook, and a great cook is always trying to find new ways to make cooking fun and stimulating like me. Good cooking doesn’t always come naturally, but when skill’s and/or talents are perfected strengths such as cooking can become fun or even a hobby. Good Cooking includes a variety of techniques for preparing food, usually by applying heat. People cook foods for many reasons. Cooking can kill bacteria and other harmful organisms. It can make ingredients easier to digest. Cooking can also bring out the flavors in foods and create new ones. People cook to provide meals or snacks for themselves and their family and friends. For many people, cooking is also a hobby. For some people, cooking is a profession. Some dishes are easy to cook. They require little skill and only a few ingredients. Other dishes are so complex and carefully prepared that they resemble works of art. Recipes offer instructions for cooking a huge variety of dishes. The ingredients used in cooking help determine food’s flavor, texture, and nutrition content. Almost any edible part of plants, animals, or fungi can be used as an ingredient. The flavors, textures, and smells of ingredients—as well as their colors and shapes—create unique eating experiences. The cuisines (cooking styles) of many cultures begin with ingredients traditionally available in a particular region. But today, many ingredients—such as garlic, onions, and tomatoes—are used all over the world. + Warm and inviting, home cooking has resurfaced with all the kudos it deserves. Diana's menu reflects some of the most sought after recipes there are. They call it comfort food for a reason! Mac and Cheese with Butternut Squash, Chicken Pot Pie, Pork Ragu over Easy Creamy Polenta, Beef and Bacon Meatloaf with Garlic Mashed Potatoes, Boston Cream ... + + +
+ +
+ + +
+
+

Error!

+
+
+
+
+
+
+ + + + + + + + \ No newline at end of file