mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-04-29 19:01:42 +02:00
update go version to 1.18
This commit is contained in:
parent
cafcdcd566
commit
e686381fa9
9 changed files with 41 additions and 66 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/go-ini/ini"
|
||||
|
||||
"golang.zx2c4.com/go118/netip"
|
||||
"net/netip"
|
||||
)
|
||||
|
||||
// DeviceConfig contains the information to initiate a wireguard connection
|
||||
|
@ -109,7 +109,7 @@ func parseNetIP(section *ini.Section, keyName string) ([]netip.Addr, error) {
|
|||
return []netip.Addr{}, nil
|
||||
}
|
||||
|
||||
ips := []netip.Addr{}
|
||||
var ips []netip.Addr
|
||||
for _, str := range key.StringsWithShadows(",") {
|
||||
str = strings.TrimSpace(str)
|
||||
ip, err := netip.ParseAddr(str)
|
||||
|
@ -127,7 +127,7 @@ func parseCIDRNetIP(section *ini.Section, keyName string) ([]netip.Addr, error)
|
|||
return []netip.Addr{}, nil
|
||||
}
|
||||
|
||||
ips := []netip.Addr{}
|
||||
var ips []netip.Addr
|
||||
for _, str := range key.StringsWithShadows(",") {
|
||||
prefix, err := netip.ParsePrefix(str)
|
||||
if err != nil {
|
||||
|
@ -353,7 +353,7 @@ func ParseConfig(path string) (*Configuration, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
routinesSpawners := []RoutineSpawner{}
|
||||
var routinesSpawners []RoutineSpawner
|
||||
|
||||
err = parseRoutinesConfig(&routinesSpawners, cfg, "TCPClientTunnel", parseTCPClientTunnelConfig)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue