mirror of
https://github.com/fosrl/olm.git
synced 2026-02-08 05:56:41 +00:00
Holepunch to the right endpoint
This commit is contained in:
@@ -53,6 +53,7 @@ type HolePunchMessage struct {
|
||||
|
||||
type HolePunchData struct {
|
||||
ServerPubKey string `json:"serverPubKey"`
|
||||
Endpoint string `json:"endpoint"`
|
||||
}
|
||||
|
||||
type EncryptedHolePunchMessage struct {
|
||||
|
||||
4
main.go
4
main.go
@@ -234,6 +234,8 @@ func main() {
|
||||
}
|
||||
|
||||
gerbilServerPubKey = holePunchData.ServerPubKey
|
||||
|
||||
go keepSendingUDPHolePunch(holePunchData.Endpoint, id, sourcePort)
|
||||
})
|
||||
|
||||
connectTimes := 0
|
||||
@@ -620,8 +622,6 @@ func main() {
|
||||
}
|
||||
defer olm.Close()
|
||||
|
||||
go keepSendingUDPHolePunch(endpoint, id, sourcePort)
|
||||
|
||||
// Wait for interrupt signal
|
||||
sigCh := make(chan os.Signal, 1)
|
||||
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
|
||||
|
||||
Reference in New Issue
Block a user