[GH-ISSUE #239] Map Local to entire folder #237

Open
opened 2026-03-03 19:16:35 +03:00 by kerem · 16 comments
Owner

Originally created by @NghiaTranUIT on GitHub (Aug 5, 2019).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/239

Originally assigned to: @NghiaTranUIT on GitHub.

🐶 Brief

It's really convenience to support Map Local to an entire folder. Technical description at https://github.com/ProxymanApp/Proxyman/issues/224#issuecomment-517981601

👑 Criteria

  • Map to folder
  • If the path is not matched, get the response from Remote server
  • Improve UI to make it more clear
Originally created by @NghiaTranUIT on GitHub (Aug 5, 2019). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/239 Originally assigned to: @NghiaTranUIT on GitHub. ## 🐶 Brief It's really convenience to support Map Local to an entire folder. Technical description at https://github.com/ProxymanApp/Proxyman/issues/224#issuecomment-517981601 ## 👑 Criteria - [x] Map to folder - [x] If the path is not matched, get the response from Remote server - [x] Improve UI to make it more clear
Author
Owner

@shirshak55 commented on GitHub (Aug 18, 2019):

And How about map to remote? Just like i may use

shirshak.dev/api/v1/hello.json

But would like to map out remote to

shirshak.dev/api/v2/hello.json

<!-- gh-comment-id:522316655 --> @shirshak55 commented on GitHub (Aug 18, 2019): And How about map to remote? Just like i may use shirshak.dev/api/v1/hello.json But would like to map out remote to shirshak.dev/api/v2/hello.json
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 2, 2020):

Since the Map Local v2 is done. It's a perfect time to implement this feature 🙌

<!-- gh-comment-id:581094454 --> @NghiaTranUIT commented on GitHub (Feb 2, 2020): Since the Map Local v2 is done. It's a perfect time to implement this feature 🙌
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 3, 2020):

Good news that this feature is implemented 🎉 @armiakrajowa @Mag-Stellon @AtishaGarinMchd @Dekhnar @DerJacques

You can download a BETA build at: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_1.15.0_Map_Local_From_Local_Directory.dmg

Sorry for being late since there are other high priority tasks too 😄

Basically, you can select a local directly and it will map like https://github.com/ProxymanApp/Proxyman/issues/224#issuecomment-517981601

Quick Look

New Map Local v2 UI

Screen Shot 2020-02-03 at 22 44 22

Guidline

Screen Shot 2020-02-03 at 22 44 30

Debug header key

Screen_Shot_2020-02-03_at_22_49_44
<!-- gh-comment-id:581481219 --> @NghiaTranUIT commented on GitHub (Feb 3, 2020): Good news that this feature is implemented 🎉 @armiakrajowa @Mag-Stellon @AtishaGarinMchd @Dekhnar @DerJacques You can download a BETA build at: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_1.15.0_Map_Local_From_Local_Directory.dmg Sorry for being late since there are other high priority tasks too 😄 Basically, you can select a local directly and it will map like https://github.com/ProxymanApp/Proxyman/issues/224#issuecomment-517981601 ## Quick Look ### New Map Local v2 UI <img width="1692" alt="Screen Shot 2020-02-03 at 22 44 22" src="https://user-images.githubusercontent.com/5878421/73667607-1906a400-46d7-11ea-882a-f5be664a6f0d.png"> ### Guidline <img width="1770" alt="Screen Shot 2020-02-03 at 22 44 30" src="https://user-images.githubusercontent.com/5878421/73667636-258afc80-46d7-11ea-9666-f5dd5387db3f.png"> ### Debug header key <img width="2032" alt="Screen_Shot_2020-02-03_at_22_49_44" src="https://user-images.githubusercontent.com/5878421/73667901-96321900-46d7-11ea-8043-5cf0aae10415.png">
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 3, 2020):

Feel free to bump any bugs you found. I'm going to officially release soon in this week. Thank you guys so much 🎉

<!-- gh-comment-id:581481473 --> @NghiaTranUIT commented on GitHub (Feb 3, 2020): Feel free to bump any bugs you found. I'm going to officially release soon in this week. Thank you guys so much 🎉
Author
Owner

