2022-12-04 14:37:52 +08:00
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
)
|
|
|
|
|
|
|
|
type TuicServer struct {
|
2022-12-06 09:04:30 +08:00
|
|
|
Enable bool `yaml:"enable" json:"enable"`
|
|
|
|
Listen string `yaml:"listen" json:"listen"`
|
|
|
|
Token []string `yaml:"token" json:"token"`
|
|
|
|
Certificate string `yaml:"certificate" json:"certificate"`
|
|
|
|
PrivateKey string `yaml:"private-key" json:"private-key"`
|
|
|
|
CongestionController string `yaml:"congestion-controller" json:"congestion-controller,omitempty"`
|
|
|
|
MaxIdleTime int `yaml:"max-idle-time" json:"max-idle-time,omitempty"`
|
|
|
|
AuthenticationTimeout int `yaml:"authentication-timeout" json:"authentication-timeout,omitempty"`
|
|
|
|
ALPN []string `yaml:"alpn" json:"alpn,omitempty"`
|
|
|
|
MaxUdpRelayPacketSize int `yaml:"max-udp-relay-packet-size" json:"max-udp-relay-packet-size,omitempty"`
|
2022-12-04 14:37:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (t TuicServer) String() string {
|
|
|
|
b, _ := json.Marshal(t)
|
|
|
|
return string(b)
|
|
|
|
}
|