mirror of
https://github.com/fosrl/newt.git
synced 2026-03-10 04:36:40 +00:00
Send version
This commit is contained in:
2
main.go
2
main.go
@@ -525,6 +525,7 @@ persistent_keepalive_interval=5`, fixKey(privateKey.String()), fixKey(wgData.Pub
|
|||||||
stopFunc = client.SendMessageInterval("newt/wg/register", map[string]interface{}{
|
stopFunc = client.SendMessageInterval("newt/wg/register", map[string]interface{}{
|
||||||
"publicKey": publicKey.String(),
|
"publicKey": publicKey.String(),
|
||||||
"pingResults": pingResults,
|
"pingResults": pingResults,
|
||||||
|
"newtVersion": newtVersion,
|
||||||
}, 1*time.Second)
|
}, 1*time.Second)
|
||||||
logger.Info("Sent exit node ping results to cloud for selection")
|
logger.Info("Sent exit node ping results to cloud for selection")
|
||||||
})
|
})
|
||||||
@@ -678,6 +679,7 @@ persistent_keepalive_interval=5`, fixKey(privateKey.String()), fixKey(wgData.Pub
|
|||||||
// Send registration message to the server for backward compatibility
|
// Send registration message to the server for backward compatibility
|
||||||
err := client.SendMessage("newt/wg/register", map[string]interface{}{
|
err := client.SendMessage("newt/wg/register", map[string]interface{}{
|
||||||
"publicKey": publicKey.String(),
|
"publicKey": publicKey.String(),
|
||||||
|
"newtVersion": newtVersion,
|
||||||
"backwardsCompatible": true,
|
"backwardsCompatible": true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user