@@ -14,6 +14,9 @@ const (
1414)
1515
1616// Config API config
17+ //
18+ // Note: VLESS-related behavior should primarily follow panel custom_config and
19+ // NodeType definitions to avoid divergence between local settings and panel data.
1720type Config struct {
1821 APIHost string `mapstructure:"ApiHost"`
1922 NodeID int `mapstructure:"NodeID"`
@@ -39,7 +42,7 @@ type NodeStatus struct {
3942type NodeInfo struct {
4043 AcceptProxyProtocol bool
4144 Authority string
42- NodeType string // Must be V2ray, Trojan, and Shadowsocks
45+ NodeType string // Must be V2ray, Trojan, Shadowsocks, VLESS, Hysteria2, AnyTLS, Tuic
4346 NodeID int
4447 Port uint32
4548 SpeedLimit uint64 // Bps
@@ -48,6 +51,7 @@ type NodeInfo struct {
4851 FakeType string
4952 Host string
5053 Path string
54+ SNI string
5155 EnableTLS bool
5256 EnableSniffing bool
5357 RouteOnly bool
@@ -78,6 +82,9 @@ type NodeInfo struct {
7882 Security string
7983 Key string
8084 RejectUnknownSni bool
85+ Hysteria2Config * Hysteria2Config
86+ AnyTLSConfig * AnyTLSConfig
87+ TuicConfig * TuicConfig
8188}
8289
8390type UserInfo struct {
@@ -119,6 +126,7 @@ type DetectRule struct {
119126type DetectResult struct {
120127 UID int
121128 RuleID int
129+ IP string
122130}
123131
124132type REALITYConfig struct {
@@ -131,3 +139,36 @@ type REALITYConfig struct {
131139 MaxTimeDiff uint64
132140 ShortIds []string
133141}
142+
143+ // XrayRCertConfig describes certificate-related options sourced from the panel.
144+ // Useful for provider-specific ACME/lego flows (e.g., Cloudflare DNS envs).
145+ type XrayRCertConfig struct {
146+ Provider string `json:"provider"`
147+ Email string `json:"email"`
148+ DNSEnv map [string ]string `json:"dns_env"`
149+ }
150+
151+ // Hysteria2Config holds optional Hysteria2-specific settings.
152+ type Hysteria2Config struct {
153+ Obfs string
154+ ObfsPassword string
155+ UpMbps int
156+ DownMbps int
157+ IgnoreClientBandwidth bool
158+ PortHopEnabled bool
159+ PortHopPorts string
160+ }
161+
162+ // AnyTLSConfig holds AnyTLS-specific tuning options.
163+ type AnyTLSConfig struct {
164+ PaddingScheme []string
165+ }
166+
167+ // TuicConfig holds TUIC-specific settings.
168+ type TuicConfig struct {
169+ CongestionControl string
170+ UDPRelayMode string
171+ ZeroRTTHandshake bool
172+ Heartbeat int
173+ ALPN []string
174+ }
0 commit comments