mirror of
https://github.com/fosrl/newt.git
synced 2026-03-10 12:46:38 +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"
|
"github.com/fosrl/newt/websocket"
|
||||||
"golang.zx2c4.com/wireguard/tun/netstack"
|
"golang.zx2c4.com/wireguard/tun/netstack"
|
||||||
|
|
||||||
// "github.com/fosrl/newt/wg"
|
|
||||||
"github.com/fosrl/newt/wgnetstack"
|
"github.com/fosrl/newt/wgnetstack"
|
||||||
"github.com/fosrl/newt/wgtester"
|
"github.com/fosrl/newt/wgtester"
|
||||||
)
|
)
|
||||||
@@ -29,6 +28,9 @@ func setupClients(client *websocket.Client) {
|
|||||||
|
|
||||||
host = strings.TrimSuffix(host, "/")
|
host = strings.TrimSuffix(host, "/")
|
||||||
|
|
||||||
|
if useNativeInterface {
|
||||||
|
|
||||||
|
} else {
|
||||||
// Create WireGuard service
|
// Create WireGuard service
|
||||||
wgService, err = wgnetstack.NewWireGuardService(interfaceName, mtuInt, generateAndSaveKeyTo, host, id, client, "8.8.8.8")
|
wgService, err = wgnetstack.NewWireGuardService(interfaceName, mtuInt, generateAndSaveKeyTo, host, id, client, "8.8.8.8")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -50,6 +52,7 @@ func setupClients(client *websocket.Client) {
|
|||||||
// logger.Info("WGTester successfully restarted with netstack")
|
// logger.Info("WGTester successfully restarted with netstack")
|
||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
client.OnTokenUpdate(func(token string) {
|
client.OnTokenUpdate(func(token string) {
|
||||||
wgService.SetToken(token)
|
wgService.SetToken(token)
|
||||||
|
|||||||
Reference in New Issue
Block a user