Exemple #1
0
func NewNATPMPIGD() (igd *natpmpIGD, err error) {
	ip, err := defaultGatewayIp()
	if err != nil {
		return nil, fmt.Errorf("Unable to find default gateway: %s", err)
	}
	return &natpmpIGD{natpmp.NewClient(net.ParseIP(ip))}, nil
}
Exemple #2
0
func NewNatPMP(gateway net.IP) (nat NAT) {
	return &natPMPClient{natpmp.NewClient(gateway)}
}