Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
impaxton committed Nov 13, 2023
0 parents commit ad98992
Show file tree
Hide file tree
Showing 36 changed files with 9,378 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.DS_Store
node_modules
/.svelte-kit
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.eslintrc*
*.log
.env
.env.local
node_modules
.history
/build
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
resolution-mode=highest
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Abyss Web

## Abyss is the best and most modern proxy to avoid modern censorship.
### discord.gg/goabyss

## Setup
```
git clone https://github.com/Abyss-Services/Abyss-Web
cd Abyss-Web
npm install
npm start
```

## Enviroment
Edit .env to change the port. The default port is 8080.

## License
Abyss uses GPL-3.0. Read it before you use Abyss and manipulate it's code.
41 changes: 41 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { createBareServer } from '@tomphttp/bare-server-node';
import http from 'http';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
import nodeStatic from 'node-static';
import chalk from 'chalk';
import 'dotenv/config';


const port = process.env.PORT || 8080;

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

const bare = createBareServer('/bare/');
const serve = new nodeStatic.Server('build/');

const server = http.createServer();

server.on('request', (req, res) => {
if (bare.shouldRoute(req)) {
bare.routeRequest(req, res);
} else {
serve.serve(req, res);
}
});

server.on('upgrade', (req, socket, head) => {
if (bare.shouldRoute(req, socket, head)) {
bare.routeUpgrade(req, socket, head);
} else {
socket.end();
}
});

server.listen({
port: port,
}, () => {
console.log(chalk.green(`Welcome to ${chalk.green.bold('Abyss Version 5. ')}If you encounter an error, report it to our staff.`))
console.log(chalk.green.bold("[ABYSS] ") + "live at port " + chalk.bold.green(port));
});
Loading

0 comments on commit ad98992

Please sign in to comment.