mirror of
				https://github.com/bjdgyc/anylink.git
				synced 2025-10-31 08:29:33 +08:00 
			
		
		
		
	增加默认路由
This commit is contained in:
		| @@ -68,17 +68,24 @@ func SetGroup(g *Group) error { | ||||
| 	clientDns := []ValData{} | ||||
| 	for _, v := range g.ClientDns { | ||||
| 		if v.Val != "" { | ||||
| 			ip := net.ParseIP(v.Val) | ||||
| 			if ip.String() != v.Val { | ||||
| 				return errors.New("DNS IP 错误") | ||||
| 			} | ||||
| 			clientDns = append(clientDns, v) | ||||
| 		} | ||||
| 	} | ||||
| 	if len(clientDns) == 0 { | ||||
| 		return errors.New("DNS 错误") | ||||
| 		return errors.New("必须设置一个DNS") | ||||
| 	} | ||||
| 	g.ClientDns = clientDns | ||||
|  | ||||
| 	routeInclude := []ValData{} | ||||
| 	for _, v := range g.RouteInclude { | ||||
| 		if v.Val != "" { | ||||
| 			if v.Val == "all" { | ||||
| 				continue | ||||
| 			} | ||||
| 			ipMask, _, err := parseIpNet(v.Val) | ||||
| 			if err != nil { | ||||
| 				return errors.New("RouteInclude 错误" + err.Error()) | ||||
|   | ||||
							
								
								
									
										13976
									
								
								web/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										13976
									
								
								web/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -319,7 +319,7 @@ export default { | ||||
|         status: 1, | ||||
|         allow_lan: true, | ||||
|         client_dns: [{val: '114.114.114.114'}], | ||||
|         route_include: [], | ||||
|         route_include: [{val: 'all', note: '默认全局代理'}], | ||||
|         route_exclude: [], | ||||
|         link_acl: [], | ||||
|       }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user