Git Product home page Git Product logo

go-upnp's People

Contributors

avahowell avatar beeceej avatar chrisschinnerl avatar davidvorick avatar dmmcquay avatar frennkie avatar jfcg avatar lukechampine avatar mnsl 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-upnp's Issues

go test fails ?

  • My router has upnp enabled and initially upnp page shows nothing.
  • I clone this repo and run "go test":
--- FAIL: TestConcurrentUPNP (6.43s)
	upnp_test.go:34: context canceled
	...
	upnp_test.go:34: context canceled
--- FAIL: TestIGD (3.13s)
	upnp_test.go:55: Your external IP is: X.Y.Z.W
	upnp_test.go:60: goupnp: error performing SOAP HTTP request: Post http://192.168.1.1:1900/upnp/control/WANIPConn1: EOF
FAIL
exit status 1
FAIL	github.com/NebulousLabs/go-upnp 9.571s
  • After that my router's upnp page shows:
ID | App Description | External Port | Protocol | Internal Port | IP Address | Status
1 | upnp test | 9001 | TCP | 9001 | 192.168.1.X | Enabled
  • go1.9.2 linux/amd64

Error with Sample Code

The code compiles fine but when I run the exe it get stuck at Discover() and then throws this error.

(0x7c4aa0,0xc04200c1d0)panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x465b89]

goroutine 1 [running]:
panic(0x6576e0, 0xc04200c090)
        C:/Go/src/runtime/panic.go:500 +0x1af
github.com/NebulousLabs/go-upnp.(*IGD).ExternalIP(0x0, 0xc04200c1d0, 0xc04200c1d0, 0xc04207bf18, 0x4042e2)
        C:/Users/Abdullah Saleem/Documents/GO/src/github.com/NebulousLabs/go-upnp/upnp.go:54 +0x29
main.main()
        C:/Users/Abdullah Saleem/Documents/GO/Anonymizer/src/main.go:15 +0x6a

Retrieve existing Port Forwardings

It would be nice to be able to check/retrieve the currently configured Port Forwardings/Mappings.

According to http://upnp.org/specs/gw/UPnP-gw-WANIPConnection-v1-Service.pdf there are two methods for this GetGenericPortMappingEntry (iterate all existing forwardings) and GetSpecificPortMappingEntry (limited to a set of ext IP, ext Port, Protocol).

Any chance this could be implemented? I would try to work on a PR but I have no experience with Go at all .. :-/

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.