V2bX/conf/core.go

35 lines
993 B
Go
Raw Normal View History

package conf
type CoreConfig struct {
Type string `yaml:"Type"`
2023-07-12 13:19:13 -04:00
XrayConfig *XrayConfig `yaml:"XrayConfig"`
}
type XrayConfig struct {
LogConfig *LogConfig `yaml:"Log"`
2023-06-09 09:20:41 -04:00
AssetPath string `yaml:"AssetPath"`
DnsConfigPath string `yaml:"DnsConfigPath"`
RouteConfigPath string `yaml:"RouteConfigPath"`
ConnectionConfig *ConnectionConfig `yaml:"ConnectionConfig"`
InboundConfigPath string `yaml:"InboundConfigPath"`
OutboundConfigPath string `yaml:"OutboundConfigPath"`
}
type ConnectionConfig struct {
Handshake uint32 `yaml:"handshake"`
ConnIdle uint32 `yaml:"connIdle"`
UplinkOnly uint32 `yaml:"uplinkOnly"`
DownlinkOnly uint32 `yaml:"downlinkOnly"`
BufferSize int32 `yaml:"bufferSize"`
}
func NewConnectionConfig() *ConnectionConfig {
return &ConnectionConfig{
Handshake: 4,
ConnIdle: 30,
UplinkOnly: 2,
DownlinkOnly: 4,
BufferSize: 64,
}
}