mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 21:21:55 +08:00 
			
		
		
		
	
		
			
	
	
		
			19 lines
		
	
	
		
			536 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
		
			536 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								package dnsconfigs
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								type DNSHost struct {
							 | 
						||
| 
								 | 
							
									Host     string `json:"host"`
							 | 
						||
| 
								 | 
							
									Port     int    `json:"port"`
							 | 
						||
| 
								 | 
							
									Protocol string `json:"protocol"`
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// RecursionConfig 递归DNS设置
							 | 
						||
| 
								 | 
							
								type RecursionConfig struct {
							 | 
						||
| 
								 | 
							
									IsOn          bool       `json:"isOn"`
							 | 
						||
| 
								 | 
							
									Hosts         []*DNSHost `json:"hosts"`
							 | 
						||
| 
								 | 
							
									UseLocalHosts bool       `json:"useLocalHosts"` // 自动从本机读取DNS
							 | 
						||
| 
								 | 
							
									AllowDomains  []string   `json:"allowDomains"`
							 | 
						||
| 
								 | 
							
									DenyDomains   []string   `json:"denyDomains"`
							 | 
						||
| 
								 | 
							
								}
							 |