2025-02-04 00:44:18 +08:00
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
2025-02-04 15:09:27 +08:00
|
|
|
|
|
|
|
"github.com/metacubex/mihomo/listener/reality"
|
|
|
|
"github.com/metacubex/mihomo/listener/sing"
|
2025-02-04 00:44:18 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
type VlessUser struct {
|
|
|
|
Username string
|
|
|
|
UUID string
|
|
|
|
Flow string
|
|
|
|
}
|
|
|
|
|
|
|
|
type VlessServer struct {
|
|
|
|
Enable bool
|
|
|
|
Listen string
|
|
|
|
Users []VlessUser
|
|
|
|
WsPath string
|
|
|
|
Certificate string
|
|
|
|
PrivateKey string
|
2025-02-04 15:09:27 +08:00
|
|
|
RealityConfig reality.Config
|
2025-02-04 00:44:18 +08:00
|
|
|
MuxOption sing.MuxOption `yaml:"mux-option" json:"mux-option,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (t VlessServer) String() string {
|
|
|
|
b, _ := json.Marshal(t)
|
|
|
|
return string(b)
|
|
|
|
}
|