Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.
elitwo edited this page Aug 26, 2021 · 1 revision

Table of Contents

Internals

Index

request

  • request Request
  • response Response

upgrade

  • request Request
  • socket Socket
  • head Head

bundleScripts

  • Bundles scripts for client injection. Important when updating proxy.

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)

Javascript

Process

  • source Javascript Source
  • url URL for heading

Iterate

  • ast Javascript 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

  • str String

Decode

  • str String