mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-26 20:29:03 +03:00
MASQUE outbound previously hardcoded the TLS SNI to consumer-masque.cloudflareclient.com. Add a server_name field to the MASQUE outbound TLS options. When empty it falls back to the existing default (cloudflare.ConnectSNI), so existing configs are unaffected.
39 lines
2.0 KiB
Go
39 lines
2.0 KiB
Go
package option
|
|
|
|
import (
|
|
"net/netip"
|
|
|
|
"github.com/sagernet/sing/common/json/badoption"
|
|
)
|
|
|
|
type MASQUEOutboundOptions struct {
|
|
DialerOptions
|
|
System bool `json:"system,omitempty"`
|
|
Name string `json:"name,omitempty"`
|
|
AllowedIPs badoption.Listable[netip.Prefix] `json:"allowed_ips,omitempty"`
|
|
UseHTTP2 bool `json:"use_http2,omitempty"`
|
|
UseIPv6 bool `json:"use_ipv6,omitempty"`
|
|
Profile CloudflareProfile `json:"profile,omitempty"`
|
|
UDPTimeout badoption.Duration `json:"udp_timeout,omitempty"`
|
|
UDPKeepalivePeriod badoption.Duration `json:"udp_keepalive_period,omitempty"`
|
|
UDPInitialPacketSize uint16 `json:"udp_initial_packet_size,omitempty"`
|
|
ReconnectDelay badoption.Duration `json:"reconnect_delay,omitempty"`
|
|
MASQUEOutboundTLSOptionsContainer
|
|
}
|
|
|
|
type MASQUEOutboundTLSOptions struct {
|
|
ServerName string `json:"server_name,omitempty"`
|
|
Insecure bool `json:"insecure,omitempty"`
|
|
CipherSuites badoption.Listable[string] `json:"cipher_suites,omitempty"`
|
|
CurvePreferences badoption.Listable[CurvePreference] `json:"curve_preferences,omitempty"`
|
|
Fragment bool `json:"fragment,omitempty"`
|
|
FragmentFallbackDelay badoption.Duration `json:"fragment_fallback_delay,omitempty"`
|
|
RecordFragment bool `json:"record_fragment,omitempty"`
|
|
KernelTx bool `json:"kernel_tx,omitempty"`
|
|
KernelRx bool `json:"kernel_rx,omitempty"`
|
|
}
|
|
|
|
type MASQUEOutboundTLSOptionsContainer struct {
|
|
TLS *MASQUEOutboundTLSOptions `json:"tls,omitempty"`
|
|
}
|