github.com/metacubex/mihomo@v1.18.5/listener/config/tuic.go (about) 1 package config 2 3 import ( 4 "github.com/metacubex/mihomo/listener/sing" 5 6 "encoding/json" 7 ) 8 9 type TuicServer struct { 10 Enable bool `yaml:"enable" json:"enable"` 11 Listen string `yaml:"listen" json:"listen"` 12 Token []string `yaml:"token" json:"token,omitempty"` 13 Users map[string]string `yaml:"users" json:"users,omitempty"` 14 Certificate string `yaml:"certificate" json:"certificate"` 15 PrivateKey string `yaml:"private-key" json:"private-key"` 16 CongestionController string `yaml:"congestion-controller" json:"congestion-controller,omitempty"` 17 MaxIdleTime int `yaml:"max-idle-time" json:"max-idle-time,omitempty"` 18 AuthenticationTimeout int `yaml:"authentication-timeout" json:"authentication-timeout,omitempty"` 19 ALPN []string `yaml:"alpn" json:"alpn,omitempty"` 20 MaxUdpRelayPacketSize int `yaml:"max-udp-relay-packet-size" json:"max-udp-relay-packet-size,omitempty"` 21 MaxDatagramFrameSize int `yaml:"max-datagram-frame-size" json:"max-datagram-frame-size,omitempty"` 22 CWND int `yaml:"cwnd" json:"cwnd,omitempty"` 23 MuxOption sing.MuxOption `yaml:"mux-option" json:"mux-option,omitempty"` 24 } 25 26 func (t TuicServer) String() string { 27 b, _ := json.Marshal(t) 28 return string(b) 29 }