IPTable reuse port functions
(userOptions *Options)
| 210 | |
| 211 | // IPTable reuse port functions |
| 212 | func IPTableReusePassive(userOptions *Options) (net.Conn, string) { |
| 213 | // call setReuseSecret first, cuz userOptions.Secret may be cleared if tls is enabled |
| 214 | setReuseSecret(userOptions) |
| 215 | SetPortReuseRules(userOptions.Listen, userOptions.ReusePort) |
| 216 | go waitForExit(userOptions.Listen, userOptions.ReusePort) |
| 217 | conn, uuid := NormalPassive(userOptions) |
| 218 | return conn, uuid |
| 219 | } |
| 220 | |
| 221 | func waitForExit(localPort, reusedPort string) { |
| 222 | sigs := make(chan os.Signal, 1) |
no test coverage detected