Giter VIP home page Giter VIP logo

titaniumnetwork-dev / ultraviolet-node-archive Goto Github PK

View Code? Open in Web Editor NEW
72.0 11.0 906.0 387 KB

Highly sophisticated proxy used for evading internet censorship or accessing websites in a controlled sandbox using the power of service-workers and more! Easy deployment version (Node.js)

Home Page: https://ultravioletsw.dev

JavaScript 59.84% Procfile 1.37% Shell 38.79%
titanium-network proxy webapp nodejs unblock heroku repl es6 es6-javascript javascript

ultraviolet-node-archive's Introduction

Ultraviolet-Node

The deployable version of 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!

Features

  • CAPTCHA support along with hCAPTCHA support
  • URL encoding settings to further hide activity when using Ultraviolet
  • Configuration all done on the client-side via service-workers
  • Speed in comparison to other web proxies that fully proxy content
  • Blacklist setting and more for easy hosting
  • Security in mind and leak prevention
  • Frequent updates to improve site support or fix security issues

Supported Sites

Technologies Used

  • Service Workers
  • HTML, JS, CSS rewriting
  • Parse5
  • Acorn.js

Used by

  • Incognito, a popular web proxy service with focus on privacy
  • Holy-Unblocker, a popular web proxy service focusing on bypassing web filters and more
  • Hypertabs, a web proxy service using a PWA browser as its frontend

Table of Contents

Installation and Setup

Installation of Ultraviolet is simple. You can find a Tl;DR of the installation and setup process just below. If you are unfamiliar with the "standard" installation process, look a bit farther down for a more comprehensive installation and setup guide.

Basic Guide

$ git clone https://github.com/titaniumnetwork-dev/Ultraviolet-Node --recursive
$ cd Ultraviolet-Node
$ npm install
$ npm start

Replit Setup Guide

To setup on Replit, first click on the "Run on Replit" button. After loading into your repl, click on the green "Run" button. Alternatively, run the following commands:

$ npm install
$ chmod +x main.sh
$ ./main.sh

You will only have to run the second command once. It just allows main.sh to be executed. By running main.sh, you will update any submodules and will start the app.

Note: If you choose not to use main.sh, but would rather just run all commands manually, please note that you will have to manually install submodules by running git update submodules --init. Without it, static will not be installed, and that is a required directory.

Comprehensive Guide

Below will describe a comprehensive guide to install Ultraviolet on Linux machines.

To clone the repository, simply run the following command:

$ git clone https://github.com/titaniumnetwork-dev/Ultraviolet-Node --recursive

The --recursive flag will clone the repository and all submodules.

To begin work on the actual setup, cd into the repository. You can do so by running the following command:

$ cd Ultraviolet-Node

From here, you can update your submodules and install your dependencies. To do so, run the following command:

$ npm install

Finally, to start Ultraviolet, run the following command:

$ npm start

You can then find Ultraviolet on http://127.0.0.1:8080. If you would like to change the port UV will be running on, edit the last line in index.mjs.

Please note that UV will not function without HTTPS. If you are hosting on Replit or Heroku, this won't be a problem as they provide you with SSL/TLS by default and will automatically apply it to your instance, however if you are attempting to host UV on a different platform, such as a personal server, you WILL need to use HTTPS.

Configuration

Configuring Ultraviolet is very simple. Simple descriptions of each configurable option are provided as a comment in the block below. More detailed documentation can be found just below mentioned block.

uv.config.js

self.__uv$config = {
    prefix: '/sw/', // Proxy url prefix
    bare: '/bare/', // Bare server location
    encodeUrl: Ultraviolet.codec.xor.encode, // URL Encoding function
    decodeUrl: Ultraviolet.codec.xor.decode, // Decode URL function
    handler: '/uv.handler.js', // Handler script
    bundle: '/uv.bundle.js', // Bundled script
    config: '/uv.config.js', // Configuration script
    sw: '/uv.sw.js', // Service Worker Script
};
Configuration Options and Explanation
Prefix The prefix is the prefix that you want users to see. Ex: https://example.com/service. The default prefix is service.
Bare Bare Servers can run on directories. For example, if the directory was /bare/ then the bare origin would look like http://example.org/bare/. The bare origin is passed to clients.
encodeUrl EncodeUrl is how you want the URL a proxy site's visitors has to be encoded. Options include Ultraviolet.codec.base64.encode, Ultraviolet.codec.plain.encode, or Ultraviolet.codec.xor.encode. It is recommended that you use xor or base64 as it hides the queries your visitors are searching and visiting.
decodeURL DecodeUrl is how you want the url to be decoded. It is recommended you keep it the same as encodeUrl.
Handler Handler is the path to the UV handler. The default name and path to this file is static/uv/uv.handler.js.
Bundle Bundle is the path to the UV bundle file. The default name and path to this file is static/uv/uv.bundle.js.
Config Config is the path to the UV config file. The default name and path to this file is static/uv/uv.bundle.js.
SW SW is the path to the UV Service Worker script. The default name and path to this file is static/uv/uv.sw.js.

