ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
https://proxyman.io
5.35k stars 177 forks source link

proxyman cli import does not activate "allow system environment" Scripting permission #1925

Open samybenatt opened 5 months ago

samybenatt commented 5 months ago

Description

proxyman cli import does not activate "allow system environment" permission

Steps to Reproduce

  1. Create script and activate "allow system environment" permission

    image
  2. Export current scripting settings with proxyman cli export

    /Applications/Proxyman.app/Contents/MacOS/proxyman-cli export -m enabledRules -o /tmp/proxy_script.json
image
  1. Remove scripting rule and disable system environment permission to reset Proxyman state

  2. Close Proxyman

    1. Import scripting settings with proxyman cli import
      /Applications/Proxyman.app/Contents/MacOS/proxyman-cli import -m override -i /tmp/proxy_script.json
      image
  3. Open Proxyman and observe script imported and scripting enabled but environment variable option not activated

    image

Current Behavior

proxyman cli import does not activate "allow system environment" permission of Scripting on import of settings

Expected Behavior

proxyman cli export should keep the state of Scripting advanced permission and proxyman cli import should be able to import it

Environment

Proxyman macOS 4.16.0

samybenatt commented 4 months ago

@NghiaTranUIT Not sure if this one is related to the previous bug you fixed or not #(1924) I marked it as a bug but might be a enhancement, let me know if you need me to update the label

NghiaTranUIT commented 4 months ago

@samybenatt from what I see, the Export Scripting data doesn't include the Scripting Setting. For now, it only exports the Script data itself.

Do you need these settings should be exported too ?

samybenatt commented 4 months ago

@samybenatt from what I see, the Export Scripting data doesn't include the Scripting Setting. For now, it only exports the Script data itself.

Do you need these settings should be exported too ?

@NghiaTranUIT Thanks for your reply. For consistent CLI import/export, I feel that the script options should be included into the exported json too so it's easy to restore the exact same Proxyman script overall configuration (script + options enabled) from one environment to another (especially when those options are used within the script)