@DerJacques commented on GitHub (Feb 3, 2020):

That’s so awesome. Thank you very much! Looking forward to giving it a spin, as soon as it is released.

The screenshots look exactly how I imagined them in my wild proxy application dreams.

<!-- gh-comment-id:581487573 --> @DerJacques commented on GitHub (Feb 3, 2020): That’s so awesome. Thank you very much! Looking forward to giving it a spin, as soon as it is released. The screenshots look exactly how I imagined them in my wild proxy application dreams.
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 3, 2020):

Glad to know you love it @DerJacques 💪

If the Map Local from Folder is successfully released in this week, Remote Map is the next feature 👍

<!-- gh-comment-id:581498143 --> @NghiaTranUIT commented on GitHub (Feb 3, 2020): Glad to know you love it @DerJacques 💪 If the Map Local from Folder is successfully released in this week, Remote Map is the next feature 👍
Author
Owner

@armiakrajowa commented on GitHub (Feb 4, 2020):

Hello @NghiaTranUIT

First, thank you for your reactivity on this feature.

Unfortunately this is not working in my case,

I want to map
https://my-domain.com/resources/???????????????Z/en/webapps/*
to my local directory
/Users/***********/Workspace/***********/linux_a64/webapps.

What's happening now is that if I try to reach
https://my-domain.com/resources/???????????????Z/en/webapps/app.js
it tries to read
/Users/***********/Workspace/***********/linux_a64/webapps/resources/20200204T071612Z/en/webapps/app.js
instead of
/Users/***********/Workspace/***********/linux_a64/webapps/app.js

So right now, your map tool is appending whatever is right after the domain name to the end of my directory path. I expected it to append only what is at the place of the wildcard at the end of my url.

Do you think it is possible to do it that way?

Thank you

<!-- gh-comment-id:581883255 --> @armiakrajowa commented on GitHub (Feb 4, 2020): Hello @NghiaTranUIT First, thank you for your reactivity on this feature. Unfortunately this is not working in my case, I want to map `https://my-domain.com/resources/???????????????Z/en/webapps/*` to my local directory `/Users/***********/Workspace/***********/linux_a64/webapps`. What's happening now is that if I try to reach `https://my-domain.com/resources/???????????????Z/en/webapps/app.js` it tries to read `/Users/***********/Workspace/***********/linux_a64/webapps/resources/20200204T071612Z/en/webapps/app.js` instead of `/Users/***********/Workspace/***********/linux_a64/webapps/app.js` So right now, your map tool is appending whatever is right after the domain name to the end of my directory path. I expected it to append only what is at the place of the wildcard at the end of my url. Do you think it is possible to do it that way? Thank you
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 4, 2020):

I understand what you means. In the initial implementation, I tried your suggestion, to map directly to specific folder. However, I dropped it because the complexity of implementation and there are some cases that causes confused. `

As a result, I choose the safe approach that Proxyman will replace the domain name with the local folder.

For now, I would suggest to create directory at resources/20200204T071612Z/en/webapps/app.js. Meanwhile, I will look for better implementation to support it in next releases 👍

<!-- gh-comment-id:581898075 --> @NghiaTranUIT commented on GitHub (Feb 4, 2020): I understand what you means. In the initial implementation, I tried your suggestion, to map directly to specific folder. However, I dropped it because the complexity of implementation and there are some cases that causes confused. ` As a result, I choose the safe approach that Proxyman will replace the domain name with the local folder. For now, I would suggest to create directory at `resources/20200204T071612Z/en/webapps/app.js`. Meanwhile, I will look for better implementation to support it in next releases 👍
Author
Owner

@magstellon commented on GitHub (Feb 4, 2020):

Thanks for this enhancement 👍

<!-- gh-comment-id:581908151 --> @magstellon commented on GitHub (Feb 4, 2020): Thanks for this enhancement 👍
Author
Owner

@armiakrajowa commented on GitHub (Feb 4, 2020):

Maybe the best to do is to setup this with a regex like Fiddler

rules : regex:.*/webapps/(.*)
path: /Users/*******/Workspace/*******/linux_a64/webapps/$1

