Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Clap arguments parser #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cocool97
Copy link

@cocool97 cocool97 commented Apr 9, 2023

It is useful to pass arguments from CLI instead of changing code to modify the directory pointed to inside the include_bytes directive.

This PR adds the opportunity to pass CA + key from CLI, taking it in consideration in the program. We could then pass other things via the CLI (debug mode, no-ui, proxy address, proxy port...)

  • Changes directory where CA + key are stored (now mitm_proxy instead of proxyapi)
  • Updates README.md consequently
  • Updates deps

LIAUD Corentin added 2 commits April 9, 2023 11:29
- Changes directory where CA + key are stores (now mitm_proxy instead of
  proxyapi)
- Updates README.md consequently
- Updates deps
Copy link
Author

@cocool97 cocool97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we should keep certificates and keys in the git. What do you think about it ?

@emanuele-em
Copy link
Owner

Thank you very much for this contribution, the idea is to keep the mitmproxy ui-first:

A good practice could be to add an initial check when the app is launched that check if there is a valid certificate in a hidden dir (i.e. /.mitmproxy/cer/), if there isn't the user can generate (or download) it and select it directly from the initial screen through a simple file input that move the file inside the directory.

In the near future I want that anyone can use it without any complications and without any need to use the command line

Tell me what you think about it (if you want)

@cocool97
Copy link
Author

I do not think that betting everything on the UI is not a good idea. Indeed, the problem with the UI is that it cannot be used on a remote server with no display (this is my use case).

Currently this mitm_proxy is UI-related, and no actions can be made remotely via SSH for example.

I do think (but this is your project, this is your call) that we should keep and maintain the project UI and CLI at the same time. The CLI could be used as an "expert" mode, and the UI mode for everyone if you really want to let it quite open. But do keep in mind that using and set-up a MITM should be made with caution, starting from certificates (generation / revocation / renewal) to administration etc...

You can tell me what you think of it !

@emanuele-em
Copy link
Owner

It sounds good

Copy link
Owner

@emanuele-em emanuele-em left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We released new version with tauri as gui, please adapt your changes to the new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants