Skip to content

Commit

Permalink
Merge branch 'main' into Homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
Madjik authored Feb 15, 2024
2 parents ea5de8b + f1c2500 commit 58353d8
Show file tree
Hide file tree
Showing 23 changed files with 138 additions and 52 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ One of the most popular web proxies, used by over 5.7 million people in 2023.
### Consider joining our[ Discord Community](https://discord.gg/interstellar)

**If you find this project useful, consider giving it a star in the original repository.**

<h2 align="center">Features</h2>
<ul>
<li>About:Blank Cloaking</li>
Expand Down
12 changes: 5 additions & 7 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Supported Versions

Only current versions of the site are being updated, if you are using an older version of the site, consider upgrading to the latest version.
Only current versions of the site are being updated, if you are using an older version of the site, consider upgrading to the latest version.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :x: |
| 4.0.x | :x: |
| < 4.0 | :x: |

## Reporting a Vulnerability
Expand All @@ -23,16 +23,14 @@ If you are using an older version of the site, we strongly recommend upgrading t

### How to Update

If you have a fork of the repository:
If you have a fork of the repository:
Then [sync your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork).

If you have interstellar installed locally:
Run ``git pull``, and ``npm i``.

If you have interstellar installed locally:
Run `git pull`, and `npm i`.

By keeping your site up to date, you not only enjoy the latest features but also enhance the security of your experience.

