(self)
| 99 | ) |
| 100 | |
| 101 | def running(self): |
| 102 | if hasattr(ctx.options, "web_open_browser") and ctx.options.web_open_browser: |
| 103 | master: WebMaster = ctx.master # type: ignore |
| 104 | success = open_browser(master.web_url) |
| 105 | if not success: |
| 106 | logger.info( |
| 107 | f"No web browser found. Please open a browser and point it to {master.web_url}", |
| 108 | ) |
| 109 | if not success and not ctx.options.web_password: |
| 110 | logger.info( |
| 111 | f"You can configure a fixed authentication token by setting the `web_password` option " |
| 112 | f"(https://docs.mitmproxy.org/stable/concepts-options/#web_password).", |
| 113 | ) |
| 114 | |
| 115 | |
| 116 | def open_browser(url: str) -> bool: |
nothing calls this directly
no test coverage detected