-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 06a8031
Showing
21 changed files
with
7,876 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "Ultraviolet-Devel", | ||
"build": { | ||
"dockerfile": "../docker/Dockerfile", | ||
"target": "devel", | ||
"context": "../" | ||
}, | ||
"forwardPorts": [ | ||
8080 | ||
], | ||
"workspaceFolder": "/app" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"root": true, | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
Issue tracker is **ONLY** used for reporting bugs. New features should be discussed on our Discord server. | ||
|
||
<!--- Provide a general summary of the issue in the Title above --> | ||
|
||
## Expected Behavior | ||
|
||
<!--- Tell us what should happen --> | ||
|
||
## Current Behavior | ||
|
||
<!--- Tell us what happens instead of the expected behavior --> | ||
|
||
## Possible Solution | ||
|
||
<!--- Not obligatory, but suggest a fix/reason for the bug, --> | ||
|
||
## Steps to Reproduce | ||
|
||
<!--- Provide a link to a live example, or an unambiguous set of steps to --> | ||
<!--- reproduce this bug. Include code to reproduce, if relevant --> | ||
|
||
1. | ||
2. | ||
3. | ||
4. | ||
|
||
## Context (Environment) | ||
|
||
<!--- How has this issue affected you? What are you trying to accomplish? --> | ||
<!--- Providing context helps us come up with a solution that is most useful in the real world --> | ||
|
||
<!--- Provide a general summary of the issue in the Title above --> | ||
|
||
## Detailed Description | ||
|
||
<!--- Provide a detailed description of the change or addition you are proposing --> | ||
|
||
## Possible Implementation | ||
|
||
<!--- Not obligatory, but suggest an idea for implementing addition or change --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Community Support | ||
url: https://discord.gg/unblock | ||
about: Please ask and answer questions here. | ||
- name: Heroku, Repl.it, Blocked site issues | ||
url: https://www.youtube.com/watch?v=BLUkgRAy_Vo | ||
about: Do not create issues for these. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Build and Push to Docker Hub | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: "30 12 * * 0" # Run once every Sunday | ||
|
||
env: | ||
REPO: ultraviolet-node | ||
PLATFORMS: linux/amd64,linux/arm64 | ||
|
||
jobs: | ||
build_and_push_docker_images: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERUSERNAME }} | ||
password: ${{ secrets.DOCKERPASSWORD }} | ||
|
||
- name: Build Test Image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: ${{ env.REPO }} | ||
tags: test | ||
containerfiles: | | ||
./docker/Dockerfile | ||
build-args: | | ||
NPM_BUILD=npm ci --omit=dev --frozen-lockfile | ||
- name: Test | ||
run: | | ||
podman run --rm -d -p 8080:8080 localhost/${{ env.REPO }}:test | ||
chmod +x ./docker/test.sh | ||
./docker/test.sh -p 8080 -h 0.0.0.0 -t 15 | ||
- name: Install qemu | ||
if: github.event_name != 'pull_request' | ||
run: | | ||
sudo apt-get install -y qemu-user-static | ||
- name: Build Production Images | ||
if: github.event_name != 'pull_request' | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: ${{ env.REPO }} | ||
tags: latest ${{ github.sha }} | ||
containerfiles: | | ||
./docker/Dockerfile | ||
platforms: ${{ env.PLATFORMS }} | ||
build-args: | | ||
NPM_BUILD=npm ci --omit=dev --frozen-lockfile | ||
- name: Push To Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: ${{ steps.build-image.outputs.image }} | ||
tags: ${{ steps.build-image.outputs.tags }} | ||
registry: docker.io/${{ secrets.DOCKERUSERNAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# ESLint is a tool for identifying and reporting on patterns | ||
# found in ECMAScript/JavaScript code. | ||
# More details at https://github.com/eslint/eslint | ||
# and https://eslint.org | ||
|
||
# https://github.com/actions/starter-workflows/blob/main/code-scanning/eslint.yml | ||
|
||
name: ESLint | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
schedule: | ||
- cron: "30 12 * * 0" # Run once every Sunday | ||
|
||
jobs: | ||
eslint: | ||
name: Run eslint scanning | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
security-events: write | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install ESLint | ||
run: | | ||
npm install eslint@8.10.0 | ||
npm install @microsoft/eslint-formatter-sarif@2.1.7 | ||
- name: Run ESLint | ||
run: npx eslint . | ||
--config .eslintrc.json | ||
--ext .js,.jsx,.ts,.tsx | ||
--format @microsoft/eslint-formatter-sarif | ||
--output-file eslint-results.sarif | ||
continue-on-error: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: eslint-results.sarif | ||
wait-for-processing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
static | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"useTabs": false, | ||
"singleQuote": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language = "nix" | ||
run = ["npm", "start"] | ||
|
||
[packager] | ||
language = "nodejs-npm" | ||
|
||
[nix] | ||
channel = "stable-22_05" | ||
|
||
[debugger] | ||
|
||
[unitTest] | ||
language = "nodejs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM node:18-alpine | ||
|
||
ENV NODE_ENV=production | ||
ARG NPM_BUILD="npm install --omit=dev" | ||
EXPOSE 8080/tcp | ||
|
||
LABEL maintainer="TitaniumNetwork Ultraviolet Team" | ||
LABEL summary="Ultraviolet Proxy Image" | ||
LABEL description="Example application of Ultraviolet which can be deployed in production." | ||
|
||
WORKDIR /app | ||
|
||
COPY ["package.json", "package-lock.json", "./"] | ||
RUN $NPM_BUILD | ||
|
||
COPY . . | ||
|
||
ENTRYPOINT [ "node" ] | ||
CMD ["src/index.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Titanium Network | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<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. | ||
|
||
In public/register-sw.js, look for the line `BareMux.SetTransport("EpxMod.EpoxyClient", { wisp: "ws://localhost:8080/wisp" });`, which can be changed to any of the transports. Make sure to `importScripts` the transport's bundle in `public/uv/sw.js` and add a script tag in both `public/404.html` and `public/index.html`. | ||
|
||
See the [bare-mux](https://github.com/MercuryWorkshop/bare-mux) documentation for more information |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
services: | ||
ultraviolet: | ||
build: | ||
context: . | ||
dockerfile: docker/Dockerfile | ||
args: | ||
- NPM_BUILD=npm ci --omit=dev --frozen-lockfile | ||
ports: | ||
- "8080:8080" |
Oops, something went wrong.