Content-Length: 301692 | pFad | https://github.com/inetaf/nat/pull/1

79 nat/natpmp: initial commit by mdlayher · Pull Request #1 · inetaf/nat · GitHub
Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

nat/natpmp: initial commit #1

Merged
merged 7 commits into from
Jul 29, 2020
Merged

nat/natpmp: initial commit #1

merged 7 commits into from
Jul 29, 2020

Conversation

mdlayher
Copy link
Member

This is very much a WIP and all feedback is welcome. I read a bit of the RFC and implemented request/response serialization and backoff/retry as recommended, but there's probably more intelligent things we can do as well. I've left TODO comments for things I am either unsure of or intend to do.

For now I've only implemented the "get external IP" method, but will take a look at the actual mapping calls once the overall structure is solid.

/cc @danderson @bradfitz @crawshaw

mdlayher added 2 commits July 28, 2020 18:02
Signed-off-by: Matt Layher <mdlayher@gmail.com>
Signed-off-by: Matt Layher <mdlayher@gmail.com>
@mdlayher
Copy link
Member Author

I forgot that t.Cleanup was added in 1.14:

##[error]natpmp/client_test.go:219:3: t.Cleanup undefined (type *testing.T has no field or method Cleanup)

I'll change the signature to my older pattern:

c, done := testServer(t)
defer done()

mdlayher added 4 commits July 28, 2020 18:10
Signed-off-by: Matt Layher <mdlayher@gmail.com>
Signed-off-by: Matt Layher <mdlayher@gmail.com>
Signed-off-by: Matt Layher <mdlayher@gmail.com>
Signed-off-by: Matt Layher <mdlayher@gmail.com>
natpmp/client.go Show resolved Hide resolved
natpmp/client.go Show resolved Hide resolved
natpmp/client.go Outdated Show resolved Hide resolved
natpmp/client.go Show resolved Hide resolved
natpmp/client.go Show resolved Hide resolved
natpmp/client.go Show resolved Hide resolved
natpmp/client.go Show resolved Hide resolved
Signed-off-by: Matt Layher <mdlayher@gmail.com>
@mdlayher
Copy link
Member Author

Looks like this is probably a reasonable place to checkpoint the work. I took a look at netcheck and am mulling over some API ideas, but I think I'll open an issue before writing more code to ensure it ends up being something workable. Will squash and merge!

@mdlayher mdlayher merged commit 7fb7b00 into master Jul 29, 2020
@mdlayher mdlayher deleted the mdl-init branch July 29, 2020 20:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/inetaf/nat/pull/1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy