Fix endpoint address in InitDB
This commit is contained in:
		
							parent
							
								
									1992af5db5
								
							
						
					
					
						commit
						f79b52ac2b
					
				|  | @ -2,9 +2,6 @@ version: '3' | ||||||
| 
 | 
 | ||||||
| services: | services: | ||||||
|   wg: |   wg: | ||||||
|     build: |  | ||||||
|       context: . |  | ||||||
|       dockerfile: Dockerfile |  | ||||||
|     image: ngoduykhanh/wireguard-ui:latest |     image: ngoduykhanh/wireguard-ui:latest | ||||||
|     container_name: wgui |     container_name: wgui | ||||||
|     ports: |     ports: | ||||||
|  | @ -14,4 +11,4 @@ services: | ||||||
|       options: |       options: | ||||||
|         max-size: 50m |         max-size: 50m | ||||||
|     volumes: |     volumes: | ||||||
|       - /etc/wireguard/wg0.conf:/etc/wireguard/wg0.conf |       - /etc/wireguard:/etc/wireguard | ||||||
|  |  | ||||||
|  | @ -95,7 +95,7 @@ func InitDB() error { | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		globalSetting := new(model.GlobalSetting) | 		globalSetting := new(model.GlobalSetting) | ||||||
| 		globalSetting.EndpointAddress = fmt.Sprintf("%s:%d", publicInterface.IPAddress, defaultServerPort) | 		globalSetting.EndpointAddress = publicInterface.IPAddress | ||||||
| 		globalSetting.DNSServers = []string{defaultDNS} | 		globalSetting.DNSServers = []string{defaultDNS} | ||||||
| 		globalSetting.MTU = defaultMTU | 		globalSetting.MTU = defaultMTU | ||||||
| 		globalSetting.PersistentKeepalive = defaultPersistentKeepalive | 		globalSetting.PersistentKeepalive = defaultPersistentKeepalive | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue