Merge https://github.com/bigeagle/godns into domain-specs-name-server
# Conflicts: # handler.go # hosts.go # hosts_test.go # resolver.go # settings.go
This commit is contained in:
		
							
								
								
									
										5
									
								
								etc/china.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								etc/china.conf
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,5 @@
 | 
			
		||||
server=8.8.8.8#53
 | 
			
		||||
server=127.0.0.1#5553
 | 
			
		||||
 | 
			
		||||
server=/baidu.com/114.114.114.114
 | 
			
		||||
# refer https://github.com/felixonmars/dnsmasq-china-list
 | 
			
		||||
							
								
								
									
										58
									
								
								etc/godns.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								etc/godns.conf
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,58 @@
 | 
			
		||||
#Toml config file
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Title = "GODNS"
 | 
			
		||||
Version = "0.1.2"
 | 
			
		||||
Author = "kenshin"
 | 
			
		||||
 | 
			
		||||
Debug = false
 | 
			
		||||
 | 
			
		||||
[server]
 | 
			
		||||
host = "127.0.0.1"
 | 
			
		||||
port = 53
 | 
			
		||||
 | 
			
		||||
[resolv]
 | 
			
		||||
#Domain-specific nameservers configuration, formatting keep compatible with Dnsmasq
 | 
			
		||||
server-list-file = "./etc/china.conf"
 | 
			
		||||
resolv-file = "/etc/resolv.conf"
 | 
			
		||||
timeout = 5  # 5 seconds
 | 
			
		||||
# The concurrency interval request upstream recursive server
 | 
			
		||||
# Match the PR15, https://github.com/kenshinx/godns/pull/15
 | 
			
		||||
interval = 200 # 200 milliseconds
 | 
			
		||||
 | 
			
		||||
setedns0 = false #Support for larger UDP DNS responses
 | 
			
		||||
 | 
			
		||||
[redis]
 | 
			
		||||
enable = true
 | 
			
		||||
host = "127.0.0.1"
 | 
			
		||||
port = 6379
 | 
			
		||||
db = 0
 | 
			
		||||
password =""
 | 
			
		||||
 | 
			
		||||
[memcache]
 | 
			
		||||
servers = ["127.0.0.1:11211"]
 | 
			
		||||
 | 
			
		||||
[log]
 | 
			
		||||
stdout = true
 | 
			
		||||
file = "./godns.log"
 | 
			
		||||
level = "INFO"  #DEBUG | INFO |NOTICE | WARN | ERROR  
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[cache]
 | 
			
		||||
# backend option [memory|memcache|redis]	
 | 
			
		||||
# redis backend not implemented yet
 | 
			
		||||
backend = "memory"  
 | 
			
		||||
expire = 600  # 10 minutes
 | 
			
		||||
maxcount = 0 #If set zero. The Sum of cache itmes will be unlimit.
 | 
			
		||||
 | 
			
		||||
[hosts]
 | 
			
		||||
#If set false, will not query hosts file and redis hosts record
 | 
			
		||||
enable = true
 | 
			
		||||
host-file = "/etc/hosts"
 | 
			
		||||
redis-enable = false
 | 
			
		||||
redis-key = "godns:hosts"
 | 
			
		||||
ttl = 600
 | 
			
		||||
refresh-interval = 5 # 5 seconds
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user