mirror of
https://github.com/fosrl/newt.git
synced 2026-03-12 13:46:41 +00:00
Starting to work on option
This commit is contained in:
5
linux.go
5
linux.go
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user