Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A simple rendezvous protocol implementation to help NAT traversal or hole punching.

License

Notifications You must be signed in to change notification settings

xiaomiazi520/rndz-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rndz-go

A simple rendezvous protocol implementation to help NAT traversal or hole punching.

Golang implementation for rndz

tcp

client1

import "github.com/optman/rndz-go/client/tcp"

c := tcp.NewClient(rndzServer, "c1", netip.AddrPort{})
defer c.Close()
l, _ := c.Listen(context.Background())
defer l.Close()
for {
	conn, _ := l.Accept()
    defer conn.Close()
    ...
}

client2

import "github.com/optman/rndz-go/client/tcp"

c := tcp.NewClient(rndzServer, "c2", netip.AddrPort{})
defer c.Close()
conn, _ := c.Connect(context.Background(), "c1")
defer conn.Close()

udp

import "github.com/optman/rndz-go/client/udp"

c := udp.NewClient(rndzServer, id, netip.AddrPort{})
...

About

A simple rendezvous protocol implementation to help NAT traversal or hole punching.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%