Skip to content

Commit

Permalink
Fix setup on mobile implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
pappz committed Dec 29, 2023
1 parent 43e0b10 commit 547e0fa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion iface/iface_android.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func NewWGIFace(iFaceName string, address string, wgPort int, wgPrivKey string,

wgIFace := &WGIface{
tun: newTunDevice(wgAddress, wgPort, wgPrivKey, mtu, transportNet, args.TunAdapter),
userspaceBind: false,
userspaceBind: true,
}
return wgIFace, nil
}
Expand Down
6 changes: 3 additions & 3 deletions iface/iface_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ func NewWGIFace(iFaceName string, address string, wgPort int, wgPrivKey string,
return nil, err
}

wgIFace := &WGIface{}
wgIFace := &WGIface{
userspaceBind: true,
}

if netstack.IsEnabled() {
wgIFace.tun = newTunNetstackDevice(iFaceName, wgAddress, wgPort, wgPrivKey, mtu, transportNet, netstack.ListenAddr())
wgIFace.userspaceBind = true
return wgIFace, nil
}

wgIFace.tun = newTunDevice(iFaceName, wgAddress, wgPort, wgPrivKey, mtu, transportNet)
wgIFace.userspaceBind = true

return wgIFace, nil
}
Expand Down
3 changes: 1 addition & 2 deletions iface/iface_ios.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ func NewWGIFace(iFaceName string, address string, wgPort int, wgPrivKey string,
return nil, err
}
wgIFace := &WGIface{

tun: newTunDevice(iFaceName, wgAddress, wgPort, wgPrivKey, transportNet, args.TunFd),
userspaceBind: false,
userspaceBind: true,
}
return wgIFace, nil
}
Expand Down
7 changes: 3 additions & 4 deletions iface/iface_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,16 @@ func NewWGIFace(iFaceName string, address string, wgPort int, wgPrivKey string,
return nil, err
}

wgIFace := &WGIface{}
wgIFace := &WGIface{
userspaceBind: true,
}

if netstack.IsEnabled() {
wgIFace.tun = newTunNetstackDevice(iFaceName, wgAddress, wgPort, wgPrivKey, mtu, transportNet, netstack.ListenAddr())
wgIFace.userspaceBind = true
return wgIFace, nil
}

wgIFace.tun = newTunDevice(iFaceName, wgAddress, wgPort, wgPrivKey, mtu, transportNet)
wgIFace.userspaceBind = true

return wgIFace, nil
}

Expand Down
2 changes: 1 addition & 1 deletion iface/wg_configurer_usp.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (t *wgUSPConfigurer) startUAPI() {
for {
uapiConn, uapiErr := uapi.Accept()
if uapiErr != nil {
log.Traceln("uapi Accept failed with error: ", uapiErr)
log.Tracef("%s", uapiErr)
return
}
go func() {
Expand Down

0 comments on commit 547e0fa

Please sign in to comment.