Starting to work on option

This commit is contained in:
Owen
2025-07-25 16:16:33 -07:00
parent 3583270f73
commit e14d53087f

View File

@@ -11,7 +11,6 @@ import (
"github.com/fosrl/newt/websocket"
"golang.zx2c4.com/wireguard/tun/netstack"
// "github.com/fosrl/newt/wg"
"github.com/fosrl/newt/wgnetstack"
"github.com/fosrl/newt/wgtester"
)
@@ -29,6 +28,9 @@ func setupClients(client *websocket.Client) {
host = strings.TrimSuffix(host, "/")
if useNativeInterface {
} else {
// Create WireGuard service
wgService, err = wgnetstack.NewWireGuardService(interfaceName, mtuInt, generateAndSaveKeyTo, host, id, client, "8.8.8.8")
if err != nil {
@@ -50,6 +52,7 @@ func setupClients(client *websocket.Client) {
// logger.Info("WGTester successfully restarted with netstack")
// }
})
}
client.OnTokenUpdate(func(token string) {
wgService.SetToken(token)