Titanium Network's web proxy.
Project is still in development! Pull requests that contribute a lot will be accepted :)
npm i corrosion
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.
config
config.prefix
Prefixconfig.title
Title used for HTML documentsconfig.ws
WebSocket rewritingconfig.cookie
Request Cookiesconfig.codec
URL encoding (base64, plain, xor).config.requestMiddleware
Server only - Array of middleware functions for proxy request.config.responseMiddleware
Server only - Array of middleware functions for proxy response.config.standardMiddleware
Server only - Use the prebuilt middleware used by default.
source
JS scripturl
URL for heading
ast
JS ASTCallback
Handler initated on AST node
url
URL for heading
callee
Acorn.js Nodeargs
Array
elements
Array
name
Identifier namepreventRewrite
Prevent further rewrites
value
Literal value
source
CSSconfig
Configurationbase
WHATWG URL Instanceorigin
Location origincontext
CSS-Tree context
source
HTML Sourceconfig
Configurationdocument
Determines of its a document or fragment for parsingbase
WHATWG URL Instanceorigin
Location origin
processed
Rewritten HTMLconfig
Configurationdocument
Determines of its a document or fragment for parsing
map
Map for attribute rewriting