(addr string)
| 119 | } |
| 120 | |
| 121 | func extractPort(addr string) uint16 { |
| 122 | _, portStr, err := net.SplitHostPort(addr) |
| 123 | if err != nil { |
| 124 | panic(fmt.Errorf("failed to extract port from %s: %w", addr, err)) |
| 125 | } |
| 126 | |
| 127 | port, err := strconv.Atoi(portStr) |
| 128 | if err != nil { |
| 129 | panic(fmt.Errorf("failed to extract port from %s: %w", addr, err)) |
| 130 | } |
| 131 | |
| 132 | return uint16(port) |
| 133 | } |
| 134 | |
| 135 | func lockNetwork(sections []wireproxy.RoutineSpawner, infoAddr *string) { |
| 136 | var rules []landlock.Rule |