(email, publicKey string, peerIPs []string, iface string, includeInterface bool)
| 236 | } |
| 237 | |
| 238 | func buildWGUserWithPeerIPs(email, publicKey string, peerIPs []string, iface string, includeInterface bool) *common.User { |
| 239 | inbounds := []string{} |
| 240 | if includeInterface { |
| 241 | inbounds = []string{iface} |
| 242 | } |
| 243 | |
| 244 | return &common.User{ |
| 245 | Email: email, |
| 246 | Inbounds: inbounds, |
| 247 | Proxies: &common.Proxy{ |
| 248 | Wireguard: &common.Wireguard{ |
| 249 | PublicKey: publicKey, |
| 250 | PeerIps: append([]string(nil), peerIPs...), |
| 251 | }, |
| 252 | }, |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | func mustUserPeerIPByFamily(t *testing.T, wg *WireGuard, email string, wantIPv6 bool) string { |
| 257 | t.Helper() |
no outgoing calls
no test coverage detected