feat: machine mode, PEM-only certs, ECH support, multi-instance config, batch ops, xbctl

This commit is contained in:
xboard
2026-04-16 23:06:58 +08:00
parent 598b6b531b
commit c5bcbc3299
52 changed files with 6676 additions and 1348 deletions
+28 -5
View File
@@ -19,17 +19,18 @@ type StandaloneNodeConfig struct {
ServerPort int `yaml:"server_port"`
Network string `yaml:"network,omitempty"`
NetworkSettings map[string]any `yaml:"network_settings,omitempty"`
Routes []StandaloneRouteRule `yaml:"routes,omitempty"`
NetworkSettings map[string]any `yaml:"network_settings,omitempty"`
Routes []StandaloneRouteRule `yaml:"routes,omitempty"`
CustomRouteRules []StandaloneCustomRouteRule `yaml:"custom_route_rules,omitempty"`
Cipher string `yaml:"cipher,omitempty"`
Plugin string `yaml:"plugin,omitempty"`
PluginOpt string `yaml:"plugin_opts,omitempty"`
ServerKey string `yaml:"server_key,omitempty"`
TLS int `yaml:"tls,omitempty"`
Flow string `yaml:"flow,omitempty"`
Decryption string `yaml:"decryption,omitempty"`
TLS int `yaml:"tls,omitempty"`
Flow string `yaml:"flow,omitempty"`
Decryption string `yaml:"decryption,omitempty"`
TLSSettings map[string]any `yaml:"tls_settings,omitempty"`
Host string `yaml:"host,omitempty"`
@@ -57,6 +58,28 @@ type StandaloneRouteRule struct {
ActionValue string `yaml:"action_value,omitempty"`
}
type StandaloneCustomRouteRule struct {
Name string `yaml:"name,omitempty"`
Disabled bool `yaml:"disabled,omitempty"`
Match StandaloneRouteMatch `yaml:"match,omitempty"`
Action StandaloneRouteAction `yaml:"action,omitempty"`
}
type StandaloneRouteMatch struct {
Domains []string `yaml:"domains,omitempty"`
DomainSuffixes []string `yaml:"domain_suffixes,omitempty"`
IPCIDRs []string `yaml:"ip_cidrs,omitempty"`
Ports []string `yaml:"ports,omitempty"`
Networks []string `yaml:"networks,omitempty"`
SourceCIDRs []string `yaml:"source_cidrs,omitempty"`
SourcePorts []string `yaml:"source_ports,omitempty"`
}
type StandaloneRouteAction struct {
Type string `yaml:"type,omitempty"`
Target string `yaml:"target,omitempty"`
}
type StandaloneMultiplexConfig struct {
Enabled bool `yaml:"enabled"`
Protocol string `yaml:"protocol,omitempty"`