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

Add stun server for ip discovery and flag stun #181

Merged
merged 3 commits into from
Oct 5, 2024

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
1 check passed
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