The official proxy of Titanium Network with enhanced support for a large majority of sites with hCAPTCHA support. Successor to Alloy Proxy.

Overview

Corrosion

Titanium Networks main web proxy. Successor to Alloy

Installation:

npm i corrosion

Example:

const Corrosion = require('corrosion');
const proxy = new Corrosion();
const http = require('http')
http.createServer((req, res) => 
  proxy.request(req, res) // Request Proxy
).on('upgrade', (req, socket, head) => 
  proxy.upgrade(req, socket, head) // WebSocket Proxy
).listen(80);

Access a website by going to /prefix/gateway?url=URL

Much more in depth one is in the demo folder.

API:

Index

  • config
    • prefix String - URL Prefix
    • title (Boolean / String) - Title used for HTML documents
    • ws Boolean - WebSocket rewriting
    • cookie Boolean - Request Cookies
    • codec String - URL encoding (base64, plain, xor).
    • requestMiddleware Array - Array of middleware functions for proxy request (Server).
    • responseMiddleware Array - Array of middleware functions for proxy response (Server).
    • standardMiddleware Boolean - Use the prebuilt middleware used by default (Server).

request

  • request Request
  • response Response

upgrade

  • request Request
  • socket Socket
  • head Head

bundleScripts

Bundles scripts for client injection. Important when updating proxy.

Properties

url

wrap

  • val String
  • config Configuration
    • base WHATWG URL
    • origin Location origin - Adds a location origin before the proxy url
    • flags Array - ['xhr'] => /service/xhr_/https%3A%2F%2Fexample.org/

unwrap

  • val String
  • config Configuration
    • origin Location origin - Required if a location origin starts before the proxy url
    • flags Boolean - Returns with both the URL and flags found { value: 'https://example.org', flags: ['xhr'], })
    • leftovers Boolean - Use any leftovers if any after the encoded proxy url

Properties

  • regex Regex used to determine to rewrite the URL or not.

  • prefix URL Prefix

  • codec (base64, plain, xor)

js

process

  • source JS script
  • url URL for heading

iterate

  • ast JS AST
  • Callback Handler initated on AST node

createHead

  • url URL for heading

createCallExperssion

  • callee Acorn.js Node
  • args Array

createArrayExpression

  • elements Array

createIdentifier

  • name Identifier name
  • preventRewrite Prevent further rewrites

createLiteral

  • value Literal value

css

process

  • source CSS
  • config Configuration
    • base WHATWG URL
    • origin Location origin
    • context CSS-Tree context

html

process

  • source HTML Source
  • config Configuration
    • document Determines of its a document or fragment for parsing
    • base WHATWG URL
    • origin Location origin

source

  • processed Rewritten HTML
  • config Configuration
    • document Determines of its a document or fragment for parsing

Properties

  • map Map for attribute rewriting

cookies

encode

  • input New (Cookie / Cookies)
  • config Configuration
    • url WHATWG URL
    • domain Cookie Domain
    • secure Cookie Secure

decode

  • store Encoded Cookies
  • config Configuration
    • url WHATWG URL

codec

encode

decode

  • str String

middleware

Middleware are functions that will be executed either before request or after response. These can alter the way a request is made or response is sent.

function(ctx) {r
  ctx.body; // (Request / Response) Body (Will return null if none)
  ctx.headers; // (Request / Response) Headers
  ctx.url; // WHATWG URL
  ctx.flags; // URL Flags
  ctx.origin; // Request origin
  ctx.method; // Request method
  ctx.rewrite; // Corrosion object
  ctx.statusCode; // Response status (Only available on response)
  ctx.agent; // HTTP agent
  ctx.address; // Address used to make remote request
  ctx.clientSocket; // Node.js Server Socket (Only available on upgrade)
  ctx.clientRequest; // Node.js Server Request
  ctx.clientResponse; // Node.js Server Response
  ctx.remoteResponse; // Node.js Remote Response (Only available on response)
};

Default middleware

  • Request

    • requestHeaders
  • Response

    • responseHeaders
    • decompress
    • rewriteBody

Available Middleware

address (Request)

  • arr Array of IP addresses to use in request
const Corrosion = require('corrosion');
const proxy = new Corrosion({
  requestMiddleware: [
    Corrosion.middleware.address([ 
      0.0.0.0, 
      0.0.0.0 
    ]),  
  ],
});

blacklist

  • arr Array of hostnames to block clients from seeing
  • page Block page
const Corrosion = require('corrosion');
const proxy = new Corrosion({
  requestMiddleware: [
    Corrosion.middleware.blacklist([ 
      'example.org',
      'example.com',
    ], 'Page is blocked'),  
  ],
});

Todo:

  • Inject header much more property in JS rewriter (because of import statements)
Comments
  • SSL Problems

    SSL Problems

    Describe the bug These issues are on Heroku and railway.app hosting services. The hosting platform's SSL causes js to not load, discord login screen to just be blank, and other bugs

    image image image image ...etc

    However, if you connect with HTTP only, it will work, except there will be no HCapcha (no discord). And there will be that "Not Secure" banner. Confirmed that this is the hosting services fault because it works fine on localhost

    opened by OnlyCS 2
  • Error: connect ECONNREFUSED 127.0.0.1:80

    Error: connect ECONNREFUSED 127.0.0.1:80

    Trying to make a demo site on Glitch and I got this error:

    Error: connect ECONNREFUSED 127.0.0.1:80

    Glitch blocks ports other than 3000, can I move this port to 3000? This is the code I used:

    const Corrosion = require('corrosion');
    const proxy = new Corrosion();
    const http = require('http')
    http.createServer((req, res) => 
      proxy.request(req, res) // Request Proxy
    ).on('upgrade', (req, socket, head) => 
      proxy.upgrade(req, socket, head) // WebSocket Proxy
    ).listen(3000);
    
    opened by RiversideRocks 1
  • Force Https Rewriting

    Force Https Rewriting

    Adding this would allow for hosting on Heroku, Glitch, and Repl.it for kids with no money to buy a vps

    the code is pretty messy but it has worked in my tests

    opened by EnderKingJ 0
  • Is chaining this to another proxy good idea?

    Is chaining this to another proxy good idea?

    Is chaining this to another proxy good idea? Via http_proxy environment variable?

    I have a proxy running and want to go via that for all outgoing traffic.

    opened by wildone 0
  • Can't get in discord or anything

    Can't get in discord or anything

    Won't let me get on any sites, will take me to a 401/400 page saying that try again later.

    If I type in a site, it won't let me go pass.

    Takes me to a 401 page saying to try again later. A clear and concise description of what you expected to happen.

    image

    On chromebook.

    opened by g3-geo 2
  • instagram dm problems.

    instagram dm problems.

    so. whenever i try to go to instagram and go into my dms none of the people load and sometimes it will crash. i dont know how to take a screenshot of this cause its wayy too laggy i dont know why this is happening or if its just normal or something but how do i fix this. ive tried reloading the page try closing the tab and reopening- trying to reset my whole laptop. nothing will work?. im on a chromebook using chrome as a web browser. it is a school laptop.

    opened by insgah 3
  • hCaptcha issue

    hCaptcha issue

    The hCaptcha isn't working, this issue was opened on the Holy Unblocker repository and was told to be put here.

    https://github.com/titaniumnetwork-dev/Holy-Unblocker/issues/196

    bug help wanted 
    opened by Maximus-Pinpoint 4
Owner
Titanium Network
We create popular web-proxy sites.
Titanium Network
a hack to allow direct connections to unifi protect on a different layer 3 network

unifi-proxy Very rudimentary tools to interface with Unifi devices over the UDP discovery protocol (port 10001). This was originally written to allow

Dave Eddy 49 Nov 11, 2022
A full-featured http proxy for node.js

node-http-proxy node-http-proxy is an HTTP programmable proxying library that supports websockets. It is suitable for implementing components such as

http ... PARTY! 13.1k Jan 3, 2023
Full-featured, middleware-oriented, programmatic HTTP and WebSocket proxy for node.js

rocky A multipurpose, full-featured, middleware-oriented and hackable HTTP/S and WebSocket proxy with powerful built-in features such as versatile rou

Tom 370 Nov 24, 2022
Global HTTP/HTTPS proxy agent configurable using environment variables.

global-agent Global HTTP/HTTPS proxy configurable using environment variables. Usage Setup proxy using global-agent/bootstrap Setup proxy using bootst

Gajus Kuizinas 267 Dec 20, 2022
A proxy web app that serves ABC iView content outside of the iView webplayer, avoiding intrusive data harvesting.

iview-proxy A proxy web app that serves ABC iView content outside of the iView webplayer, avoiding intrusive data harvesting. There's also a cool Andr

The OpenGov Australia Project 11 Jul 16, 2022
DSC-AlarmServer - Creates web interface to DSC/Envisalink with proxy.

DSC-AlarmServer Creates web interface to DSC/Envisalink with proxy. Since the Envisalink module can only have one connection, this phython script can

null 4 Oct 11, 2022
Prefect API Authentication/Authorization Proxy for on-premises deployments

Proxy Authorization Service for Prefect UI and Prefect CLI Prefect is a great platform for building data flows/pipelines. It supports hybrid execution

Softrams 20 Dec 10, 2022
wabac.js CORS Proxy

wabac.js CORS Proxy This provides a simple CORS proxy, which is designed to run as a Cloudflare Worker. This system is compatible with wabac.js-based

Webrecorder 3 Mar 8, 2022
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)

Ultraviolet-Node The deployable version of Ultraviolet, a highly sophisticated proxy used for evading internet censorship or accessing websites in a c

Titanium Network 27 Jan 2, 2023
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)

Ultraviolet-Node The deployable version of Ultraviolet, a highly sophisticated proxy used for evading internet censorship or accessing websites in a c

Titanium Network 34 Apr 15, 2022
Simple, configurable part mock part proxy

Moxy Simple, configurable mock / proxy server. Table of Contents Quick start Programatic CLI Docker Docker compose Usage Programatic Via HTTP requests

Acrontum GmbH 7 Aug 12, 2022
Wrap native HTTP requests with RFC compliant cache support

cacheable-request Wrap native HTTP requests with RFC compliant cache support RFC 7234 compliant HTTP caching for native Node.js HTTP/HTTPS requests. C

Luke Childs 259 Dec 20, 2022
Automagically bypass hcaptcha challenges with http api, with puppeteer, selenium, playwright browser automation scripts to bypass hCaptcha programmatically

Automagically bypass hcaptcha challenges with http api, with puppeteer, selenium, playwright browser automation scripts to bypass hCaptcha programmatically. For help you can message on discord server with the bellow link. You can also create an issue.

Shimul 199 Jan 2, 2023
⚡️The Fullstack React Framework — built on Next.js

The Fullstack React Framework "Zero-API" Data Layer — Built on Next.js — Inspired by Ruby on Rails Read the Documentation “Zero-API” data layer lets y

⚡️Blitz 12.5k Jan 4, 2023
Adds links to Discogs pages from various sites. Auto search for music on torrent and other sites. Does multi auto-search on Artist/Discography pages. Auto search local HDDs/filelists using Voidtools Everything search engine.

Discogs Scout: Adds links to Discogs pages from various sites. Auto search for music on torrent and other sites. Does multi auto-search on Artist/Disc

null 27 Dec 27, 2022
Twitter recommends that the majority of developers start to think about migrating to v2 of the API

Passport-Twitter2.0 with PKCE Twitter recommends that the majority of developers start to think about migrating to v2 of the API. This package is a Pa

null 11 Dec 11, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
hCaptcha Component Library for Solid.

Solid hCaptcha Component Library This is a port of @hcaptcha/react-hcaptcha for Solid. Description hCaptcha is a drop-replacement for reCAPTCHA that p

Mikkel RINGAUD 5 Dec 4, 2022