Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeIGD ¶
type FakeIGD struct {
// contains filtered or unexported fields
}
FakeIGD presents itself as a discoverable UPnP device which sends canned responses to HTTPU and HTTP requests.
type SOAPFaultError ¶
type SOAPFaultError struct { FaultCode string `xml:"faultcode"` FaultString string `xml:"faultstring"` Detail string `xml:"detail"` }
SOAPFaultError implements error, and contains SOAP fault information.
func (*SOAPFaultError) Error ¶
func (err *SOAPFaultError) Error() string
type UpnpNat ¶
type UpnpNat struct {
// contains filtered or unexported fields
}
UpnpNat used to add nat port mapping through via upnp protocol
func DiscoverUPnPDevice ¶
func DiscoverUPnPDevice() *UpnpNat
DiscoverUPnPDevice searches for Internet Gateway Devices and returns the first one it can find on the local network.
func (*UpnpNat) AddPortMapping ¶
func (n *UpnpNat) AddPortMapping(protocol string, extport, intport int, desc string, lifetime time.Duration) error
AddPortMapping add port mapping
func (*UpnpNat) DeletePortMapping ¶
DeletePortMapping delete port mapping
Click to show internal directories.
Click to hide internal directories.