You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently mitm commands will load scripts found in config.yaml relatively from where the command is ran which is fine when using the cli option -s but seems counter-intuitive when using a config file.
Current behaviour :
$ mitmproxy --set confdir=proxy
/home/lficheux/.local/bin/mitmproxy: Error reading proxy/config.yaml: No such script
$ tree proxy
proxy
├── addons
│ └── addons.py
├── config.yaml
$ cat proxy/config.yaml
scripts: ['./addons/addons.py', ]
(The error message could also do with a bit more verbosity in my opinion, I could do another PR for that.)
Proposal
Make scripts path relative to the config file they come from. If scripts path come from the cli option -s do nothing.
I have already made a pull request : #4860
Alternatives
Using absolute paths but that defeats the point.
The text was updated successfully, but these errors were encountered:
Thanks! I think that's a useful change in general and your PR looks good on the surface. I won't find the time to review this properly in the next few weeks. Either we'll find someone else to look properly at this, or I'll likely handle it in December or so. 😃
Problem Description
Currently mitm commands will load scripts found in
config.yaml
relatively from where the command is ran which is fine when using the cli option-s
but seems counter-intuitive when using a config file.Current behaviour :
$ mitmproxy --set confdir=proxy /home/lficheux/.local/bin/mitmproxy: Error reading proxy/config.yaml: No such script $ tree proxy proxy ├── addons │ └── addons.py ├── config.yaml $ cat proxy/config.yaml scripts: ['./addons/addons.py', ]
(The error message could also do with a bit more verbosity in my opinion, I could do another PR for that.)
Proposal
Make scripts path relative to the config file they come from. If scripts path come from the cli option
-s
do nothing.I have already made a pull request : #4860
Alternatives
The text was updated successfully, but these errors were encountered: