Write your own Addons

1. What's it?

You can write your own Addon to achieve what Proxyman hasn't provided yet. You can do:
  • Write your own Javascript Addon.
  • Write your library and share it with your colleauges.

2. How to write an addon?

  1. 1.
    Open User Addon folder at ~/Library/Application\ Support/com.proxyman.NSProxy/users or you can open by opening the More Button -> Documentations -> Open Custom Addons Folder...
2. Duplicate HelloWorld.js file and rename it to MyAwesomeAddon.js
3. Open the file and you can see the template.
4. Change the metadata and write your JS Code
1
/**
2
{
3
"name":"My Awesome Addon",
4
"description":"The first User Addons",
5
"author":"Proxyman",
6
"tags":"helloworld"
7
}
8
**/
9
10
const { md5 } = require("@addons/MD5.js");
11
12
const sayHello = () => {
13
var content = "Hello World. My first custom Addon.";
14
var hash = md5(content);
15
return content + ". MD5 = " + hash;
16
};
17
18
// Make sure you export the function at the end of method
19
exports.sayHello = sayHello;
20
Copied!
  • You can import built-in addons by using require(@"addons/<name.js>")
1
const { md5 } = require("@addons/MD5.js");
Copied!
Check out the built-in addons that Proxyman provides
  • You can import a built-in library by using require(@"lib/<name.js>")
Check out the built-in library that Proxyman provides
5. Save the file
6. Open your Script in Proxyman app and import the script
1
// Import your addon
2
// Make sure you imports the function that you exports in the addons
3
const { sayHello } = require("@users/MyAwesomeAddon.js");
4
5
// Usage
6
sayHello();
Copied!
require("@users/MyAwesomeAddon.js") is your addon directory
@users is the Custom Addons Folder.

3. Note

Your own scripts are stored at ~/Library/Application\ Support/com.proxyman.NSProxy/users
This folder is safe. It's never overridden or removed by Proxyman.
Last modified 3mo ago