Skip to main content

Built-in JS Libraries

See the JavaScript libraries bundled with Proxyman Scripting, such as lodash, crypto-js and hashes, and learn how to import your own library with require().

1. What's it?​

Proxyman bundles some useful JS libraries to help you do common tasks easily.

info

Library Location: ~/Library/Application\ Support/com.proxyman.NSProxy/addons/libs

tip

From Proxyman macOS 6.10.0 or later, you can use the native `npm install` to install your 3rd-party libraries. See use-npm-install.md.

2. Built-in Libraries​

NameDescriptionSource
base64.jsContains basic Base64 Encode/Decode-
atob.jswindow.atob()https://github.com/jsdom/abab
btoa.jswindow.btoa()https://github.com/jsdom/abab
hashes.jsContains various hashing function: MD5, RIPEMD-160, SHA1, SHA256, SHA512, HMAChttps://github.com/h2non/jshashes
lodash.jsContains various text transformed functionshttps://lodash.com
vkBeautify.jspretty-print or minify text in XML, JSON, CSS and SQL formats.https://github.com/kayhadrin/vkBeautify/
crypto-js.min.jsJavaScript implementations of standard and secure cryptographic algorithms, e.g. DES, AES, Rabbit, ... (Version 3.3.0)https://cryptojs.gitbook.io/docs/
pako.jszlib port for Deflate/Inflate and GZip/UnGZip (Version 1.0.11)https://github.com/nodeca/pako

3. How to import my own JS Library?​

  1. You can provide your own JS Library, but make sure you bundle all dependencies by using Browserify or WebPack to a single JS file.
  2. Make sure you export the functions properly.
  3. Put the file at ~/Library/Application\ Support/com.proxyman.NSProxy/addons/libs/your-lib.js
  4. Import the file with:
require('@libs/your-lib.js');

For instance,

const Hashes = require('@libs/hashes.js');
const { cssmin } = require('@libs/vkBeautify.js');
const Lodash = require('@libs/lodash.js');
const { atob } = require('@libs/atob.js')
info

You might check built-in libraries for reference at ~/Library/Application\ Support/com.proxyman.NSProxy/addons/libs/

4. Notes​

info

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