feat: return err if setup dns failed

This commit is contained in:
wencaiwulue
2023-02-27 08:52:39 +08:00
parent 98358e0d2b
commit f30a5dad19
2 changed files with 5 additions and 2 deletions

View File

@@ -19,6 +19,6 @@
- [x] 自己写个 control plane - [x] 自己写个 control plane
- [x] 考虑是否将 control plane 和服务分开 - [x] 考虑是否将 control plane 和服务分开
- [x] 写单元测试,优化 GitHub action - [x] 写单元测试,优化 GitHub action
- [ ] Linux 和 macOS 也改用 WireGuard library - [x] Linux 和 macOS 也改用 WireGuard library
- [x] 探测是否有重复路由的 utun设备禁用 `sudo ifconfig utun1 down` - [x] 探测是否有重复路由的 utun设备禁用 `sudo ifconfig utun1 down`

View File

@@ -130,7 +130,10 @@ func (c *ConnectOptions) DoConnect() (err error) {
} }
c.addRouteDynamic(ctx) c.addRouteDynamic(ctx)
c.deleteFirewallRule(ctx) c.deleteFirewallRule(ctx)
c.setupDNS() err = c.setupDNS()
if err != nil {
return err
}
log.Info("dns service ok") log.Info("dns service ok")
return return
} }