[GH-ISSUE #1272] How can I import settings for remote map using proxyman-cli ? #1266

Open
opened 2026-03-03 19:49:52 +03:00 by kerem · 9 comments
Owner

Originally created by @rakeshkarkare on GitHub (Jun 27, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1272

Originally assigned to: @NghiaTranUIT on GitHub.

How can I import settings for remote map using proxyman-cli ?

It gives me [ERROR] Invalid config file. Please contact the development team at support@proxyman.io.

Originally created by @rakeshkarkare on GitHub (Jun 27, 2022). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1272 Originally assigned to: @NghiaTranUIT on GitHub. How can I import settings for remote map using proxyman-cli ? It gives me [ERROR] Invalid config file. Please contact the development team at support@proxyman.io.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 28, 2022):

Hi @rakeshkarkare , can you share a sample of Map Remote (which is exporting by proxyman-cli) to support@proxyman.io ? We'd like to investigate 👍

Meantime, you can workaround by simply exporting the Map Remote Tool via Import/Export Setting, then importing them again to your new Machine. It should work.

<!-- gh-comment-id:1168098311 --> @NghiaTranUIT commented on GitHub (Jun 28, 2022): Hi @rakeshkarkare , can you share a sample of Map Remote (which is exporting by proxyman-cli) to support@proxyman.io ? We'd like to investigate 👍 Meantime, you can workaround by simply exporting the Map Remote Tool via [Import/Export Setting](https://docs.proxyman.io/basic-features/import-export-settings), then importing them again to your new Machine. It should work.
Author
Owner

@rakeshkarkare commented on GitHub (Jun 28, 2022):

Hi @NghiaTranUIT,

Please find below sample Map Remote exported from proxyman UI Tool Export Settings

[ { "method": { "exact": [ { "name": "POST" } ] }, "regex": "useWildcard", "fromURLComponent": { "path": "", "query": "", "host": "", "scheme": "", "port": "" }, "id": "9CE896ED", "graphQLQueryName": "", "toURLComponent": { "path": "", "query": "", "host": "localhost", "scheme": "http", "port": "5000" }, "mapFromURL": "https:\/\/googl.com\/gateway\/1.0\/static", "isIncludingPaths": false, "preserveHostHeader": false, "name": "Untitled", "isEnabled": true } ]

I tried to override with proxyman-cli using below command in terminal

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

Also, will it be possible to give feature to modify rules settings using proxyman-cli to be allowed while proxyman still running ?

<!-- gh-comment-id:1168857972 --> @rakeshkarkare commented on GitHub (Jun 28, 2022): Hi @NghiaTranUIT, Please find below sample Map Remote exported from proxyman UI Tool Export Settings `[ { "method": { "exact": [ { "name": "POST" } ] }, "regex": "useWildcard", "fromURLComponent": { "path": "", "query": "", "host": "", "scheme": "", "port": "" }, "id": "9CE896ED", "graphQLQueryName": "", "toURLComponent": { "path": "", "query": "", "host": "localhost", "scheme": "http", "port": "5000" }, "mapFromURL": "https:\/\/googl.com\/gateway\/1.0\/static", "isIncludingPaths": false, "preserveHostHeader": false, "name": "Untitled", "isEnabled": true } ]` I tried to override with proxyman-cli using below command in terminal > /Applications/Proxyman.app/Contents/MacOS/proxyman-cli import -m override -i ~/Desktop/data.json Also, will it be possible to give feature to modify rules settings using proxyman-cli to be allowed while proxyman still running ?
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 28, 2022):

The sample you sent me is exported from Proxyman UI, so it's only possible to import by the GUI too (In Map Remote -> Import). If you import this file via proxyman-cli, it will yield the error as expected.

Please note that you have to export via proxyman-cli, then import it again by using the proxyman-cli too. The reason is that the two formats (Export via GUI and proxyman-cli) are completely different.

Also, will it be possible to give feature to modify rules settings using proxyman-cli to be allowed while proxyman still running ?

