You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							28 lines
						
					
					
						
							840 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							28 lines
						
					
					
						
							840 B
						
					
					
				
								# config.yml
							 | 
						|
								server:
							 | 
						|
								  app_listen_port: ":8089"
							 | 
						|
								  device_listen_port: ":7002"
							 | 
						|
								
							 | 
						|
								  # [重要] 注册到 Redis 的公网地址
							 | 
						|
								  public_app_addr: "192.168.5.193:8089"
							 | 
						|
								  public_device_addr: "192.168.5.193:7002"
							 | 
						|
								
							 | 
						|
								  instance_id: "" # 留空会自动生成
							 | 
						|
								
							 | 
						|
								# 认证密钥配置
							 | 
						|
								auth:
							 | 
						|
								  app_access_secret: "D4tBb9Y0oHSXRAyHLHpdKfXAuNCyCZ45AZxKJOhMJMs="
							 | 
						|
								  device_relay_secret: "p+JtJ8aHlM1lDYu7UGFanX8ALVt1pM1BQmKTpqTJccs="
							 | 
						|
								
							 | 
						|
								redis:
							 | 
						|
								  enabled: true
							 | 
						|
								  addr: "118.178.183.78:6379"
							 | 
						|
								  password: ""
							 | 
						|
								  db: 0
							 | 
						|
								
							 | 
						|
								  # [新增] 服务发现相关的 Key 和 TTL
							 | 
						|
								  # 使用 Redis Hash: Key 是 instance_registry_key, Field 是 instance_id, Value 是实例信息的 JSON
							 | 
						|
								  instance_registry_key: "relay_instances"
							 | 
						|
								  device_relay_mapping_key: "device_relay_mapping"
							 | 
						|
								  heartbeat_interval_seconds: 15
							 | 
						|
								  instance_ttl_seconds: 45 # TTL 应该是心跳间隔的 2-3 倍
							 |