Where all chars within the first parenthesis will be put at the place of $1

So we can imagine this king of rules:

rules : regex:.*/webapps/([^\/]*)/test/(.*)
path: /Users/*******/Workspace/*******/linux_a64/webapps/$1/hello_world/$2

So *******/webapps/whatever_you_want/test/also/whatever.js will be mapped to /Users/*******/Workspace/*******/linux_a64/webapps/whatever_you_want/hello_world/also/whatever.js

This is fully dynamic and will adapt to any situations. If you achieve to do this, you will rule over Fiddler for sure.

<!-- gh-comment-id:581919739 --> @armiakrajowa commented on GitHub (Feb 4, 2020): Maybe the best to do is to setup this with a regex like Fiddler rules : `regex:.*/webapps/(.*)` path: `/Users/*******/Workspace/*******/linux_a64/webapps/$1` Where all chars within the first parenthesis will be put at the place of `$1` So we can imagine this king of rules: rules : `regex:.*/webapps/([^\/]*)/test/(.*)` path: `/Users/*******/Workspace/*******/linux_a64/webapps/$1/hello_world/$2` So `*******/webapps/whatever_you_want/test/also/whatever.js` will be mapped to `/Users/*******/Workspace/*******/linux_a64/webapps/whatever_you_want/hello_world/also/whatever.js` This is fully dynamic and will adapt to any situations. If you achieve to do this, you will rule over Fiddler for sure.
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 4, 2020):

Thank for the suggestion @armiakrajowa. I admit that the current state of Proxyman has few limitation in comparison with Charles Proxy or Fiddler's capacity.

However, for sure, I will keep working on it. Maybe it would take longer, but I won't leave it 🙌

The aim is that we would facilitate HTTP Debugging for all naive and expert devs.

<!-- gh-comment-id:581926438 --> @NghiaTranUIT commented on GitHub (Feb 4, 2020): Thank for the suggestion @armiakrajowa. I admit that the current state of Proxyman has few limitation in comparison with Charles Proxy or Fiddler's capacity. However, for sure, I will keep working on it. Maybe it would take longer, but I won't leave it 🙌 The aim is that we would facilitate HTTP Debugging for all naive and expert devs.
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 4, 2020):

Accidentally close this ticket 😄

<!-- gh-comment-id:581926761 --> @NghiaTranUIT commented on GitHub (Feb 4, 2020): Accidentally close this ticket 😄
Author
Owner

@armiakrajowa commented on GitHub (Feb 4, 2020):

Cool, thank you :D

<!-- gh-comment-id:581928182 --> @armiakrajowa commented on GitHub (Feb 4, 2020): Cool, thank you :D
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 22, 2020):

Hi @armiakrajowa,

I refined the Map Local UI and improve how we map a local directory (https://github.com/ProxymanApp/Proxyman/issues/558#issuecomment-662448769)

We can define a mapping rule by Regex and it will match at this path and its subdirectories. like Charles or Fiddler does 👍

<!-- gh-comment-id:662450511 --> @NghiaTranUIT commented on GitHub (Jul 22, 2020): Hi @armiakrajowa, I refined the Map Local UI and improve how we map a local directory (https://github.com/ProxymanApp/Proxyman/issues/558#issuecomment-662448769) We can define a mapping rule by [Regex](https://docs.proxyman.io/basic-features/regex) and it will match at this path and its subdirectories. like Charles or Fiddler does 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 23, 2020):

Update linked 👍

<!-- gh-comment-id:662922565 --> @NghiaTranUIT commented on GitHub (Jul 23, 2020): Update linked 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 23, 2020):

For anyone concern that the Map Local with Directory is released and it works the same way like Fiddler and Charles https://github.com/ProxymanApp/Proxyman/releases/tag/2.3.0

Thanks all ❤️

<!-- gh-comment-id:663043492 --> @NghiaTranUIT commented on GitHub (Jul 23, 2020): For anyone concern that the Map Local with Directory is released and it works the same way like Fiddler and Charles https://github.com/ProxymanApp/Proxyman/releases/tag/2.3.0 Thanks all ❤️
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#237
No description provided.