status-go/vendor/github.com/jackpal/go-nat-pmp
Andrea Maria Piana 849492fda9
Add statusUpdate code (#1861)
* Add status-option code

This commits changes the behavior of waku introducing a new status-code,
`2`, that replaces the current single options codes.

* linting
2020-02-21 15:48:53 +01:00
..
.travis.yml Add statusUpdate code (#1861) 2020-02-21 15:48:53 +01:00
LICENSE Initial refactoring + vendor update (after rebase) 2016-09-15 06:12:25 +03:00
README.md Add statusUpdate code (#1861) 2020-02-21 15:48:53 +01:00
natpmp.go Add statusUpdate code (#1861) 2020-02-21 15:48:53 +01:00
network.go Add statusUpdate code (#1861) 2020-02-21 15:48:53 +01:00
recorder.go Add statusUpdate code (#1861) 2020-02-21 15:48:53 +01:00

README.md

go-nat-pmp

A Go language client for the NAT-PMP internet protocol for port mapping and discovering the external IP address of a firewall.

NAT-PMP is supported by Apple brand routers and open source routers like Tomato and DD-WRT.

See http://tools.ietf.org/html/draft-cheshire-nat-pmp-03

Build Status

Get the package

go get -u github.com/jackpal/go-nat-pmp

Usage

import (
    "github.com/jackpal/gateway"
    natpmp "github.com/jackpal/go-nat-pmp"
)

gatewayIP, err = gateway.DiscoverGateway()
if err != nil {
    return
}

client := natpmp.NewClient(gatewayIP)
response, err := client.GetExternalAddress()
if err != nil {
    return
}
print("External IP address:", response.ExternalIPAddress)

Clients

This library is used in the Taipei Torrent BitTorrent client http://github.com/jackpal/Taipei-Torrent

Complete documentation

http://godoc.org/github.com/jackpal/go-nat-pmp

License

This project is licensed under the Apache License 2.0.