Static Files

Static files is the frontend for Ultraviolet. A standalone repository for it can be found here.

Core Scripts

Configuration mentions a few scripts that make up Ultraviolet. To get documentation for what each of the scripts do, check out the documentation for them in their standalone repository.

Main Scripts After Building

The client-hooking & service worker scripts required for UV are located in ultraviolet-scripts

  • Scripts
    • uv.sw.js Service worker gateway
    • uv.sw-handler.js - Service worker handler
    • uv.bundle.js Webpack compiled Ultraviolet rewriter
    • uv.handler.js Client-side hooking
    • uv.config.js Configuration

Authors

  • Caracal.js (Creator of Ultraviolet)
  • Divide (Creator of TOMP)

Credits

ultraviolet-node-archive's People

Contributors

caracal-js avatar degen-dev avatar isaaclk avatar quiteafancyemerald avatar rockpods avatar shirt-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ultraviolet-node-archive's Issues

Incorrect windows-1251 handling

Sites encoded with windows-1251 are not rendered correctly.

Expected Behavior

Site should look just like it does without proxy.

Current Behavior

Non-ascii characters are replaced with mess (пїЅпїЅпїЅ).

Possible Solution

Instead of taking response.text(), you should decode it considering charset from headers and also update headers accordingly.

Steps to Reproduce

open rutracker.org

Context (Environment)

Detailed Description

Possible Implementation

I made a simple fix which works for rutracker, but you probably have to implement a better solution to work everywhere
(zuev-stepan/Ultraviolet-Static@551b538)

Skip Ad button on YouTube gone

i think that this counts as a "blocked site issue" or something but I don't care either.
Youtube's not even blocked I just through you should know

the skip ad button is gone (oh no)

Expected Behavior

it should be there 🤯

Current Behavior

it's not there 🤯🤯😮

Possible Solution

dont have one sorry

