❌[ERROR] Invalid config file. Please contact the development team at support@proxyman.io.
aFernandezEspinosa opened this issue · 3 comments
Description
I'm getting a console error when trying to use CLI to import One single script. When Import the configs manually everything works as expected.
Steps to Reproduce
1.- Open Proxyman
2.- Go To Scripting
3.- Export one Script
4.- proxyman_scripting_tree_rules.config is generated
5.- use CLI to import the config into a new session
6.- Getting the following console output
Hello from the pygame community. https://www.pygame.org/contribute.html
🛠 [Import] Prepare for importing Proxyman Rules. Mode = override, input = proxyman_scripting_tree_rules.config
⚠️ You're using a Freemium version of Proxyman, which limits the number of rules. Please upgrade to the Premium version to import all rules.
❌[ERROR] Invalid config file. Please contact the development team at support@proxyman.io.
The data couldn’t be read because it isn’t in the correct format.
Configuration has been successfully imported from proxyman_scripting_tree_rules.config with mode override.
Script is not showing into Proxyman Scripting as expected
Python
def import_proxyman_config(input_file_path, mode='override'):
try:
proxyman_cli_path = '/Applications/Proxyman.app/Contents/MacOS/proxyman-cli'
command = [proxyman_cli_path, 'import', '--mode', mode, '--input', input_file_path]
subprocess.run(command, check=True)
print(f"Configuration has been successfully imported from {input_file_path} with mode {mode}.")
except subprocess.CalledProcessError as e:
print(f"An error occurred while importing the configuration: {e}")
except Exception as e:
print(f"An unexpected error occurred: {e}")
Current Behavior
Script is not being imported
Expected Behavior
Script should be imported
Environment
- App version: Version 5.2.0 (50200)
- macOS version: Sonoma 14.4.1
I tried another run where I'm adding two different config files and the output is slightly different but none of the rules are being added to my Proxyman GUI
Hello from the pygame community. https://www.pygame.org/contribute.html
🛠 [Import] Prepare for importing Proxyman Rules. Mode = append, input = proxyman_ssl_proxying_rules.config
⚠️ You're using a Freemium version of Proxyman, which limits the number of rules. Please upgrade to the Premium version to import all rules.
✅ Import success!
Configuration has been successfully imported from proxyman_ssl_proxying_rules.config with mode append.
🛠 [Import] Prepare for importing Proxyman Rules. Mode = append, input = proxyman_scripting_tree_rules.config
⚠️ You're using a Freemium version of Proxyman, which limits the number of rules. Please upgrade to the Premium version to import all rules.
❌[ERROR] Invalid config file. Please contact the development team at support@proxyman.io.
The data couldn’t be read because it isn’t in the correct format.
Configuration has been successfully imported from proxyman_scripting_tree_rules.config with mode append.
Proxyman has been opened successfully.
The script and SSL configs are not being added
@aFernandezEspinosa I found the issue:
The Import from CLI is only able to import the export file, which is exported by the Exporter CLI (https://docs.proxyman.io/command-line#id-1.-export-proxyman-config)
# Export by CLI
$ /Applications/Proxyman.app/Contents/MacOS/proxyman-cli export -o ~/Desktop/data.json
If you manually export from the GUI, the CLI can't import it.
That worked thanks @NghiaTranUIT