mirror of
https://github.com/fosrl/newt.git
synced 2026-03-05 10:16:44 +00:00
Handle encrypted messages
This commit is contained in:
6
main.go
6
main.go
@@ -597,6 +597,12 @@ persistent_keepalive_interval=5`, fixKey(fmt.Sprintf("%s", privateKey)), fixKey(
|
||||
return nil
|
||||
})
|
||||
|
||||
client.OnTokenUpdate(func(token string) {
|
||||
if wgService != nil {
|
||||
wgService.SetToken(token)
|
||||
}
|
||||
})
|
||||
|
||||
// Connect to the WebSocket server
|
||||
if err := client.Connect(); err != nil {
|
||||
logger.Fatal("Failed to connect to server: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user