Proxyman
HomepageDownload
  • Overview
  • Changelog
  • License
  • License Manager
  • Raycast
  • Command-line
  • Security Compliance
  • Proxyman iOS
    • Proxyman for iOS
    • Map Local for iOS
    • Breakpoint for iOS
    • Tutorial for iOS
      • Map Local for iOS Tutorial
      • Breakpoint for iOS Tutorial
  • Debug on Devices
    • macOS
    • iOS Device
    • iOS Simulator
    • tvOS & watchOS
    • Android Device & Emulator
      • Automatic Script for Android Emulator
      • Sample Android Project
    • Firefox
    • Java VMs
    • Python
    • Ruby
    • NodeJS
    • Rust
    • Golang
    • React Native
    • Flutter
    • HTTP Clients
    • Docker
    • ElectronJS
    • NextJS (fetch)
  • Automatic Setup
    • Automatic Setup
    • Manual Setup
    • Troubleshooting
  • Atlantis
    • Atlantis for iOS
  • BASIC FEATURES
    • Proxyman Proxy Helper Tool
    • Request / Response Previewer
    • SSL Proxying
    • Bypass Proxy List
    • Import / Export
    • Content Filter
    • Multiple Tabs
    • Horizontal/Vertical/Window Layout
    • Copy as
    • Custom Previewer Tab
    • Custom Header Column
    • Regex (Regular Expression)
    • Filter JSON Response
    • Highlight by Color and Add Comment
    • Import / Export Settings
    • Multipart Form-Data Previewer
    • JSONPath
    • Customize Toolbar
    • Localization
    • Quick Preview
  • ADVANCED FEATURES
    • Repeat
    • Edit & Repeat
    • Compose new Request
    • No Caching
    • Breakpoint
    • Breakpoint Templates
    • Map Local (File)
    • Map Local (Directory)
    • Map Remote
    • External Proxy
    • Save Session
    • Protobuf
    • WebSocket
    • Clear Session
    • Block List
    • Allow List
    • Charles Proxy Converter
    • Custom Certificates
    • GraphQL
    • Network Conditions
    • Multiple Filters
    • Custom Filters
    • Publish to Gist
    • Reverse Proxy
    • Code Generator
    • Diff
    • Access Control
    • DNS Spoofing
    • SOCKS Proxy
    • Swagger OpenAPI
    • TLS Key Logging
  • Proxyman Windows
    • Install Certificate
    • WSL
  • Scripting
    • Scripting
    • async/await Request
    • Addons
    • Built-in JS Libraries
    • Write your own Addons
    • Snippet Code
    • Environment Variables
  • Troubleshooting
    • Proxyman does not work with VPN apps
    • My Remote Devices (iOS/Android) could not connect to Proxyman?
    • iOS 16 and iOS 17 issues
    • SSL Error from HTTPS Request/Response
    • I could not see any requests from my localhost server
    • I could not see any HTTP traffic from my NodeJS, Python, or Ruby scripts
    • *.local requests do not appear on Proxyman
    • I couldn't see any traffics on Proxyman
    • I couldn't see any requests from 3rd-party network libraries
    • [Breakpoint] Modify Request/Response by Raw Message
    • Could not change Proxyman App Icons
    • Lost data after updating Proxyman app?
    • Proxyman consumes too much RAM & unresponsive
Powered by GitBook
On this page
  • 1. What's it?
  • 2. Built-in Addons
  • 3. How to use addons?
  • 4. Notes
  1. Scripting

Addons

Previousasync/await RequestNextBuilt-in JS Libraries

Last updated 3 years ago

1. What's it?

Proxyman provides a list of handy built-in add-ons that help you to do many common tasks, such as MD5, SHA1 Hashing, Base64 Encode/Decode, Beautify XML, JSON, ....

2. Built-in Addons

You can find sample code for all addons at

Name

Description

Base64 Encoding/Decode. Support Native atob/btoa function

CamelCase.js

Convert text to Camel Case

CryptoJS.js

DES, AES, Rabbit encryption/decryption algorithm. A small wrapper of CryptoJS

DateToTimestamp.js

Convert String Date to Timestamp

DateToUTC.js

Convert String Date to UTC String

DecodeURI.js

Decode percent-encoded String

EncodeURI.js

Encode to percent-encoded String

FormatCSS.js

Beautify CSS String

FormatJSON.js

Beautify JSON String

BeautifyJSON.js

Convert JSON Obj to beauty JSON String

UglifyJSON.js

Convert JSON Obj to ugly JSON String

FormatXML.js

Beautify XML String

HelloWorld.js

Hello World

Hex2rgb.js

Convert #000000 string to RGB string

JsonToQuery.js

Convert JSON Objc to Query String

JSONValidator.js

Validate JSON String

Decode JWT Token

KebabCase.js

Conver to Kebab String

Hash MD5

MinifyCSS.js

Minify CSS String

MinifyJSON.js

Minify JSON String

MinifyXML.js

Minify XML String

QueryToJson.js

Convert Query String to JSON Object

Deflate/Inflate and GZip/UnGZip

Hash SHA1

Hash SHA256

Hash SHA512

SnakeCase.js

Convert to Snake Case

StartCase.js

Convert to Start Case

Generate Unique UUID-v4 string

3. How to use addons?

Each addon will export the function that you can import by using the require function

To illustrate, Base64.js addon looks like:

// Base64.js
const Base64 = require('@libs/base64.js');
const { atob } = require("@libs/atob.js");
const { btoa } = require("@libs/btoa.js");

// atob / btoa
// They're equivalent with window.atob and window.btoa

exports.atob = atob;
exports.btoa = btoa;

// Basic Base64
exports.base64Decode = (input) => {
    return Base64.decode(input)
};

exports.base64Encode = (input) => {
    return Base64.encode(input);
};

Then, you can use it in the script:

const { atob, btoa } = require("@addons/Base64.js")

function onRequest(context, url, request) {

    // Encode base64 by using the export function
    var text = btoa("Hello World");
    
    console.log(text)
    // => SGVsbG8gV29ybGQ=
}

You can find all addons code at ~/Library/Application\ Support/com.proxyman.NSProxy/addons

4. Notes

Addons folder will be overridden for every new Proxyman Update. Make sure you don't edit the addon. If need to modify, please copy to the users folder

The require function is not a built-in function from , it's a custom function that Proxyman provides to allows the user to import the addons/libs easily.

Thanks to for creating Boop app that facilitates Proxyman's built-in add-ons.

Addons Snippet Code
JavascriptCore framework
Ivan Mathy
Base64.js
JWTDecode.js
MD5.js
Pako.js
SHA1.js
SHA256.js
SHA512.js
UUID.js