Доработка Proxy Server

Вынес настройки в конфигурацию, обновил Readme
This commit is contained in:
Falknat
2025-10-02 08:58:22 +07:00
parent 7a87617282
commit 93bed4a458
4 changed files with 138 additions and 77 deletions

View File

@@ -9,8 +9,9 @@ import (
var ConfigPath = "WebServer/config.json"
var ConfigData struct {
Site_www []Site_www `json:"Site_www"`
Soft_Settings Soft_Settings `json:"Soft_Settings"`
Site_www []Site_www `json:"Site_www"`
Soft_Settings Soft_Settings `json:"Soft_Settings"`
Proxy_Service []Proxy_Service `json:"Proxy_Service"`
}
type Site_www struct {
@@ -31,6 +32,14 @@ type Soft_Settings struct {
Admin_host string `json:"admin_host"`
}
type Proxy_Service struct {
Enable bool `json:"Enable"`
ExternalDomain string `json:"ExternalDomain"`
LocalAddress string `json:"LocalAddress"`
LocalPort string `json:"LocalPort"`
UseHTTPS bool `json:"UseHTTPS"`
}
func LoadConfig() {
data, err := os.ReadFile(ConfigPath)