Skip to content

Add stun server for ip discovery and flag stun#181

Merged
r4f4ss merged 3 commits intooptimism-java:portalfrom
r4f4ss:stun
Oct 5, 2024
Merged

Add stun server for ip discovery and flag stun#181
r4f4ss merged 3 commits intooptimism-java:portalfrom
r4f4ss:stun

Conversation

@r4f4ss
Copy link

@r4f4ss r4f4ss commented Oct 4, 2024

fix #176

new usage (reference usage):

$shisui --nat stun

or

$shisui --nat stun:<addr>

@r4f4ss r4f4ss requested a review from fearlessfe October 4, 2024 04:28
@GrapeBaBa
Copy link
Member

@r4f4ss (nit) Could this feature have a test?

Copy link

@fearlessfe fearlessfe left a comment

Choose a reason for hiding this comment

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

It just create a STUN{}, It should be a place to get the real IP and set to the localNode

@r4f4ss
Copy link
Author

r4f4ss commented Oct 4, 2024

It just create a STUN{}, It should be a place to get the real IP and set to the localNode

Added function main.doPortMapping that set address and port for localNode, reference implementation from:

func doPortMapping(natm nat.Interface, ln *enode.LocalNode, addr *net.UDPAddr) *net.UDPAddr {

@r4f4ss r4f4ss requested a review from fearlessfe October 5, 2024 01:48
@r4f4ss r4f4ss merged commit 8e8f85a into optimism-java:portal Oct 5, 2024
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.

add stun for p2p network

3 participants