Meow
2026-05-07 19:10:48 +08:00
committed by RPRX
parent 906d49a271
commit c42deab55c
14 changed files with 75 additions and 42 deletions
+5 -1
View File
@@ -39,12 +39,16 @@ type HysteriaUserConfig struct {
type HysteriaServerConfig struct {
Version int32 `json:"version"`
Users []*HysteriaUserConfig `json:"clients"`
Users []*HysteriaUserConfig `json:"users"`
Clients []*HysteriaUserConfig `json:"clients"`
}
func (c *HysteriaServerConfig) Build() (proto.Message, error) {
config := new(hysteria.ServerConfig)
if c.Clients != nil {
c.Users = c.Clients
}
if len(c.Users) > 0 {
config.Users = make([]*protocol.User, len(c.Users))
processUser := func(idx int) error {