| 15 | import { Popover } from "./Popover"; |
| 16 | |
| 17 | export default function Socks() { |
| 18 | const serverState = useAppSelector((state) => state.modes.socks); |
| 19 | const backendState = useAppSelector((state) => state.backendState.servers); |
| 20 | |
| 21 | const servers = serverState.map((server) => { |
| 22 | return ( |
| 23 | <SocksRow |
| 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">SOCKS Proxy</h4> |
| 34 | <p className="mode-description"> |
| 35 | You manually configure your client application or device to use |
| 36 | a SOCKS5 proxy. |
| 37 | </p> |
| 38 | |
| 39 | {servers} |
| 40 | </div> |
| 41 | ); |
| 42 | } |
| 43 | |
| 44 | function SocksRow({ |
| 45 | server, |