mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 16:00:25 +08:00 
			
		
		
		
	
		
			
	
	
		
			15 lines
		
	
	
		
			365 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			15 lines
		
	
	
		
			365 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package configs
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								type UnixProtocolConfig struct {
							 | 
						||
| 
								 | 
							
									IsOn   bool     `yaml:"isOn"`                 // 是否开启
							 | 
						||
| 
								 | 
							
									Listen []string `yaml:"listen" json:"listen"` // 监听地址
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func (this *UnixProtocolConfig) Addresses() []string {
							 | 
						||
| 
								 | 
							
									result := []string{}
							 | 
						||
| 
								 | 
							
									for _, listen := range this.Listen {
							 | 
						||
| 
								 | 
							
										result = append(result, ProtocolUnix+":"+listen)
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									return result
							 | 
						||
| 
								 | 
							
								}
							 |