mirror of
https://github.com/fosrl/olm.git
synced 2026-02-21 20:36:42 +00:00
Send relay message
This commit is contained in:
12
common.go
12
common.go
@@ -311,6 +311,18 @@ func keepSendingUDPHolePunch(endpoint string, olmID string, sourcePort uint16) {
|
||||
}
|
||||
}
|
||||
|
||||
func sendRelay(olm *websocket.Client) error {
|
||||
err := olm.SendMessage("olm/wg/relay", map[string]interface{}{
|
||||
"doIt": "now",
|
||||
})
|
||||
if err != nil {
|
||||
logger.Error("Failed to send registration message: %v", err)
|
||||
return err
|
||||
}
|
||||
logger.Info("Sent relay message")
|
||||
return nil
|
||||
}
|
||||
|
||||
func sendRegistration(olm *websocket.Client, publicKey string) error {
|
||||
err := olm.SendMessage("olm/wg/register", map[string]interface{}{
|
||||
"publicKey": publicKey,
|
||||
|
||||
Reference in New Issue
Block a user