Steps to Reproduce

  1. go to youtube (i've tried it on replit and self hosted and the both have the same issue)
  2. click a video
  3. done

Context (Environment)

How has this issue affected me???

grammarly and 40 minute ads about diet

Detailed Description

im good

an artist's rendition of the issue

Screenshot 2022-06-05 8 03 21 AM

an ai's rendition of me after watching a 50 second grammarly ad

image

Possible broken proxy

This may be a problem on my end, but recently when I've been using this proxy it doesn't go to the link and instead reloads the page but with a "?" at the end off the url. Links that are already there work just fine. It's a form submission issue.

When i use Ultraviolet this happens

Ultraviolet is a good proxy but when i use certain sites like instagram it comes up in a diffrent language now this may be me but i dont have a way to change it its weird plz fix it

Discord calls not working correctly (DigitalOcean)

The students at my school recently found out about incog.dev, since then the servers have been very slow in my experience. So I have created my own private server on digital 2vcpu 4gb ram, and it's worked great! Problem is, when I try to call someone on Discord, I am unable to unmute my mic. Screen share works, camera works. I just can't unmute my microphone. Here's the link if you want to try to recreate the problem https://wom.idrus.ga/service/hvtrs8%2F-dksaopd%2Ccmm-

I was using a cloudflare tunnel but have since fixed it so I'm no longer using agro tunnels.
I also have allowed microphone access in the site settings, so that can't be the problem.
Another thing, mic test works, I just can't unmute in calls.
Screenshot 2022-03-06 10 36 06 AM
Screenshot 2022-03-06 10 34 18 AM

Error on replit

Replit loads, but then when I click run it runs for two seconds and then stops and says error.

XML

Issue tracker is ONLY used for reporting bugs. New features should be discussed on our Discord server.

XML issue

Expected Behavior

When signing into play.geforcenow,com it says,
This XML file does not appear to have any style information associated with it. The document tree is shown below.

AccessDenied
Access Denied
Y0XR2DQHCM94AY1J
89cuJ4sEcylPclKzkt7j19sw7nXO+9g6S/QzcyJicPnDtm7NOx8WSEgki0Zve+Sx1jljXTI5LSA=

Current Behavior

Still the same tried making a new one on replit, railway all have the same issue

Possible Solution

Geforce most likely upgraded security

Steps to Reproduce

Go to play.geforcenow.com
Click log in
Log in
"Screen will then go blank if pop-ups are disabled"
enable pop ups
reload the page
XML error message

Context (Environment)

Doesn't allow me to use GeForce now
Not sure how to fix but the same thing happens to other websites like xbox.com

XML issue

Detailed Description

This XML file does not appear to have any style information associated with it. The document tree is shown below.

AccessDenied
Access Denied
Y0XR2DQHCM94AY1J
89cuJ4sEcylPclKzkt7j19sw7nXO+9g6S/QzcyJicPnDtm7NOx8WSEgki0Zve+Sx1jljXTI5LSA=

Possible Implementation

Make it so google stop saying the website is unsecure it constantly telling me that when I use a password for accounts saved on my laptop.

RangeError for Discord

When trying to access discord.com/app this error occurs.

RangeError: Failed to construct 'Response': The status provided (0) is outside the range [200, 599].

shows history?

Issue tracker is ONLY used for reporting bugs. New features should be discussed on our Discord server.

Expected Behavior

dont show history (if it is coded to not show history)

Current Behavior

shows history

Possible Solution

doesn't show history please

Steps to Reproduce

  1. start a website running Ultraviolet-Node

Context (Environment)

a proxy for my school that kids use. I have got Ultraviolet-Node to run on a website i created but some people dont like to use it because all there searchs show up in search history (the normal one in chrome) and they would like to not have search history shown but i am not a coder and work with making gadgets and other stuff

Detailed Description

not showing browsing history

Possible Implementation

copying off of incognito proxy
Note: (sorry this is not a real bug is issue just thought it would be cool to add or if someone could tell me a way to do it myself)

Able to run on my personal computer but not on VPS

I was running this on my personal computer (MacBook) and it successfully runned and was able to search and visit websites, but when I deployed it on my VPS (Ubuntu 18.04), I couldn't search up things or visit websites using the proxy.

Expected Behavior

Able to search things and visit websites with the proxy.

Current Behavior

Does not redirect me to a proxy search page/website.

Possible Solution

I don't know

Steps to Reproduce

  1. Run UltraViolet on Ubuntu 18.04 with NPM version 8.6.0 and node version 14.17.1
  2. Access the hosted website from a different network
  3. Search something up

Context (Environment)

I'm trying to be able to use the proxy

Heroku problems

Hi there,

I've noticed that when trying to deploy to Heroku, there is an application error.
If you could fix this it would be greatly appreciated!

Websockets Do Not Close Between Nginx And UV Even After The Client Disconnects

When the client disconnects from the proxied WebSocket Nginx and UV are still sending messages to each other.

Current Behavior

The WebSocket is still connected even when the client that started it has not.

Steps to Reproduce

  1. Connect to a proxied WebSocket.
  2. Disconnect.
  3. Nginx and UV are still connected to each other.

Detailed Description

Please make it so that Nginx and UV disconnect when the client disconnects.

What is a bare server on uv.config.js?

Can someone please explain, what a bare server is? And how is it helpful for a web proxy?

I noticed on uv.config.js there is an option to specify bare server location. But clueless on what exactly it is. Please throw some light.

Also, am having hard time figuring out how to add domains to blacklist, and injecting analytics code on proxy pages. Will be great if you can help achieve these.

Random Pages Go White

Loads white page or error 404 on it.

Expected Behavior

Website Loads Easily no errors

Current Behavior

error 404 or loads a blank white page

Possible Solution

Steps to Reproduce

  1. open a website eg: tetr.io
  2. wait 5 secconds for the browser check
  3. white page shows or 404

Context (Environment)

Somehow bypass the loading isses

Detailed Description

Somehow bypass cloudflare or other isses because it will get white paged or 404

Can't login to google (don't know if this is fixable)

image
I've tried allowing logins to apps that aren't secure in my account settings, but that didn't work. Even if it did, they're removing the setting entirely at the end of this month. Is there anything that can be done about this?

"TypeError: Failed to Fetch"

it works sometimes and it sometimes dosent. I really dont know what the issue is because it gives no details.

Problem using Ultraviolet on some ARM based browsers

Expected Behavior

When attempting to go to a website with the bar with the text "Search the web freely" you should be able to press the enter key and go to associated website.

Current Behavior

Attempting to do so fails, and will give you a Page Not Found error or just completely fail to function.

Possible Solution

A solution should be to simply add a button that when used by a mouse will function like the enter key, which is simple, but some may not know how to do this, and may not understand.

Steps to Reproduce

  1. any ultraviolet node will do, mine being https://deweyy.gq
  2. open said link, or any other
  3. attempt in the web address bar to type any web address. Me, attempting my own website and https://www.google.com
  4. the input form seems to not recognize said input and should not respond

Context (Environment)

PC that was used:
Raspberry Pi 400 OC to 2.2 GHz (if relevant)
OS: Raspbian (Raspberry Pi OS) 32 Bit, slightly modified kernel to allow turbo
Browser: Chromium 78.0.3904.108 Raspbian 10 (32-bit)
JavaScript Version: V8 7.8.279.23

