Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable hole punching and libp2p listener config #79

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

lidel
Copy link
Member

@lidel lidel commented Aug 14, 2024

This PR proposes a patch release v0.4.1 that enables UPnP/hole punching bringing someguy closer to what Kubo does.

iiuc this does not hurt, and should help if someone is running someguy locally or behind some restrictive NAT without public addr + hole punching is necessary to reach other NATd peers

this idoes not hurt, and should help if someone is runnign someguy
without public addr + hole punching is necessary
Copy link
Member

@2color 2color left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a good start. Though unlikely to help for the deployed delegated routing endpoints due to libp2p/go-libp2p#2913.

For the purposes of fixing the deployed delegated routing endpoints, we may want to allow passing a listen addr so that we can bind to a specific port (rather than the defaults which are randomly allocated) and open that port so that dialbacks work.

@lidel lidel changed the title fix: enable hole punching fix: enable hole punching and libp2p listener config Aug 19, 2024
Copy link

Suggested version: 0.4.1

Comparing to: v0.4.0 (diff)

Changes in configuration file(s):

(empty)

gorelease says:

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5e6a2f]

goroutine 186 [running]:
go/types.(*Checker).handleBailout(0xc000812400, 0xc000939c10)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/check.go:367 +0x88
panic({0x6a6260?, 0x8e1520?})
	/opt/hostedtoolcache/go/1.22.6/x64/src/runtime/panic.go:770 +0x132
go/types.(*StdSizes).Sizeof(0x0, {0x758110, 0x8e49a0})
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/sizes.go:228 +0x30f
go/types.(*Config).sizeof(...)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/sizes.go:333
go/types.representableConst.func1({0x758110?, 0x8e49a0?})
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/const.go:76 +0x9e
go/types.representableConst({0x759f18, 0x8d9cc0}, 0xc000812400, 0x8e49a0, 0x0)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/const.go:92 +0x192
go/types.(*Checker).arrayLength(0xc000812400, {0x7599d8, 0xc00081cae0?})
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/typexpr.go:510 +0x2d3
go/types.(*Checker).typInternal(0xc000812400, {0x759198, 0xc000818e40}, 0x0)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/typexpr.go:299 +0x49d
go/types.(*Checker).definedType(0xc000812400, {0x759198, 0xc000818e40}, 0xc0009391f8?)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).varType(0xc000812400, {0x759198, 0xc000818e40})
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/typexpr.go:145 +0x25
go/types.(*Checker).structType(0xc000812400, 0xc0008191d0, 0xc0008191d0?)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/struct.go:113 +0x19f
go/types.(*Checker).typInternal(0xc000812400, {0x7591c8, 0xc00089ca68}, 0xc0001c24b0)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/typexpr.go:316 +0x1345
go/types.(*Checker).definedType(0xc000812400, {0x7591c8, 0xc00089ca68}, 0x10?)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/typexpr.go:180 +0x37
go/types.(*Checker).typeDecl(0xc000812400, 0xc0001c24b0, 0xc00082c1c0, 0x0)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/decl.go:615 +0x44d
go/types.(*Checker).objDecl(0xc000812400, {0x75c398, 0xc0001c24b0}, 0x0)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/decl.go:197 +0xa7f
go/types.(*Checker).packageObjects(0xc000812400)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/resolver.go:681 +0x425
go/types.(*Checker).checkFiles(0xc000812400, {0xc000188080, 0x1, 0x1})
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/check.go:408 +0x1a5
go/types.(*Checker).Files(...)
	/opt/hostedtoolcache/go/1.22.6/x64/src/go/types/check.go:372
golang.org/x/tools/go/packages.(*loader).loadPackage(0xc0002160e0, 0xc0006ee660)
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:1037 +0x932
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1()
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:847 +0x1a9
sync.(*Once).doSlow(0x0?, 0x0?)
	/opt/hostedtoolcache/go/1.22.6/x64/src/sync/once.go:74 +0xc2
sync.(*Once).Do(...)
	/opt/hostedtoolcache/go/1.22.6/x64/src/sync/once.go:65
golang.org/x/tools/go/packages.(*loader).loadRecursive(0x0?, 0x0?)
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:835 +0x4a
golang.org/x/tools/go/packages.(*loader).loadRecursive.func1.1(0x0?)
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:842 +0x26
created by golang.org/x/tools/go/packages.(*loader).loadRecursive.func1 in goroutine 177
	/home/runner/go/pkg/mod/golang.org/x/[email protected]/go/packages/packages.go:841 +0x94

gocompat says:

HEAD is now at 293c322 chore: v0.4.0 (#77)
Switched to branch 'main'
Your branch is up to date with 'origin/main'.

Cutting a Release (and modifying non-markdown files)

This PR is modifying both version.json and non-markdown files.
The Release Checker is not able to analyse files that are not checked in to main. This might cause the above analysis to be inaccurate.
Please consider performing all the code changes in a separate PR before cutting the release.

Automatically created GitHub Release

A draft GitHub Release has been created.
It is going to be published when this PR is merged.
You can modify its' body to include any release notes you wish to include with the release.

@lidel lidel merged commit 2f2fb2e into main Aug 19, 2024
10 checks passed
@lidel lidel deleted the fix/enable-hole-punching branch August 19, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants