Giter VIP home page Giter VIP logo

go-nat-pmp's People

Contributors

audriusbutkevicius avatar jackpal avatar okket avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-nat-pmp's Issues

Rethink test

The current test only works if the test machine has networking executables installed, so that the gateway library can find the default gateway, and only if there is a NAT-PMP server on the default gateway.

Can we test some portion of this code without either of those things?

Non-zero result code 3

Getting this error from AddPortMapping. Curious if anyone has seen it before or knows what it means.

Non-zero result code 3

Add support for PCP

It would be nice to have support for PCP, which is the successor of NAT-PMP (basically NAT-PMP v1).

PCP basically extends NAT-PMP to be able to control stateful firewalls (IPv4 or IPv6), without necessarily involving NAT. Stateful firewalls are the real issue when applications need incoming connectivity (especially in an IPv6 world), NAT is just an artifact of the limited IPv4 address space.

From RFC 6886:

In 2013, NAT-PMP was superseded by the IETF Standards Track Port
Control Protocol [RFC6887].  PCP builds on NAT-PMP and uses a
compatible packet format, and adds a number of significant
enhancements, including IPv6 support, management of outbound
mappings, management of firewall rules, full compatibility with
large-scale NATs with a pool of external addresses, error lifetimes,
and an extension mechanism to enable future enhancements.

The on-wire format and UDP ports are the same, and there is support to facilitate the interoperability between the two protocols, see: https://tools.ietf.org/html/rfc6887#page-87

GetExternalAddress not working

Hello,
I am using your library and the function GetExternalAddress() is not returning an error but it isn't returning a proper result either, it just gets stuck at that part of my program.

	gatewayIP, err := gateway.DiscoverGateway()
	if err != nil {
		log.Fatalln("Can't discover gateway: " + err.Error())
	} else {
		client := natpmp.NewClient(gatewayIP)
		fmt.Println("Created a new client!")
		address, err := client.GetExternalAddress()
		if err != nil {
			log.Fatalln("Can't get external address: " + err.Error())
		} 
	}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.