Additional information

I have ensured that this is not a keyboard issue.

Ultraviolet.codec support plain

Now Ultraviolet.codec supports xor and base64, but I hope it supports plain, i.e, no encoding.

Plain is quite useful in simply adding a prefix to host a mirror for upstream softwares like rpm, anaconda, etc. For example, I may change the default channel of anaconda https://repo.anaconda.com/pkgs/main/ to https://my_ultraviolet_node/service/https://repo.anaconda.com/pkgs/main/. This will be the easiest mirror hosting solution.

replit short term loss

Every time I do the quick deploy to replit it works, but if I turn my laptop off for a few hours or something and it disconnects, then once I turn it back on, the repl doesn't run and you would assume you could just stop it and re run it again but no, the repl decides that once you try to run it again that it doesn't want to agree and I have to delete my repl that I made and make a new one with the same name, otherwise my browser history is lost and I have to relog my accounts.

What should i do

It's an issue with compatibility I tried it several times same results. Not sure how to fix it. image has console info for the error.
Screenshot 2022-03-27 144102

UltraViolet-Node not working in Browser.

So i was opening UltraViolet-Node on my School Chromebook in my browser, And about two days ago It Would bring me to a page saying "Run This Repl To See The Results Here." I Tried To and its still not working. is there a fix for this?

Websockets Do Not Close When Behind Nginx

Notes

This is behind Nginx.

Expected Behavior

Websockets should close after the user ends their proxy session or closes their tab.

Current Behavior

The Websockets stay open resulting in very high Nginx CPU usage and also UV CPU usage.

Steps to Reproduce

  1. Make a websocket connecting through the proxy.
  2. Close it on the user side.
  3. UV is still connected to the remote server.

Context (Environment)

This makes my server very slow and shows 99% of UV CPU usage when it is doing nothing

Detailed Description

Please make a change when the user closes the WS UV also closes it on the server side.

No app.json

You'll need to add one to run on Heroku. Otherwise, why is the button there in the first place??

Proper usage of external bare server

Issue tracker is ONLY used for reporting bugs. New features should be discussed on our Discord server.

I am working on getting Ultraviolet to work on a static (next.js) server. However, the bare server is not usable on static deployments. I tried setting up an external bare server (with CORS properly configured) at https://is-bare.up.railway.app/bare/. I am still getting the error of TypeError: NetworkError when attempting to fetch resource.

Railway Deployment Issues

When attempting to deploy to the Railway platform, the deployment succeeds but soon after crashes. I cannot figure out how to fix it.

Expected Behavior

It should highlight the link in green and should let it work like usual.

Current Behavior

Instead there is a server error and it doesn't work.

Possible Solution

I am not too good at web coding, but I think it may not be configured for Railway.

Steps to Reproduce

  1. Fork this github
  2. Go to Railway and begin deployment
  3. Wait...
  4. Watch your failure take place when you click the link.

Context (Environment)

Trying to deploy.

Detailed Description

Possible Implementation

Decide on Replit support

It has been said many times that Replit is not supported, such as on #29. If this is the case, the Deploy to Replit button should be removed from README.md as to not give the false impression that Replit is supported.

The path of the provided scope ('/service/') is not under the max scope allowed ('/static/js/'). Adjust the scope, move the Service Worker script, or use the Service-Worker-Allowed HTTP header to allow the scope.

I copied a lot of code from Ultraviolet-Node and whenever I press enter, this error along with another similar to that one (Uncaught (in promise) DOMException: Failed to register a ServiceWorker for scope ('linkhere/service/') with script ('linkhere/static/js/sw.js'): The path of the provided scope ('/service/') is not under the max scope allowed ('/static/js/'). Adjust the scope, move the Service Worker script, or use the Service-Worker-Allowed HTTP header to allow the scope.) comes up.

Expected Behavior

It should go to the website that was entered into the form.

Current Behavior

It shows the above errors and does not work

Possible Solution

The sw.js needs moved somewhere else and I may have setup the bare server wrong, since I'm using express, and not just a normal site.

Steps to Reproduce

https://edurelief.cf
using incognito's bare server (https://incog.dev/bare/) might have something to do with it..?

Context (Environment)

I'm trying to make a hub for school and friends, and Ultraviolet isn't working with my express atm..

Possible Implementation

Steps to use express if this is a problem with express

Directory

index.js node_modules package-lock.json views
index.mjs package.json particles.json static
Static:
js(folder with js including sw.js and form.js which has the form script) styles(folder with styling) uv(folder with core files)
Views:
index.ejs particles.ejs(test file for particles.js)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.