Move HTTP, gRPC, Reality, and WebSocket options to proxy.go refactor VmessJson type to use 'any' for flexible types

This commit is contained in:
2025-06-12 09:22:23 +10:00
parent 73616c98a3
commit 2d8508f390
2 changed files with 42 additions and 42 deletions

View File

@ -1,5 +1,32 @@
package proxy
type HTTPOptions struct {
Method string `yaml:"method,omitempty"`
Path []string `yaml:"path,omitempty"`
Headers map[string][]string `yaml:"headers,omitempty"`
}
type HTTP2Options struct {
Host []string `yaml:"host,omitempty"`
Path string `yaml:"path,omitempty"`
}
type GrpcOptions struct {
GrpcServiceName string `yaml:"grpc-service-name,omitempty"`
}
type RealityOptions struct {
PublicKey string `yaml:"public-key"`
ShortID string `yaml:"short-id,omitempty"`
}
type WSOptions struct {
Path string `yaml:"path,omitempty"`
Headers map[string]string `yaml:"headers,omitempty"`
MaxEarlyData int `yaml:"max-early-data,omitempty"`
EarlyDataHeaderName string `yaml:"early-data-header-name,omitempty"`
}
type SmuxStruct struct {
Enabled bool `yaml:"enable"`
}