No, you have to close the app.

<!-- gh-comment-id:1168882527 --> @NghiaTranUIT commented on GitHub (Jun 28, 2022): The sample you sent me is exported from Proxyman UI, so it's only possible to import by the GUI too (In Map Remote -> Import). If you import this file via `proxyman-cli`, it will yield the error as expected. Please note that you have to export via `proxyman-cli`, then import it again by using the `proxyman-cli` too. The reason is that the two formats (Export via GUI and `proxyman-cli`) are completely different. > Also, will it be possible to give feature to modify rules settings using proxyman-cli to be allowed while proxyman still running ? No, you have to close the app.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 28, 2022):

With the given sample file, you can only import by Proxyman GUI, not proxyman-cli

<!-- gh-comment-id:1168883722 --> @NghiaTranUIT commented on GitHub (Jun 28, 2022): With the given sample file, you can only import by Proxyman GUI, not `proxyman-cli`
Author
Owner

@rakeshkarkare commented on GitHub (Jun 28, 2022):

Thanks @NghiaTranUIT let me try this

Please note that you have to export via proxyman-cli, then import it again by using the proxyman-cli too

<!-- gh-comment-id:1168889715 --> @rakeshkarkare commented on GitHub (Jun 28, 2022): Thanks @NghiaTranUIT let me try this > Please note that you have to export via proxyman-cli, then import it again by using the proxyman-cli too
Author
Owner

@rakeshkarkare commented on GitHub (Jun 28, 2022):

Hi @NghiaTranUIT ,

Thanks it is working 🙌🏾, if we export via proxyman-cli, then import it again by using proxyman-cli

tried with below sample request

{ "mapRemoteData": { "data": "WwogICAgewogICAgICAgICJtZXRob2QiOiB7CiAgICAgICAgICAgICJleGFjdCI6IFsKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJQT1NUIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICBdCiAgICAgICAgfSwKICAgICAgICAicmVnZXgiOiAidXNlV2lsZGNhcmQiLAogICAgICAgICJmcm9tVVJMQ29tcG9uZW50IjogewogICAgICAgICAgICAicGF0aCI6ICIiLAogICAgICAgICAgICAicXVlcnkiOiAiIiwKICAgICAgICAgICAgImhvc3QiOiAiIiwKICAgICAgICAgICAgInNjaGVtZSI6ICIiLAogICAgICAgICAgICAicG9ydCI6ICIiCiAgICAgICAgfSwKICAgICAgICAiaWQiOiAiOUNFODk2RUQiLAogICAgICAgICJncmFwaFFMUXVlcnlOYW1lIjogIiIsCiAgICAgICAgInRvVVJMQ29tcG9uZW50IjogewogICAgICAgICAgICAicGF0aCI6ICIiLAogICAgICAgICAgICAicXVlcnkiOiAiIiwKICAgICAgICAgICAgImhvc3QiOiAibG9jYWxob3N0IiwKICAgICAgICAgICAgInNjaGVtZSI6ICJodHRwIiwKICAgICAgICAgICAgInBvcnQiOiAiNTAwMCIKICAgICAgICB9LAogICAgICAgICJtYXBGcm9tVVJMIjogImh0dHBzOlwvXC9nb29nbC5jb21cL2dhdGV3YXlcLzEuMFwvc3RhdGljIiwKICAgICAgICAiaXNJbmNsdWRpbmdQYXRocyI6IGZhbHNlLAogICAgICAgICJwcmVzZXJ2ZUhvc3RIZWFkZXIiOiBmYWxzZSwKICAgICAgICAibmFtZSI6ICJVbnRpdGxlZCIsCiAgICAgICAgImlzRW5hYmxlZCI6IHRydWUKICAgIH0KXQ==", "isEnabled": true } }

Terminal_Proxyman

