test
This commit is contained in:
114
app/types.go
Normal file
114
app/types.go
Normal file
@@ -0,0 +1,114 @@
|
||||
package app
|
||||
|
||||
type HysteriaTLSConfig struct {
|
||||
Cert string `yaml:"cert"`
|
||||
Key string `yaml:"key"`
|
||||
}
|
||||
|
||||
type HysteriaObfsConfig struct {
|
||||
Type string `yaml:"type"`
|
||||
Salamander struct {
|
||||
Password string `yaml:"password"`
|
||||
} `yaml:"salamander"`
|
||||
}
|
||||
|
||||
type HysteriaQuicConfig struct {
|
||||
InitStreamReceiveWindow *int64 `yaml:"initStreamReceiveWindow"`
|
||||
MaxStreamReceiveWindow *int64 `yaml:"maxStreamReceiveWindow"`
|
||||
InitConnReceiveWindow *int64 `yaml:"initConnReceiveWindow"`
|
||||
MaxConnReceiveWindow *int64 `yaml:"maxConnReceiveWindow"`
|
||||
MaxIdleTimeout *string `yaml:"maxIdleTimeout"`
|
||||
MaxIncomingStream *int64 `yaml:"maxIncomingStream"`
|
||||
DisablePathMTUDiscovery *bool `yaml:"disablePathMTUDiscovery"`
|
||||
}
|
||||
|
||||
type HysteriaBandwidthConfig struct {
|
||||
UP *string `yaml:"up"`
|
||||
Down *string `yaml:"down"`
|
||||
IgnoreClientBandwidth *bool `yaml:"ignoreClientBandwidth"`
|
||||
}
|
||||
|
||||
type HysteriaAuthType string
|
||||
type HysteriaAuthConfig struct {
|
||||
Type HysteriaAuthType `yaml:"type"`
|
||||
Password string `yaml:"password,omitempty"`
|
||||
Userpass map[string]string `yaml:"userpass,omitempty"`
|
||||
Http struct {
|
||||
URL string `yaml:"url"`
|
||||
Insecure bool `yaml:"insecure"`
|
||||
} `yaml:"http,omitempty"`
|
||||
Command string `yaml:"command,omitempty"`
|
||||
}
|
||||
|
||||
type HysteriaTCPUDPResolverConfig struct {
|
||||
Address string `yaml:"addr"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
}
|
||||
type HysteriaTLSResolverConfig struct {
|
||||
Address string `yaml:"addr"`
|
||||
Timeout string `yaml:"timeout"`
|
||||
SNI string `yaml:"sni"`
|
||||
Insecure bool `yaml:"insecure"`
|
||||
}
|
||||
type HysteriaResolverType string
|
||||
type HysteriaResolverConfig struct {
|
||||
Type HysteriaResolverType `yaml:"type"`
|
||||
TCP *HysteriaTCPUDPResolverConfig `yaml:"tcp,omitempty"`
|
||||
UDP *HysteriaTCPUDPResolverConfig `yaml:"udp,omitempty"`
|
||||
TLS *HysteriaTLSResolverConfig `yaml:"tls,omitempty"`
|
||||
HTTPS *HysteriaTLSResolverConfig `yaml:"https,omitempty"`
|
||||
}
|
||||
|
||||
type HysteriaSniffConfig struct {
|
||||
Enable bool `yaml:"enable"`
|
||||
}
|
||||
|
||||
type HysteriaACLConfig struct{}
|
||||
type HysteriaOutboundConfig struct {
|
||||
Name string `yaml:"name"`
|
||||
Type string `yaml:"type"`
|
||||
}
|
||||
|
||||
type HysteriaTrafficStatsConfig struct {
|
||||
Listen string `yaml:"listen"`
|
||||
Secret string `yaml:"secret"`
|
||||
}
|
||||
|
||||
type HysteriaMasqueradeType string
|
||||
type HysteriaMasqueradeFile struct {
|
||||
Dir string `yaml:"dir"`
|
||||
}
|
||||
type HysteriaMasqueradeProxy struct {
|
||||
URL string `yaml:"url"`
|
||||
RewriteHost *bool `yaml:"rewriteHost,omitempty"`
|
||||
Insecure *bool `yaml:"insecure,omitempty"`
|
||||
}
|
||||
type HysteriaMasqueradeString struct {
|
||||
Content string `yaml:"content"`
|
||||
Headers map[string]string `yaml:"headers,omitempty"`
|
||||
StatusCode int `yaml:"statusCode"`
|
||||
}
|
||||
type HysteriaMasqueradeConfig struct {
|
||||
Type HysteriaMasqueradeType `yaml:"type"`
|
||||
File *HysteriaMasqueradeFile `yaml:"file,omitempty"`
|
||||
Proxy *HysteriaMasqueradeProxy `yaml:"proxy,omitempty"`
|
||||
String *HysteriaMasqueradeString `yaml:"string,omitempty"`
|
||||
|
||||
ListenHTTP *string `yaml:"listenHTTP,omitempty"`
|
||||
ListenHTTPS *string `yaml:"listenHTTPS,omitempty"`
|
||||
ForceHTTPS *bool `yaml:"forceHTTPS,omitempty"`
|
||||
}
|
||||
|
||||
type HysteriaConfig struct {
|
||||
Listen string `yaml:"listen"`
|
||||
TLS HysteriaTLSConfig `yaml:"tls"`
|
||||
Obfs *HysteriaObfsConfig `yaml:"obfs,omitempty"`
|
||||
Quic *HysteriaQuicConfig `yaml:"quic,omitempty"`
|
||||
SpeedTest *bool `yaml:"speedTest,omitempty"`
|
||||
Auth HysteriaAuthConfig `yaml:"auth"`
|
||||
Resolver *HysteriaResolverConfig `yaml:"resolver,omitempty"`
|
||||
Sniff *HysteriaSniffConfig `yaml:"sniff,omitempty"`
|
||||
ACL *HysteriaACLConfig `yaml:"acl,omitempty"`
|
||||
Outbounds []HysteriaOutboundConfig `yaml:"outbounds,omitempty"`
|
||||
TrafficStats *HysteriaTrafficStatsConfig `yaml:"trafficStats,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user