|
@@ -1,13 +1,28 @@
|
|
//go:build windows
|
|
//go:build windows
|
|
// +build windows
|
|
// +build windows
|
|
|
|
|
|
|
|
+// Copyright © 2021 Ettore Di Giacinto <[email protected]>
|
|
|
|
+//
|
|
|
|
+// This program is free software; you can redistribute it and/or modify
|
|
|
|
+// it under the terms of the GNU General Public License as published by
|
|
|
|
+// the Free Software Foundation; either version 2 of the License, or
|
|
|
|
+// (at your option) any later version.
|
|
|
|
+//
|
|
|
|
+// This program is distributed in the hope that it will be useful,
|
|
|
|
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
+// GNU General Public License for more details.
|
|
|
|
+//
|
|
|
|
+// You should have received a copy of the GNU General Public License along
|
|
|
|
+// with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
+
|
|
package edgevpn
|
|
package edgevpn
|
|
|
|
|
|
import (
|
|
import (
|
|
- "net"
|
|
|
|
- "os/exec"
|
|
|
|
"fmt"
|
|
"fmt"
|
|
"log"
|
|
"log"
|
|
|
|
+ "net"
|
|
|
|
+ "os/exec"
|
|
|
|
|
|
"github.com/songgao/water"
|
|
"github.com/songgao/water"
|
|
)
|
|
)
|
|
@@ -35,7 +50,7 @@ func (e *EdgeVPN) createInterface() (*water.Interface, error) {
|
|
}
|
|
}
|
|
network := net.IPNet{
|
|
network := net.IPNet{
|
|
IP: ip,
|
|
IP: ip,
|
|
- Mask: net.IPv4Mask(0,0,0,0),
|
|
|
|
|
|
+ Mask: net.IPv4Mask(0, 0, 0, 0),
|
|
}
|
|
}
|
|
config := water.Config{
|
|
config := water.Config{
|
|
DeviceType: e.config.DeviceType,
|
|
DeviceType: e.config.DeviceType,
|