Inbuilt Map Remote Functionality
See original GitHub issueCharles Proxy has a Map Remote feature which maps one URL to another.
This can be achieved in mitm by using a script similar to:
def request(flow):
if "google.com" in flow.url:
flow.request.url = flow.request.url.replace("google.com", "google.jp")
I think we should have this feature inbuilt (just like content replacements) rather than expecting users to write custom scripts.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:10
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Remote Mapping - Humanitarian OpenStreetMap Team
Remote mapping is the process of modifying or adding in new data to areas from a distance. Usually it involves the use of...
Read more >Mapping the buttons on the remote control - The NUC Blog
I've got an HP MCE-compatible remote controller and I'm using the inbuilt infrared receiver of my Haswell NUC. In order to make the...
Read more >Built-in functions - Terragrunt - Gruntwork
Terragrunt allows you to use built-in functions anywhere in `terragrunt.hcl`, ... This is useful when you need to use relative paths with remote...
Read more >Create map | Help - Zoho Deluge
Create map Table of Contents Overview Syntax Examples Overview The create map deluge task is used to declare a map variable.
Read more >ArcGIS Pro Help
Imagery and remote sensing ... You can map your data in 2D and 3D with ArcGIS Pro. ... Move around the map quickly...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ujjwal96: I think there are still lots of improvements to be made regarding the UX. Consider the following user story:
I think this is something that’s not viable with replacements right now. I think it would be very useful to have a dedicated “map remote” functionality that can be used to map URLs to other URLs or local files. It would be interesting to see how other tools are solving this (@dufferzafar mentions Charles Proxy), I haven’t looked into that yet. To make the distinction a bit more clear, we may want to have the replacements addon operate on the request path only, not the full URL, and handle the URL in the map remote editor.
@eu81273 Hello! Yes, you are right, unfortunately, our documentation doesn’t describe some moments very clearly. I hope we will change it in the nearest future. But nevertheless there is something in the documentation you may be interested in: Filter expressions -> https://docs.mitmproxy.org/stable/concepts-filters/ Replacements -> https://docs.mitmproxy.org/stable/overview-features/#replacements
Shortly speaking, here
@~u@http://target.com/js/aaa.js@http://localhost:3000/js/aaa.js
,~u
- mitmproxy filter expression that defines which flows a replacement applies to;http://target.com/js/aaa.js
- a valid Python regular expression that defines what gets replaced;http://localhost:3000/js/aaa.js
- a string literal that is substituted in.The thing is
~u
isn’t correct. To get the flows you want relying on url, you need to use~u regex
or justregex
(which is equivalent to~u regex
). For example, you can write:@"~u google\.com"@google@yahoo
@google\.com@google@yahoo
This replacement takes all flows, which havegoogle.com
into their urls and replacegoogle
withyahoo
. You can also write@google@yahoo
. It means, that the pattern set to the default.*
.