浏览代码

add egress domain to host pull

abhishek9686 4 周之前
父节点
当前提交
1d49fb0de0
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 2 0
      controllers/hosts.go
  2. 2 0
      models/structs.go

+ 2 - 0
controllers/hosts.go

@@ -254,6 +254,8 @@ func pull(w http.ResponseWriter, r *http.Request) {
 		ChangeDefaultGw:   hPU.ChangeDefaultGw,
 		DefaultGwIp:       hPU.DefaultGwIp,
 		IsInternetGw:      hPU.IsInternetGw,
+		NameServers:       hPU.NameServers,
+		EgressWithDomains: hPU.EgressWithDomains,
 		EndpointDetection: logic.IsEndpointDetectionEnabled(),
 	}
 

+ 2 - 0
models/structs.go

@@ -261,6 +261,8 @@ type HostPull struct {
 	DefaultGwIp       net.IP                `json:"default_gw_ip"`
 	IsInternetGw      bool                  `json:"is_inet_gw"`
 	EndpointDetection bool                  `json:"endpoint_detection"`
+	NameServers       []string              `json:"name_servers"`
+	EgressWithDomains []EgressDomain        `json:"egress_with_domains"`
 }
 
 type DefaultGwInfo struct {