diff --git a/README.md b/README.md deleted file mode 100644 index abe179e..0000000 --- a/README.md +++ /dev/null @@ -1,40 +0,0 @@ -

- -

Ultraviolet-Static

- -Static files/assets used to spin up an Ultraviolet website. - -## Install in [Ultraviolet-App](https://github.com/titaniumnetwork-dev/Ultraviolet-App.git) - -See [Ultraviolet-App's Wiki](https://github.com/titaniumnetwork-dev/Ultraviolet-App/wiki/Customizing-your-frontend). - -## Usage outside of Ultraviolet-App/Static hosting - -### Ultraviolet scripts - -This repository doesn't serve any Ultraviolet scripts. It has a `uv.config.js` to show how Ultraviolet is intended to work with this demo. Ultraviolet-App automatically merges our `uv.config.js` with the remaining UV scripts (`uv.sw.js`, `uv.client.js`, etc). **Some work has to be done in order to make this repository standalone.** - -Here's how to get the remaining scripts for the purpose of hosting this repository: - -1. Go to the [Ultraviolet releases](https://github.com/titaniumnetwork-dev/Ultraviolet/releases/) -2. Find the latest release -3. Download the latest tarball (eg. `titaniumnetwork-dev-ultraviolet-x.x.x.tgz`) -4. Open the tarball, navigate to the `dist` directory, and extract all the scripts with the exception of `uv.config.js` (we already have a configuration) into the `public/uv/` directory in this repository. - You may see `.map` files. These are used for debugging. If they're too large, you can omit them without any errors. - - Do not copy `uv.config.js` from the archive! - -### Bare server - -You will need to point your Bare server to an external one/a different directory (if you're using reverse proxy software). - -1. Open `public/uv/config.js` -2. Find the `bare` field -3. Replace `"/bare/"` with the address of your Bare server - A Bare server address hosts the Bare server. For example, to use the Holy Unblocker Bare server at https://uv.holyubofficial.net/ you would update your config to look like this: - - ```js - bare: "https://uv.holyubofficial.net/", - ``` - - You can open Bare server addresses in your browser. You should see something containing fields like the project description, memory usage, supported versions, and the runtime/language. diff --git a/package-lock.json b/package-lock.json index aae6189..f523040 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,18 @@ { - "name": "ultraviolet-static", + "name": "Revela-Frontend", "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "ultraviolet-static", + "name": "Revela-Frontend", "version": "1.0.2", "devDependencies": { "eslint": "^8.23.0", "prettier": "^2.7.1" }, "peerDependencies": { - "@titaniumnetwork-dev/ultraviolet": "^2.0.0" + "@RevelaNetwork/Revela": "^2.0.0" } }, "node_modules/@eslint/eslintrc": { diff --git a/package.json b/package.json index 351df42..d58ef62 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ultraviolet-static", + "name": "Revela-Frontend", "main": "lib/index.js", "version": "1.0.2", "type": "module", @@ -8,7 +8,7 @@ "lib" ], "peerDependencies": { - "@titaniumnetwork-dev/ultraviolet": "^2.0.0" + "@RevelaNetwork/Revela-Frontend": "^2.0.0" }, "devDependencies": { "eslint": "^8.23.0", diff --git a/public/404.html b/public/404.html index 270191d..a7e1888 100644 --- a/public/404.html +++ b/public/404.html @@ -1,51 +1,36 @@ - - - - Ultraviolet | Error - - - - - - - - -
-

Ultraviolet | Error

-
-
-

The server could not route your request.

-

- - -
- - - - - - - + + + + Revela | Error + + + + + + + + + +
+

Revela | Error

+
+
+

The server could not route your request. Try refreshing?

+

+ + +
+ + + + + + + + \ No newline at end of file diff --git a/public/5QEvQJ.png b/public/5QEvQJ.png new file mode 100644 index 0000000..7e795ed Binary files /dev/null and b/public/5QEvQJ.png differ diff --git a/public/cloak.js b/public/cloak.js new file mode 100644 index 0000000..b5d6af6 --- /dev/null +++ b/public/cloak.js @@ -0,0 +1,17 @@ +function cloak() { + const newWindow = window.open('about:blank'); + const iframe = newWindow.document.createElement('iframe'); + newWindow.document.body.style.margin = '0'; + iframe.style.width = '100%'; + iframe.style.height = '100%'; + iframe.style.position = 'fixed'; + iframe.style.top = '0'; + iframe.style.left = '0'; + iframe.style.zIndex = '99999'; + iframe.style.border = 'none'; + + newWindow.document.body.style.overflow = 'hidden'; + newWindow.document.body.appendChild(iframe); + iframe.src = window.location.href; + window.location.replace('https://classroom.google.com/') +} \ No newline at end of file diff --git a/public/error.js b/public/error.js index 626ab57..d645e25 100644 --- a/public/error.js +++ b/public/error.js @@ -1,10 +1,10 @@ "use strict"; -const error = document.getElementById("uv-error"); -const errorCode = document.getElementById("uv-error-code"); -const registerButton = document.getElementById("uv-register-sw"); +const error = document.getElementById("rv-error"); +const errorCode = document.getElementById("rv-error-code"); +const registerButton = document.getElementById("rv-register-sw"); if (location.pathname.startsWith(__uv$config.prefix)) { - error.textContent = "Error: The service worker is not registered."; + error.textContent = "Error: The seuvice worker is not registered."; registerButton.classList.add("show"); } @@ -13,7 +13,7 @@ registerButton.addEventListener("click", async () => { await registerSW(); location.reload(); } catch (err) { - error.textContent = "Failed to register service worker."; + error.textContent = "Failed to register seuvice worker. Try refreshing?"; errorCode.textContent = err.toString(); registerButton.classList.remove("show"); } diff --git a/public/gethost.php b/public/gethost.php new file mode 100644 index 0000000..4bb3273 --- /dev/null +++ b/public/gethost.php @@ -0,0 +1,4 @@ + diff --git a/public/import.css b/public/import.css new file mode 100644 index 0000000..f95c9dc --- /dev/null +++ b/public/import.css @@ -0,0 +1,75 @@ +@import url("https://fonts.bunny.net/css?family=abril-fatface:400|rubik:600,800i,900i"); + +body { + font-family: Abril-Fatface, Rubik; + margin: 0; + background: #111; + display: flex; + flex-direction: column; + min-height: 100vh; +} + +/* Styles for the container */ +.container { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100vh; +} + +/* Styles for the image */ +.image { + max-width: 300px; +} + +/* Styles for the paragraph */ +.paragraph h2 { + color: white; + margin-top: 25px; + text-align: center; +} + +/* Styles for the buttons */ +.buttons { + display: flex; + justify-content: center; + margin-top: 5px; +} + +.buttons button { + margin: 0 10px; +} + +/* Styles for the search bar */ +.search-bar { + margin-top: -20px; + text-align: center; +} + +/* Styles for Ad Banner */ +.ad-banner { + display: flex; + justify-content: center; + align-items: center; + margin-top: 100px; /* Adjusted margin-top */ + /* margin-bottom: -200px; */ +} + +.ad-banner img { + width: 512px; + height: 64px; + border-radius: 10px; /* Rounded corners */ +} + +/* Styles for the footers */ +.footer { + display: flex; + justify-content: center; + align-items: center; + height: 60px; + background-color: #f5f5f5; + width: 100%; + position: fixed; + bottom: 0; +} \ No newline at end of file diff --git a/public/importhost.js b/public/importhost.js new file mode 100644 index 0000000..87864d3 --- /dev/null +++ b/public/importhost.js @@ -0,0 +1,14 @@ +// Specify the URL of the PHP file +const phpFileUrl = './gethost.php'; + +// Fetch the content of the PHP file +fetch(phpFileUrl) + .then(response => response.text()) + .then(content => { + // Update the content of the .node-id element + const nodeIdElement = document.querySelector('.node-id'); + nodeIdElement.textContent = content; + }) + .catch(error => { + console.error('Error fetching PHP file:', error); + }); diff --git a/public/index.css b/public/index.css index 8b6d905..363f029 100644 --- a/public/index.css +++ b/public/index.css @@ -1,45 +1,15 @@ -@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap"); - -body { - font-family: "Roboto", Arial, Helvetica, sans-serif; - margin: 0; - background: #111; - display: flex; - flex-direction: column; - min-height: 100vh; -} - -.fa-magnifying-glass { - color: white; -} - -.flex-center { - display: flex; - justify-content: center; -} - -.header-center { - align-items: center; - flex-direction: column; - margin-top: 10%; -} - -.left-margin { - margin: 0px 16px; -} - -#uv-error { +#rv-error { color: #ff6666 !important; white-space: pre-wrap; } -#uv-error-code { +#rv-error-code { font-size: 12px; color: #fff; font-family: "Courier New", Courier, monospace; } -#uv-register-sw { +#rv-register-sw { color: white; background: #555555; cursor: pointer; @@ -51,124 +21,181 @@ body { display: none; } -#uv-register-sw:active { +#rv-register-sw:active { background: #333333; } -#uv-register-sw.show { +#rv-register-sw.show { display: block; } -.logo { - width: 150px; - height: 150px; -} - -.logo-wrapper .text { - font-size: 75px; - color: #fff; -} - -.logo-wrapper h1 { - color: white; -} - -footer { - margin: 0 5vw; - margin-top: auto; - display: flex; - flex-direction: column; - line-height: 30px; - margin-bottom: 20px; -} - -footer > div { - display: flex; - justify-content: left; - align-items: center; - flex-wrap: wrap; - margin-bottom: 15px; -} - -footer a, -footer span { - margin: 0 15px; - text-decoration: none; - color: #fff; - font-size: 15px; -} - -footer a { - cursor: pointer; -} - -footer a:hover { - text-decoration: underline; -} - -.desc p { - width: 560px; - color: rgba(253, 253, 253, 0.514); -} - -#uv-address { +.search-bar input[type="text"] { background: none; font-family: inherit; padding: 0px 17px; height: 48px; - border: 1px solid rgb(255, 255, 255, 0.2); + border: 1px solid rgba(255, 255, 255, 0.2); color: var(--text-color); border-radius: 3px; outline: none; width: 350px; - margin-top: 5px; + margin-top: 50px; border-radius: 50px; color: #fff; transition: border-radius 0.1s; } -#uv-address:focus { +.search-bar input[type="text"]:focus { border: 1px solid rgba(253, 253, 253, 0.514); border-radius: 6px; } -.credit { - border-radius: 10px; - padding: 10px; - display: block; - border: #fff 1px solid; - color: #fff; +.footer { + background: #111; + margin-top: auto; + width: 93%; + align-self: center; + height: 80px; display: flex; - flex-wrap: wrap; - margin-bottom: 15px; + justify-content: center; + align-items: center; } -.credit label { - margin-left: auto; - margin-right: 15px; +.cloaker { + background: none; + font-family: inherit; + padding: 0px 17px; + height: 32px; + border: 1px solid rgb(255, 255, 255, 0.2); + color: var(--text-color); + border-radius: 3px; + outline: none; + width: 150px; + margin-top: 5px; + border-radius: 50px; + color: #fff; + transition: border-radius 0.1s; + margin-top: auto; + display: flex; + justify-content: center; + align-items: center; + display: inline-block; + position: relative; } -.credit a, -.credit label { - color: white; - text-decoration: underline; - text-align: right; +.cloaker::before { + content: ""; + position: absolute; + top: -5px; + right: -5px; + bottom: -5px; + left: -5px; } -.credit pre { - display: none; - width: 100%; +.games { + background: none; + font-family: inherit; + padding: 0px 17px; + height: 32px; + border: 1px solid rgb(255, 255, 255, 0.2); + color: var(--text-color); + border-radius: 3px; + outline: none; + width: 160px; + margin-top: 5px; + border-radius: 50px; + color: #fff; + transition: border-radius 0.1s; + margin-top: auto; + display: flex; + justify-content: center; + align-items: center; + position: relative; } -.credit label::after { - content: "show license"; - cursor: pointer; +.games::before { + content: ""; + position: absolute; + top: -5px; + right: -5px; + bottom: -5px; + left: -5px; } -.credit input:checked + label::after { - content: "hide license"; +.node { + background: none; + font-family: inherit; + padding: 0px 17px; + height: 32px; + border: 1px solid rgb(255, 255, 255, 0.2); + color: var(--text-color); + border-radius: 3px; + outline: none; + width: 165px; + margin-top: 5px; + border-radius: 50px; + color: #fff; + transition: border-radius 0.1s; + margin-top: auto; + display: flex; + align-items: center; /* Align the text and span vertically */ + margin-bottom: 20px; + margin-right: 20px; + position: relative; } -.credit input:checked ~ pre { - display: block; +.node::before { + content: ""; + position: absolute; + top: -5px; + right: -5px; + bottom: -5px; + left: -5px; } + +.node-id { + margin-left: 5px; /* Add margin between "Node ID:" and the ID */ +} + +.stats { + background: none; + font-family: inherit; + padding: 0px 17px; + height: 32px; + border: 1px solid rgb(255, 255, 255, 0.2); + color: var(--text-color); + border-radius: 3px; + outline: none; + width: 150px; + margin-top: 5px; + border-radius: 50px; + color: #fff; + transition: border-radius 0.1s; + margin-top: auto; + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 20px; +} + +.credits { + background: none; + font-family: inherit; + padding: 0px 17px; + height: 32px; + border: 1px solid rgb(255, 255, 255, 0.2); + color: var(--text-color); + border-radius: 3px; + outline: none; + width: 150px; + margin-top: 5px; + border-radius: 50px; + color: #fff; + transition: border-radius 0.1s; + margin-top: auto; + display: flex; + justify-content: center; + align-items: center; + margin-right: 20px; /* Add margin to the right side */ + margin-bottom: 20px; /* Add margin to the bottom */ +} \ No newline at end of file diff --git a/public/index.html b/public/index.html index b6f133d..7ace2cd 100644 --- a/public/index.html +++ b/public/index.html @@ -1,119 +1,71 @@ - - - - - Ultraviolet | Sophisticated Web Proxy - - - - - - - - - - - - - - - -
- -

Ultraviolet | TN

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+

A Sophisticated Web Proxy that allows you to browse the web anonymously and securely.

-
-

- Ultraviolet is highly sophisticated proxy used for evading internet - censorship. +

+ + +
+ + +
+ GlassHost +
+
+

+


       

- -
- - -
-
-

-

-    
- - +
+ + diff --git a/public/index.js b/public/index.js index 19c0d97..9bbf774 100644 --- a/public/index.js +++ b/public/index.js @@ -2,23 +2,23 @@ /** * @type {HTMLFormElement} */ -const form = document.getElementById("uv-form"); +const form = document.getElementById("rv-form"); /** * @type {HTMLInputElement} */ -const address = document.getElementById("uv-address"); +const address = document.getElementById("rv-address"); /** * @type {HTMLInputElement} */ -const searchEngine = document.getElementById("uv-search-engine"); +const searchEngine = document.getElementById("rv-search-engine"); /** * @type {HTMLParagraphElement} */ -const error = document.getElementById("uv-error"); +const error = document.getElementById("rv-error"); /** * @type {HTMLPreElement} */ -const errorCode = document.getElementById("uv-error-code"); +const errorCode = document.getElementById("rv-error-code"); form.addEventListener("submit", async (event) => { event.preventDefault(); diff --git a/public/other/credits/index.html b/public/other/credits/index.html new file mode 100644 index 0000000..a26e470 --- /dev/null +++ b/public/other/credits/index.html @@ -0,0 +1,26 @@ + + + + + + + Revela | Credits + + + + + + + + + +
+

Revela | Credits

+
+
+

Our backend: Ultraviolet

+
+ + + \ No newline at end of file diff --git a/public/register-sw.js b/public/register-sw.js index 37c8ea2..a0f6df1 100644 --- a/public/register-sw.js +++ b/public/register-sw.js @@ -5,7 +5,7 @@ const stockSW = "/uv/sw.js"; /** - * List of hostnames that are allowed to run serviceworkers on http:// + * List of hostnames that are allowed to run serviceworkers on http: */ const swAllowedHostnames = ["localhost", "127.0.0.1"]; @@ -14,15 +14,14 @@ const swAllowedHostnames = ["localhost", "127.0.0.1"]; * Used in 404.html and index.html */ async function registerSW() { - if (!navigator.serviceWorker) { - if ( - location.protocol !== "https:" && - !swAllowedHostnames.includes(location.hostname) - ) - throw new Error("Service workers cannot be registered without https."); + if ( + location.protocol !== "https:" && + !swAllowedHostnames.includes(location.hostname) + ) + throw new Error("Service workers cannot be registered without https."); + if (!navigator.serviceWorker) throw new Error("Your browser doesn't support service workers."); - } // Ultraviolet has a stock `sw.js` script. await navigator.serviceWorker.register(stockSW, { diff --git a/public/uv/uv.config.js b/public/uv/uv.config.js index 72dca7f..0e29e55 100644 --- a/public/uv/uv.config.js +++ b/public/uv/uv.config.js @@ -1,4 +1,4 @@ -// This file overwrites the stock UV config.js +// This file overwrites the stock uv config.js self.__uv$config = { prefix: "/uv/service/",