mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-04-29 19:01:42 +02:00
use system nameserver if DNS field is empty #26
This commit is contained in:
parent
787fb595a1
commit
c6cc97c90d
4 changed files with 105 additions and 21 deletions
|
@ -28,7 +28,7 @@ allowed_ip=0.0.0.0/0`, conf.SelfSecretKey, conf.PeerPublicKey, conf.PeerEndpoint
|
|||
return setting, nil
|
||||
}
|
||||
|
||||
func StartWireguard(conf *DeviceConfig) (*netstack.Net, error) {
|
||||
func StartWireguard(conf *DeviceConfig) (*VirtualTun, error) {
|
||||
setting, err := createIPCRequest(conf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -49,5 +49,8 @@ func StartWireguard(conf *DeviceConfig) (*netstack.Net, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
return tnet, nil
|
||||
return &VirtualTun{
|
||||
tnet: tnet,
|
||||
systemDNS: len(setting.dns) == 0,
|
||||
}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue