Skip to content

Commit 1610b58

Browse files
committed
Formatted with Prettier
1 parent a932bd8 commit 1610b58

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3768
-3572
lines changed

.github/FUNDING.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# These are supported funding model platforms
2-
3-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4-
patreon: gointerstellar
5-
open_collective: # Replace with a single Open Collective username
6-
ko_fi: # Replace with a single Ko-fi username
7-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9-
liberapay: # Replace with a single Liberapay username
10-
issuehunt: # Replace with a single IssueHunt username
11-
otechie: # Replace with a single Otechie username
12-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13-
custom: https://cash.app/$akabubbo
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: gointerstellar
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: https://cash.app/$akabubbo

.github/ISSUE_TEMPLATE/bug-report.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Bug Report
33
about: Create a report to help us improve
4-
title: "[Bug] "
4+
title: '[Bug] '
55
labels: Bug Report
66
assignees: xbubbo
7-
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,10 +24,10 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Device Information (please complete the following information):**
27-
- Device: [Ex. Chromebook, iPad, etc.]
28-
- OS [Ex. ChromeOS, Windows, iOS
29-
- Browser [Ex. Chrome, Safari]
3027

28+
- Device: [Ex. Chromebook, iPad, etc.]
29+
- OS [Ex. ChromeOS, Windows, iOS
30+
- Browser [Ex. Chrome, Safari]
3131

3232
**Additional context**
3333
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature-request.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Feature Request
33
about: Suggest an idea for this project
4-
title: "[Feature]"
4+
title: '[Feature]'
55
labels: Feature Request
66
assignees: xbubbo
7-
87
---
98

109
**Is your feature request related to a problem? Please describe.**

.github/ISSUE_TEMPLATE/game-request.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
name: Game Request
33
about: Suggest a game you would like to be added to the site.
4-
title: "[Game]"
4+
title: '[Game]'
55
labels: Game Request
66
assignees: xbubbo
7-
87
---
98

109
**What is the name of the game?**

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist/
2+
node_modules
3+
package-lock.json
4+
package.json
5+
/static/m/

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true,
6+
"bracketSameLine": true,
7+
"printWidth": 120
8+
}

README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
</div>
44
One of the most popular web proxies, used by over 5.7 million people in 2023.
55

6-
### Consider joining our[ Discord Community](https://discord.gg/interstellar)
6+
### Consider joining our[ Discord Community](https://discord.gg/interstellar)
7+
78
> If you find this project useful, consider giving it a star in the original repository.
89
910
<h2 align="center">Features</h2>
@@ -21,6 +22,7 @@ One of the most popular web proxies, used by over 5.7 million people in 2023.
2122
<h2 align="center">Deployment</h2>
2223

2324
### Easy Deployment
25+
2426
**Note:** You **cannot** deploy to static web hosts, including Netlify, Cloudflare Pages, and GitHub Pages.
2527

2628
<a target="_blank" href="https://heroku.com/deploy/?template=https://github.com/interstellarnetwork/interstellar"><img alt="Deploy to Heroku" src="https://binbashbanana.github.io/deploy-buttons/buttons/remade/heroku.svg"></a>
@@ -29,12 +31,15 @@ One of the most popular web proxies, used by over 5.7 million people in 2023.
2931
<a target="_blank" href="https://app.cyclic.sh/api/app/deploy/interstellarnetwork/Interstellar"><img alt="Deploy to Cyclic" src="https://binbashbanana.github.io/deploy-buttons/buttons/remade/cyclic.svg"></a>
3032

3133
## Deployment Alternatives:
34+
3235
For more deployment options join our [Discord Server](https://discord.gg/interstellar) for tons of different ways to deploy Interstellar.
3336

34-
#### What happened to Replit Deployment?
35-
As of January 1st 2024, Replit is [no longer free](https://blog.replit.com/hosting-changes). Try GitHub Codespaces instead.
37+
#### What happened to Replit Deployment?
38+
39+
As of January 1st 2024, Replit is [no longer free](https://blog.replit.com/hosting-changes). Try GitHub Codespaces instead.
3640

3741
### GitHub Codespaces:
42+
3843
1. Create a GitHub account if you haven't already.
3944
2. Click "Code" (green button) and then "Create Codespace on main."
4045
3. In the terminal at the bottom, paste `npm i && npm run start`.
@@ -43,12 +48,15 @@ As of January 1st 2024, Replit is [no longer free](https://blog.replit.com/hosti
4348
6. For subsequent uses in the same codespace, just run `npm run start`
4449

4550
## Need Help with Deployment?
51+
4652
If you're having trouble, reach out to us on [Discord](https://discord.gg/interstellar) for personalized support.
4753

4854
### Report Issues:
55+
4956
If you encounter problems, open an issue on GitHub, and we'll address it promptly.
5057

5158
# Credits
59+
5260
A huge thank you to all of the people who have contributed to Interstellar.
5361

5462
[![Contributors](https://contrib.rocks/image?repo=InterstellarNetwork/Interstellar)](https://github.com/InterstellarNetwork/Interstellar/graphs/contributors)

app.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{
2-
"name": "edu",
3-
"description": "?",
4-
"repository": "https://github.com/interstellarnetwork/interstellar",
5-
"logo": "https://avatars.githubusercontent.com/u/103917385",
6-
"keywords": ["school", "math"],
7-
"image": "heroku/nodejs"
8-
}
1+
{
2+
"name": "edu",
3+
"description": "?",
4+
"repository": "https://github.com/interstellarnetwork/interstellar",
5+
"logo": "https://avatars.githubusercontent.com/u/103917385",
6+
"keywords": ["school", "math"],
7+
"image": "heroku/nodejs"
8+
}

index.js

+73-73
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
1-
import express from 'express';
2-
import http from 'node:http';
3-
import { createBareServer } from "@tomphttp/bare-server-node";
4-
import path from 'node:path';
5-
import cors from 'cors';
6-
7-
const __dirname = process.cwd();
8-
const server = http.createServer();
9-
const app = express(server);
10-
const bareServer = createBareServer('/v/');
11-
const PORT = 8080;
12-
13-
app.use(express.json());
14-
app.use(express.urlencoded({ extended: true }));
15-
app.use(cors());
16-
app.use(express.static(path.join(__dirname, 'static')));
17-
18-
const routes = [
19-
{ path: '/', file: 'index.html' },
20-
{ path: '/~', file: 'apps.html' },
21-
{ path: '/-', file: 'games.html' },
22-
{ path: '/!', file: 'settings.html' },
23-
{ path: '/0', file: 'tabs.html' },
24-
{ path: '/&', file: 'go.html' },
25-
{ path: '/w', file: 'edu.html' },
26-
];
27-
28-
app.get('/y/*', cors({ origin: false }), async (req, res, next) => {
29-
try {
30-
const reqTarget = `https://raw.githubusercontent.com/ypxa/y/main/${req.params[0]}`;
31-
const asset = await fetch(reqTarget);
32-
33-
if (asset.ok) {
34-
const data = await asset.arrayBuffer();
35-
res.end(Buffer.from(data));
36-
} else {
37-
next();
38-
}
39-
} catch (error) {
40-
console.error('Error fetching:', error);
41-
next(error);
42-
}
43-
});
44-
45-
routes.forEach((route) => {
46-
app.get(route.path, (req, res) => {
47-
res.sendFile(path.join(__dirname, 'static', route.file));
48-
});
49-
});
50-
51-
server.on('request', (req, res) => {
52-
if (bareServer.shouldRoute(req)) {
53-
bareServer.routeRequest(req, res);
54-
} else {
55-
app(req, res);
56-
}
57-
});
58-
59-
server.on('upgrade', (req, socket, head) => {
60-
if (bareServer.shouldRoute(req)) {
61-
bareServer.routeUpgrade(req, socket, head);
62-
} else {
63-
socket.end();
64-
}
65-
});
66-
67-
server.on('listening', () => {
68-
console.log(`Running at http://localhost:${PORT}`);
69-
});
70-
71-
server.listen({
72-
port: PORT,
73-
});
1+
import express from 'express'
2+
import http from 'node:http'
3+
import { createBareServer } from '@tomphttp/bare-server-node'
4+
import path from 'node:path'
5+
import cors from 'cors'
6+
7+
const __dirname = process.cwd()
8+
const server = http.createServer()
9+
const app = express(server)
10+
const bareServer = createBareServer('/v/')
11+
const PORT = 8080
12+
13+
app.use(express.json())
14+
app.use(express.urlencoded({ extended: true }))
15+
app.use(cors())
16+
app.use(express.static(path.join(__dirname, 'static')))
17+
18+
const routes = [
19+
{ path: '/', file: 'index.html' },
20+
{ path: '/~', file: 'apps.html' },
21+
{ path: '/-', file: 'games.html' },
22+
{ path: '/!', file: 'settings.html' },
23+
{ path: '/0', file: 'tabs.html' },
24+
{ path: '/&', file: 'go.html' },
25+
{ path: '/w', file: 'edu.html' },
26+
]
27+
28+
app.get('/y/*', cors({ origin: false }), async (req, res, next) => {
29+
try {
30+
const reqTarget = `https://raw.githubusercontent.com/ypxa/y/main/${req.params[0]}`
31+
const asset = await fetch(reqTarget)
32+
33+
if (asset.ok) {
34+
const data = await asset.arrayBuffer()
35+
res.end(Buffer.from(data))
36+
} else {
37+
next()
38+
}
39+
} catch (error) {
40+
console.error('Error fetching:', error)
41+
next(error)
42+
}
43+
})
44+
45+
routes.forEach((route) => {
46+
app.get(route.path, (req, res) => {
47+
res.sendFile(path.join(__dirname, 'static', route.file))
48+
})
49+
})
50+
51+
server.on('request', (req, res) => {
52+
if (bareServer.shouldRoute(req)) {
53+
bareServer.routeRequest(req, res)
54+
} else {
55+
app(req, res)
56+
}
57+
})
58+
59+
server.on('upgrade', (req, socket, head) => {
60+
if (bareServer.shouldRoute(req)) {
61+
bareServer.routeUpgrade(req, socket, head)
62+
} else {
63+
socket.end()
64+
}
65+
})
66+
67+
server.on('listening', () => {
68+
console.log(`Running at http://localhost:${PORT}`)
69+
})
70+
71+
server.listen({
72+
port: PORT,
73+
})

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"node": ">=16.0.0"
88
},
99
"scripts": {
10-
"start": "node index.js"
10+
"start": "node index.js",
11+
"format": "prettier --write ."
1112
},
1213
"author": "",
1314
"license": "GPL-3.0-or-later",
@@ -18,8 +19,6 @@
1819
"express": "^4.18.2"
1920
},
2021
"devDependencies": {
21-
"eslint": "^8.36.0",
22-
"prettier": "^3.0.3"
22+
"prettier": "3.1.1"
2323
}
2424
}
25-

render.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
services:
2-
- type: web
3-
name: edu
4-
env: docker
5-
plan: free
1+
services:
2+
- type: web
3+
name: edu
4+
env: docker
5+
plan: free

static/apps.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
<a class="navbar-link" href="/./~"><span class="material-symbols-outlined weird-icon">apps</span>Apps</a>
2525
<a class="navbar-link" href="/./0"><i class="fa-solid fa-table navbar-icon"></i>Tabs</a>
2626
<a class="navbar-link" href="/./!"><i class="fa-solid fa-gear navbar-icon settings-icon"></i>Settings</a>
27-
</div></div></div></div>
27+
</div>
28+
</div>
2829
<!-- Nav Bar End-->
2930
<div class="input-container">
3031
<input type="text" id="searchbarbottom" onkeyup="search_bar()" placeholder="Search">

0 commit comments

Comments
 (0)