| 15 | import { Popover } from "./Popover"; |
| 16 | |
| 17 | export default function Transparent() { |
| 18 | const serverState = useAppSelector((state) => state.modes.transparent); |
| 19 | const backendState = useAppSelector((state) => state.backendState.servers); |
| 20 | |
| 21 | const servers = serverState.map((server) => { |
| 22 | return ( |
| 23 | <TransparentRow |
| 24 | key={server.ui_id} |
| 25 | server={server} |
| 26 | backendState={backendState[getSpec(server)]} |
| 27 | /> |
| 28 | ); |
| 29 | }); |
| 30 | |
| 31 | return ( |
| 32 | <div> |
| 33 | <h4 className="mode-title">Transparent Proxy</h4> |
| 34 | <p className="mode-description"> |
| 35 | You{" "} |
| 36 | <a |
| 37 | href="https://docs.mitmproxy.org/stable/howto-transparent/" |
| 38 | style={{ textDecoration: "underline", color: "inherit" }} |
| 39 | > |
| 40 | configure your routing table |
| 41 | </a>{" "} |
| 42 | to send traffic through mitmproxy. |
| 43 | </p> |
| 44 | |
| 45 | {servers} |
| 46 | </div> |
| 47 | ); |
| 48 | } |
| 49 | |
| 50 | function TransparentRow({ |
| 51 | server, |