Skip to content

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

License

Notifications You must be signed in to change notification settings

duckman32/Corrosion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corrosion

Titanium Network's web proxy.

Project is still in development! Pull requests that contribute a lot will be accepted :)

Notable websites that work

  • Youtube
  • Twitch
  • Instagram
  • Discord
  • Disney Plus
  • Tik Tok
  • Reddit

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)).on('upgrade', proxy.upgrade).listen(80);

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.
    • responseMiddleware Array - Array of middleware functions for proxy response.
    • standardMiddleware Boolean - Use the prebuilt middleware used by default.

Properties:

URL Wrapper

Methods:

wrap

  • val String
  • config Configuration
    • base WHATWG URL
    • origin Location origin
    • 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 pathname containg the proxy url)
    • flags Boolean Returns with both the URL and flags found { value: 'https://example.org', flags: ['xhr'], })
    • leftovers Boolean

JS Rewriter

Methods:

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 Rewriter

Methods:

process

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

HTML Rewriter

Methods:

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

Cookie Rewriter

Methods:

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

Methods:

encode

decode

  • str String

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%