If you encounter any challenges while updating, feel free to reach out to our [support team](https://discord.gg/interstellar) for assistance.

Thank you for prioritizing the security and performance of your experience with our site.

2 changes: 2 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const config = {
routes: true, // Change this to false if you just want to host a bare server.
local: true, // Change this to false to disable local assets.
challenge: false,
users: {
// username: 'password', you can add multiple users.
Expand Down
65 changes: 36 additions & 29 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,52 @@ import { createBareServer } from '@tomphttp/bare-server-node'
import path from 'node:path'
import cors from 'cors'
import config from './config.js'

const __dirname = process.cwd()
const server = http.createServer()
const app = express(server)
const bareServer = createBareServer('/v/')
const PORT = process.env.PORT || 8080

app.use(cors())
app.use(express.json())
app.use(express.urlencoded({ extended: true }))
app.use(express.static(path.join(__dirname, 'static')))

if (config.challenge) {
console.log('Password protection is enabled. Usernames are: ' + Object.keys(config.users))
console.log('Passwords are: ' + Object.values(config.users))
app.use(basicAuth(config))
app.use(basicAuth(config.users))
}

if (config.routes !== false) {
const routes = [
{ path: '/~', file: 'apps.html' },
{ path: '/-', file: 'games.html' },
{ path: '/!', file: 'settings.html' },
{ path: '/0', file: 'tabs.html' },
{ path: '/1', file: 'go.html' },
{ path: '/', file: 'index.html' },
]

routes.forEach((route) => {
app.get(route.path, (req, res) => {
res.sendFile(path.join(__dirname, 'static', route.file))
})
})
}
app.use(express.json())
app.use(express.urlencoded({ extended: true }))
app.use(cors())
app.use(express.static(path.join(__dirname, 'static')))

const routes = [
{ path: '/', file: 'index.html' },
{ path: '/~', file: 'apps.html' },
{ path: '/-', file: 'games.html' },
{ path: '/!', file: 'settings.html' },
{ path: '/0', file: 'tabs.html' },
{ path: '/1', file: 'go.html' },
]
if (config.local !== false) {
app.get('/y/*', cors({ origin: false }), (req, res, next) => {
const baseUrl = 'https://raw.githubusercontent.com/ypxa/y/main'
fetchData(req, res, next, baseUrl)
})

app.get('/f/*', cors({ origin: false }), (req, res, next) => {
const baseUrl = 'https://raw.githubusercontent.com/4x-a/x/fixy'
fetchData(req, res, next, baseUrl)
})
}

const fetchData = async (req, res, next, baseUrl) => {
try {
Expand All @@ -46,22 +69,6 @@ const fetchData = async (req, res, next, baseUrl) => {
}
}

app.get('/y/*', cors({ origin: false }), (req, res, next) => {
const baseUrl = 'https://raw.githubusercontent.com/ypxa/y/main'
fetchData(req, res, next, baseUrl)
})

app.get('/f/*', cors({ origin: false }), (req, res, next) => {
const baseUrl = 'https://raw.githubusercontent.com/4x-a/x/fixy'
fetchData(req, res, next, baseUrl)
})

routes.forEach((route) => {
app.get(route.path, (req, res) => {
res.sendFile(path.join(__dirname, 'static', route.file))
})
})

server.on('request', (req, res) => {
if (bareServer.shouldRoute(req)) {
bareServer.routeRequest(req, res)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "in",
"version": "5.1.2",
"version": "5.1.3",
"type": "module",
"engines": {
"npm": ">=7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion static/apps.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link rel="stylesheet" href="/assets/styles/themes/default.css?v=2" />
<script src="/assets/scripts/index.js?v=5"></script>
<script src="https://kit.fontawesome.com/1237c86ba0.js" crossorigin="anonymous"></script>
<script src="assets/scripts/apps.js?v=11"></script>
<script src="assets/scripts/apps.js?v=12"></script>
</head>
<body>
<div class="fixed-nav-bar">
Expand Down
Binary file added static/assets/media/icons/ageofwar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/media/icons/bigtowertinysquare.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/media/icons/digdigio.jfif
Binary file not shown.
Binary file added static/assets/media/icons/earntodie2012part2.jfif
Binary file not shown.
Binary file added static/assets/media/icons/gemini.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/media/icons/helixjump.jfif
Binary file not shown.
Binary file added static/assets/media/icons/lostgamerio.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/media/icons/skribblio.jfif
Binary file not shown.
Binary file not shown.
Binary file added static/assets/media/icons/stompedio.jfif
Binary file not shown.
Binary file added static/assets/media/icons/theimpossiblequiz.webp
Binary file not shown.
Binary file added static/assets/media/icons/thisissand.webp
Binary file not shown.
Binary file added static/assets/media/icons/wingsio.jfif
Binary file not shown.
6 changes: 6 additions & 0 deletions static/assets/scripts/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ document.addEventListener('DOMContentLoaded', () => {
categories: ['all', 'game', 'cloud'],
blank: 'true',
},
{
name: 'Google Gemini ',
link: 'https://gemini.google.com',
image: '/assets/media/icons/gemini.png',
categories: ['all', 'ai'],
},
]

appsList.sort((a, b) => a.name.localeCompare(b.name))
Expand Down
92 changes: 82 additions & 10 deletions static/assets/scripts/g.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,78 @@ document.addEventListener('DOMContentLoaded', () => {
name: 'Dynast.io',
link: 'https://dynast.io',
image: '/assets/media/icons/dynast-io.webp',
categories: ['all'],
},
{
name: 'Stickman Archero Fight',
link: 'https://html5.gamedistribution.com/rvvASMiM/3f4c166817ad4fd4b5b05d9adba22fcd/index.html',
image: '/assets/media/icons/stickman-archero-fight.webp',
categories: ['all'],
},
{
name: 'Earn to Die 2012 Part 2',
link: 'https://games-online.io/game/EarnToDie/index.html',
image: '/assets/media/icons/earntodie2012part2.jfif',
categories: ['all'],
},
{
name: 'Lostgamer',
link: 'https://lostgamer.io',
image: '/assets/media/icons/lostgamerio.jpg',
categories: ['all', '2P'],
},
{
name: 'Thisissand',
link: 'https://thisissand.com/',
image: '/assets/media/icons/thisissand.webp',
categories: ['all'],
},
{
name: 'digdig.io',
link: 'https://digdig.io/',
image: '/assets/media/icons/digdigio.jfif',
categories: ['all', '2P'],
},
{
name: 'Big Tower Tiny Square',
link: 'https://www.coolmathgames.com/0-big-tower-tiny-square/play',
image: '/assets/media/icons/bigtowertinysquare.jpg',
categories: ['all'],
},
{
name: 'The Impossible Quiz',
link: 'https://the-impossible-quiz.game-files.crazygames.com/ruffle/theimpossiblequiz.html',
image: '/assets/media/icons/theimpossiblequiz.webp',
categories: ['all'],
},
{
name: 'Helix Jump',
link: 'https://helix-jump.game-files.crazygames.com/helix-jump/1/index.html',
image: '/assets/media/icons/helixjump.jfif',
categories: ['all'],
},
{
name: 'skribbl',
link: 'https://skribbl.io/',
image: '/assets/media/icons/skribblio.jfif',
categories: ['all', '2P'],
},
{
name: 'Wings!',
link: 'https://wings.io/',
image: '/assets/media/icons/wingsio.jfif',
categories: ['all', '2P'],
},
{
name: 'Stomped.io',
link: 'https://stomped.io',
image: '/assets/media/icons/stompedio.jfif',
categories: ['all'],
},
{
name: 'Age of War',
link: 'https://age-of-war.game-files.crazygames.com/ruffle/ageofwar.html',
image: '/assets/media/icons/ageofwar.jpg',
categories: ['all', '2P'],
},
// idk why brain test on poki doesnt work when i take out everything after "index.html?" so i left it there, usually it works without it tho
Expand Down Expand Up @@ -1627,24 +1699,24 @@ document.addEventListener('DOMContentLoaded', () => {

function handleClick(app) {
if (typeof app.say !== 'undefined') {
alert(app.say);
alert(app.say)
}

if (app.local) {
saveToLocal(app.link);
window.location.href = '1';
saveToLocal(app.link)
window.location.href = '1'
} else if (app.local2) {
saveToLocal(app.link);
window.location.href = app.link;
saveToLocal(app.link)
window.location.href = app.link
} else if (app.blank) {
blank(app.link);
blank(app.link)
} else {
if (!app.local) {
go(app.link);
go(app.link)
}
}
return false;

return false
}

link.onclick = function () {
Expand Down
2 changes: 1 addition & 1 deletion static/games.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<link rel="stylesheet" href="/assets/styles/main.css?v=1" />
<link rel="stylesheet" href="/assets/styles/themes/default.css?v=2" />
<script src="/assets/scripts/index.js?v=5"></script>
<script src="/assets/scripts/g.js?v=14"></script>
<script src="/assets/scripts/g.js?v=15"></script>
</head>
<body>
<div class="fixed-nav-bar">
Expand Down
6 changes: 3 additions & 3 deletions static/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
height="100%"
width="100%"
allowfullscreen></iframe>
<script src="assets/scripts/index.js?v=5"></script>
<script src="./m/bundle.js"></script>
<script src="./m/config.js"></script>
<script src="assets/scripts/index.js?v=5"></script>
<script src="./m/bundle.js"></script>
<script src="./m/config.js"></script>
<script src="assets/scripts/frame.js?v=3"></script>
<script src="https://kit.fontawesome.com/1237c86ba0.js" crossorigin="anonymous"></script>
<script src="/assets/scripts/now.js?v=2"></script>
Expand Down

0 comments on commit 58353d8

Please sign in to comment.