diff --git a/model/setting.go b/model/setting.go index a316172..e871591 100644 --- a/model/setting.go +++ b/model/setting.go @@ -10,6 +10,7 @@ type GlobalSetting struct { DNSServers []string `json:"dns_servers"` MTU int `json:"mtu,string"` PersistentKeepalive int `json:"persistent_keepalive,string"` + ForwardMark string `json:"forward_mark"` ConfigFilePath string `json:"config_file_path"` UpdatedAt time.Time `json:"updated_at"` } diff --git a/store/jsondb/jsondb.go b/store/jsondb/jsondb.go index 9088f54..643e5e5 100644 --- a/store/jsondb/jsondb.go +++ b/store/jsondb/jsondb.go @@ -90,6 +90,7 @@ func (o *JsonDB) Init() error { globalSetting.DNSServers = []string{util.DefaultDNS} globalSetting.MTU = util.DefaultMTU globalSetting.PersistentKeepalive = util.DefaultPersistentKeepalive + globalSetting.ForwardMark = util.DefaultForwardMark globalSetting.ConfigFilePath = util.DefaultConfigFilePath globalSetting.UpdatedAt = time.Now().UTC() o.conn.Write("server", "global_settings", globalSetting) diff --git a/templates/global_settings.html b/templates/global_settings.html index 81454dc..d3da9da 100644 --- a/templates/global_settings.html +++ b/templates/global_settings.html @@ -55,6 +55,12 @@ Global Settings name="persistent_keepalive" placeholder="Persistent Keepalive" value="{{if .globalSettings.PersistentKeepalive }}{{ .globalSettings.PersistentKeepalive }}{{end}}"> +