image
<!-- gh-comment-id:1169013167 --> @rakeshkarkare commented on GitHub (Jun 28, 2022): Hi @NghiaTranUIT , Thanks it is working 🙌🏾, if we export via proxyman-cli, then import it again by using proxyman-cli tried with below sample request `{ "mapRemoteData": { "data": "WwogICAgewogICAgICAgICJtZXRob2QiOiB7CiAgICAgICAgICAgICJleGFjdCI6IFsKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAibmFtZSI6ICJQT1NUIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICBdCiAgICAgICAgfSwKICAgICAgICAicmVnZXgiOiAidXNlV2lsZGNhcmQiLAogICAgICAgICJmcm9tVVJMQ29tcG9uZW50IjogewogICAgICAgICAgICAicGF0aCI6ICIiLAogICAgICAgICAgICAicXVlcnkiOiAiIiwKICAgICAgICAgICAgImhvc3QiOiAiIiwKICAgICAgICAgICAgInNjaGVtZSI6ICIiLAogICAgICAgICAgICAicG9ydCI6ICIiCiAgICAgICAgfSwKICAgICAgICAiaWQiOiAiOUNFODk2RUQiLAogICAgICAgICJncmFwaFFMUXVlcnlOYW1lIjogIiIsCiAgICAgICAgInRvVVJMQ29tcG9uZW50IjogewogICAgICAgICAgICAicGF0aCI6ICIiLAogICAgICAgICAgICAicXVlcnkiOiAiIiwKICAgICAgICAgICAgImhvc3QiOiAibG9jYWxob3N0IiwKICAgICAgICAgICAgInNjaGVtZSI6ICJodHRwIiwKICAgICAgICAgICAgInBvcnQiOiAiNTAwMCIKICAgICAgICB9LAogICAgICAgICJtYXBGcm9tVVJMIjogImh0dHBzOlwvXC9nb29nbC5jb21cL2dhdGV3YXlcLzEuMFwvc3RhdGljIiwKICAgICAgICAiaXNJbmNsdWRpbmdQYXRocyI6IGZhbHNlLAogICAgICAgICJwcmVzZXJ2ZUhvc3RIZWFkZXIiOiBmYWxzZSwKICAgICAgICAibmFtZSI6ICJVbnRpdGxlZCIsCiAgICAgICAgImlzRW5hYmxlZCI6IHRydWUKICAgIH0KXQ==", "isEnabled": true } }` ![Terminal_Proxyman](https://user-images.githubusercontent.com/31622548/176244149-03e16614-ad54-44a4-b897-268e885b9cf8.png) <img width="1090" alt="image" src="https://user-images.githubusercontent.com/31622548/176244320-e9f7822a-5a14-4493-975f-28359655ca94.png">
Author
Owner

@rakeshkarkare commented on GitHub (Jun 28, 2022):

@NghiaTranUIT Is it possible to invoke proxyman using terminal ?, as after the rule change from proxyman-cli, I want to start proxyman through terminal, instead of manually invoking proxyman-ui tool

<!-- gh-comment-id:1169015210 --> @rakeshkarkare commented on GitHub (Jun 28, 2022): @NghiaTranUIT Is it possible to invoke proxyman using terminal ?, as after the rule change from proxyman-cli, I want to start proxyman through terminal, instead of manually invoking proxyman-ui tool
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 29, 2022):

@rakeshkarkare it isn't possible for now, but It's a great idea to be able to restart Proxyman via CLI after you import the data. I will add it soon 👍

<!-- gh-comment-id:1169608501 --> @NghiaTranUIT commented on GitHub (Jun 29, 2022): @rakeshkarkare it isn't possible for now, but It's a great idea to be able to restart Proxyman via CLI after you import the data. I will add it soon 👍
Author
Owner

@rakeshkarkare commented on GitHub (Jun 29, 2022):

Thanks @NghiaTranUIT 🙌🏾 will wait for this new feature 😊

<!-- gh-comment-id:1169627615 --> @rakeshkarkare commented on GitHub (Jun 29, 2022): Thanks @NghiaTranUIT 🙌🏾 will wait for this new feature 😊
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1266
No description provided.