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. Export Proxyman config
  • 2. Import Proxyman config
  • 3. Activate/Unlink License
  • 4. Toggle HTTP System Proxy
  • 5. Clear Session
  • 6. Toggle Debugging Tools
  • 7. Install the Proxy Helper Tool by command line
  • 8. Export Proxyman Log
  • 9. Import Custom Root Certificate

Command-line

Interact with Proxyman via Command Line.

Proxyman provides a useful command-line tool to enhance your onboarding experience ✅.

You can access the tool at /Applications/Proxyman.app/Contents/MacOS/proxyman-cli

1. Export Proxyman config

Export all debugging tools rules, such as SSL Proxying List, Breakpoint, Map Local, Scripting, Block List, Allow List, Reverse Proxy, and Network Conditions.

$ /Applications/Proxyman.app/Contents/MacOS/proxyman-cli export -h

OVERVIEW: Export all debugging tools rules (Breakpoint, SSL Pinning, Map Local, Map
Remote, Scripting, etc).

USAGE: proxyman-cli export [--mode <mode>] --output <output>

OPTIONS:
  -m, --mode <mode>       Export Mode (all = "All debugging tools's rules", enabledRules
                          = "Only enabled rules"). (default: all)
  -o, --output <output>   A Output file to save the config to.
  --version               Show the version.
  -h, --help              Show help information.

By default, the export command will export all rules. To exclude particular rules, please uncheck the "Enabled" column in each debugging tool and use the -m enabledRules

For example:

  • Export all debugging tool rules:

$ /Applications/Proxyman.app/Contents/MacOS/proxyman-cli export -o ~/Desktop/data.json

  • Only export enabled rules:

$ /Applications/Proxyman.app/Contents/MacOS/proxyman-cli export -m enabledRules -o ~/Desktop/data.json

2. Import Proxyman config

Import Proxyman debugging tools rules that you have exported by the export command.

$ /Applications/Proxyman.app/Contents/MacOS/proxyman-cli import -h

OVERVIEW: Import config to Proxyman.

USAGE: proxyman-cli import [--mode <mode>] --input <input>

OPTIONS:
  -m, --mode <mode>       Import Mode (append = "Append to the existing rules"),
                          override = "Import and Replace all existing rules". (default:
                          append)
  -i, --input <input>     A input file to import.
  --version               Show the version.
  -h, --help              Show help information.

By default, new imported rules will be appended to the existing debugging rules. To override all rules, let use -m override

For example:

  • Import all debugging rules by appending them:

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli import -i ~/Desktop/data.json

  • Import, but override all my existing rules:

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli import -m override -i ~/Desktop/data.json

3. Activate/Unlink License

Please check out the command for activating and unlinking a license.

4. Toggle HTTP System Proxy

From Proxyman 4.8.0 and later, we can toggle the Proxy System by command line. It's useful for Raycast Extension

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli proxy on
/Applications/Proxyman.app/Contents/MacOS/proxyman-cli proxy off

5. Clear Session

  • We can clear the current Session from the command line. Available for Proxyman 4.12.0 and later.

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli clear-session

6. Toggle Debugging Tools

  • Toggle Breakpoint, Map Local, and Scripting Tool by command line. Available for Proxyman 4.12.0 and later.

# Scripting
/Applications/Proxyman.app/Contents/MacOS/proxyman-cli scripting on
/Applications/Proxyman.app/Contents/MacOS/proxyman-cli scripting off

# Map Local
/Applications/Proxyman.app/Contents/MacOS/proxyman-cli maplocal on
/Applications/Proxyman.app/Contents/MacOS/proxyman-cli maplocal off

# Breakpoint
/Applications/Proxyman.app/Contents/MacOS/proxyman-cli breakpoint on
/Applications/Proxyman.app/Contents/MacOS/proxyman-cli breakpoint off

7. Install the Proxy Helper Tool by command line

From macOS 4.12.0 or later, you can install the Helper Tool without GUI.

sudo /Applications/Proxyman.app/Contents/MacOS/proxyman --install-privileged-components

8. Export Proxyman Log

Proxyman macOS v5.11.0+ now supports:

  • Export all (ProxymanSession Format)

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli export-log -m all -o "~/desktop/output"
  • Export certain domains (Only Host, no scheme, no port, no paths, and no Query)

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli export-log -m domains -o "~/desktop/output" --domains 'api.twitter.com' --domains 'www.producthunt.com'

From Proxyman macOS 5.20.0+, we can export with Raw or HAR format.

  • Export All - RAW Request/Response Format

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli export-log -m all -o "~/desktop/output" --format raw
  • Export All - HAR Format

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli export-log -m domains -o "~/desktop/output" --domains 'api.twitter.com' --domains 'www.producthunt.com' --format har
  • Export certain domains - RAW Request/Response Format

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli export-log -m all -o "~/desktop/output" --format raw
  • Export certain domains - HAR Format

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli export-log -m domains -o "~/desktop/output" --domains 'api.twitter.com' --domains 'www.producthunt.com' --format raw

9. Import Custom Root Certificate

  • ✅ Import Custom p12 Root Certificate to Proxyman

  • Automatically Trust the certificate in System Keychain (sudo required)

  • Available from Proxyman macOS 5.15.0 or later

Install and trust

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli install-root-cert <certificate_path> --password <your_cert_password> --trust

Install but not trust (you might need to trust it manually in the Keychain)

/Applications/Proxyman.app/Contents/MacOS/proxyman-cli install-root-cert <certificate_path> --password <your_cert_password>

PreviousRaycastNextSecurity Compliance

Last updated 29 days ago

Reference:

License
https://github.com/ProxymanApp/Proxyman/issues/1626#issuecomment-1545862020