Skip to content

Commit

Permalink
Ready To Be Optmized And Ready For Vercel
Browse files Browse the repository at this point in the history
Due To Some Reports That You Need To Log In For youtube.com And Performance Issues I Will Optimize The Files For Better Use And The Logo And UI Will Be Replaced By MusPlayr Universe
  • Loading branch information
Casual-Person authored Sep 5, 2024
1 parent deb7eab commit 9ae801f
Show file tree
Hide file tree
Showing 6 changed files with 2,292 additions and 4 deletions.
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
<html>
<h1>This Is UGFD Proxy A Ultraviolet App Made By Titanium Network </h1>
<h3>This Is A Modified Version Of Ultraviolet</h3>
</html>
<p align="center"><img src="https://raw.githubusercontent.com/titaniumnetwork-dev/Ultraviolet-Static/main/public/uv.png" height="200"></p>

<h1 align="center">Ultraviolet-App</h1>

The deployable all-in-one bundle for [Ultraviolet](https://github.com/titaniumnetwork-dev/Ultraviolet), a highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers and more!

## Deployment

[![Run on Replit](https://binbashbanana.github.io/deploy-buttons/buttons/remade/replit.svg)](https://github.com/titaniumnetwork-dev/Ultraviolet-App/wiki/Run-on-Replit)
[![Deploy on Railway](https://binbashbanana.github.io/deploy-buttons/buttons/remade/railway.svg)](https://github.com/titaniumnetwork-dev/Ultraviolet-App/wiki/Deploy-on-Railway)
[![Remix on Glitch](https://binbashbanana.github.io/deploy-buttons/buttons/remade/glitch.svg)](https://github.com/titaniumnetwork-dev/Ultraviolet-App/wiki/Remix-on-Glitch)
[![Deploy to Koyeb](https://binbashbanana.github.io/deploy-buttons/buttons/remade/koyeb.svg)](https://github.com/titaniumnetwork-dev/Ultraviolet-App/wiki/Deploy-to-Koyeb)

If you are deploying to an alternative service or to a server, refer to [Deploy via terminal](https://github.com/titaniumnetwork-dev/Ultraviolet-App/wiki/Deploy-via-terminal).

Additional information such as [customizing your frontend](https://github.com/titaniumnetwork-dev/Ultraviolet-App/wiki/Customizing-your-frontend) can be found on the [wiki](https://github.com/titaniumnetwork-dev/Ultraviolet-App/wiki).

Support and updates can be found in our [Discord Server](discord.gg/unblock).

> [!IMPORTANT]
> Until deployed on a domain with a valid SSL certificate, Firefox will not be able to load the site. Use chromium for testing on localhost
### HTTP Transport
The example uses [EpoxyTransport](https://github.com/MercuryWorkshop/EpoxyTransport) to fetch proxied data encrypted.

You may also want to use [CurlTransport](https://github.com/MercuryWorkshop/CurlTransport), a different way of fetching encrypted data, or [Bare-Client](https://github.com/MercuryWorkshop/Bare-as-module3), the legacy (unencrypted!) transport.

See the [bare-mux](https://github.com/MercuryWorkshop/bare-mux) documentation for more information.
7 changes: 7 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Ultraviolet App",
"description": "Node.js Ultraviolet instance",
"repository": "https://github.com/titaniumnetwork-dev/Ultraviolet-App",
"logo": "https://raw.githubusercontent.com/titaniumnetwork-dev/Ultraviolet-Static/main/public/uv.png",
"keywords": ["tomp", "ultraviolet"]
}
70 changes: 70 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import express from "express";
import { createServer } from "node:http";
import { publicPath } from "ultraviolet-static";
import { uvPath } from "@titaniumnetwork-dev/ultraviolet";
import { epoxyPath } from "@mercuryworkshop/epoxy-transport";
import { baremuxPath } from "@mercuryworkshop/bare-mux/node";
import { join } from "node:path";
import { hostname } from "node:os";
import wisp from "wisp-server-node"

const app = express();
// Load our publicPath first and prioritize it over UV.
app.use(express.static(publicPath));
// Load vendor files last.
// The vendor's uv.config.js won't conflict with our uv.config.js inside the publicPath directory.
app.use("/uv/", express.static(uvPath));
app.use("/epoxy/", express.static(epoxyPath));
app.use("/baremux/", express.static(baremuxPath));

// Error for everything else
app.use((req, res) => {
res.status(404);
res.sendFile(join(publicPath, "404.html"));
});

const server = createServer();

server.on("request", (req, res) => {
res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
app(req, res);
});
server.on("upgrade", (req, socket, head) => {
if (req.url.endsWith("/wisp/"))
wisp.routeRequest(req, socket, head);
else
socket.end();
});

let port = parseInt(process.env.PORT || "");

if (isNaN(port)) port = 8080;

server.on("listening", () => {
const address = server.address();

// by default we are listening on 0.0.0.0 (every interface)
// we just need to list a few
console.log("Listening on:");
console.log(`\thttp://localhost:${address.port}`);
console.log(`\thttp://${hostname()}:${address.port}`);
console.log(
`\thttp://${address.family === "IPv6" ? `[${address.address}]` : address.address
}:${address.port}`
);
});

// https://expressjs.com/en/advanced/healthcheck-graceful-shutdown.html
process.on("SIGINT", shutdown);
process.on("SIGTERM", shutdown);

function shutdown() {
console.log("SIGTERM signal received: closing HTTP server");
server.close();
process.exit(0);
}

server.listen({
port,
});
Loading

1 comment on commit 9ae801f

@vercel
Copy link

@vercel vercel bot commented on 9ae801f Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ugfd-proxy – ./

ugfd-proxy-offical.vercel.app
ugfd-proxy-git-main-ugfd.vercel.app
ugfd-proxy-ugfd.vercel.app

Please sign in to comment.