Documentation
¶
Index ¶
- func DNSQueryTypeToString(queryType uint16) string
- func MarshallObjects(objects ...any) ([]byte, error)
- func MergeObjects(objects ...any) (*badjson.JSONObject, error)
- func ParseIntRange(str string) ([]int, error)
- func ToMap(v any) (*badjson.JSONObject, error)
- func UnmarshallExcluded(inputContent []byte, parentObject any, object any) error
- type ACMEDNS01AliDNSOptions
- type ACMEDNS01ChallengeOptions
- type ACMEDNS01CloudflareOptions
- type ACMEExternalAccountOptions
- type AddrPrefix
- type BrutalOptions
- type CacheFileOptions
- type ClashAPIOptions
- type DNSClientOptions
- type DNSFakeIPOptions
- type DNSOptions
- type DNSQueryType
- type DNSRule
- type DNSServerOptions
- type DebugOptions
- type DefaultDNSRule
- type DefaultHeadlessRule
- type DefaultRule
- type DialerOptions
- type DialerOptionsWrapper
- type DirectInboundOptions
- type DirectOutboundOptions
- type DomainStrategy
- type Duration
- type ExperimentalOptions
- type FwMark
- type GeoIPOptions
- type GeositeOptions
- type HTTPHeader
- type HTTPMixedInboundOptions
- type HTTPOutboundOptions
- type HTTPProxyOptions
- type HeadlessRule
- type Hysteria2InboundOptions
- type Hysteria2Obfs
- type Hysteria2OutboundOptions
- type Hysteria2User
- type HysteriaInboundOptions
- type HysteriaOutboundOptions
- type HysteriaUser
- type Inbound
- type InboundACMEOptions
- type InboundECHOptions
- type InboundMultiplexOptions
- type InboundOptions
- type InboundRealityHandshakeOptions
- type InboundRealityOptions
- type InboundTLSOptions
- type InboundTLSOptionsContainer
- type InboundTLSOptionsWrapper
- type IntRange
- type Listable
- type ListenAddress
- type ListenOptions
- type ListenOptionsWrapper
- type LocalRuleSet
- type LogOptions
- type LogicalDNSRule
- type LogicalHeadlessRule
- type LogicalRule
- type MemoryBytes
- type NTPOptions
- type NaiveInboundOptions
- type NetworkList
- type OnDemandOptions
- type OnDemandRule
- type OnDemandRuleAction
- type OnDemandRuleInterfaceType
- type Options
- type Outbound
- type OutboundECHOptions
- type OutboundMultiplexOptions
- type OutboundRealityOptions
- type OutboundTLSOptions
- type OutboundTLSOptionsContainer
- type OutboundTLSOptionsWrapper
- type OutboundUTLSOptions
- type PlainRuleSet
- type PlainRuleSetCompat
- type RedirectInboundOptions
- type RemoteRuleSet
- type RouteOptions
- type Rule
- type RuleSet
- type SSHOutboundOptions
- type SelectorOutboundOptions
- type ServerOptions
- type ServerOptionsWrapper
- type ShadowTLSHandshakeOptions
- type ShadowTLSInboundOptions
- type ShadowTLSOutboundOptions
- type ShadowTLSUser
- type ShadowsocksDestination
- type ShadowsocksInboundOptions
- type ShadowsocksOutboundOptions
- type ShadowsocksROutboundOptions
- type ShadowsocksUser
- type SocksInboundOptions
- type SocksOutboundOptions
- type TLSTricksOptions
- type TProxyInboundOptions
- type TUICInboundOptions
- type TUICOutboundOptions
- type TUICUser
- type TorOutboundOptions
- type TrojanInboundOptions
- type TrojanOutboundOptions
- type TrojanUser
- type TunInboundOptions
- type TunPlatformOptions
- type UDPOverTCPOptions
- type UDPTimeoutCompat
- type URLTestOutboundOptions
- type V2RayAPIOptions
- type V2RayGRPCOptions
- type V2RayHTTPOptions
- type V2RayHTTPUpgradeOptions
- type V2RayQUICOptions
- type V2RayStatsServiceOptions
- type V2RayTransportOptions
- type V2RayWebsocketOptions
- type VLESSInboundOptions
- type VLESSOutboundOptions
- type VLESSUser
- type VMessInboundOptions
- type VMessOutboundOptions
- type VMessUser
- type WireGuardOutboundOptions
- type WireGuardPeer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DNSQueryTypeToString ¶
func MarshallObjects ¶
func MergeObjects ¶
func MergeObjects(objects ...any) (*badjson.JSONObject, error)
func ParseIntRange ¶
Types ¶
type ACMEDNS01AliDNSOptions ¶
type ACMEDNS01ChallengeOptions ¶
type ACMEDNS01ChallengeOptions _ACMEDNS01ChallengeOptions
func (ACMEDNS01ChallengeOptions) MarshalJSON ¶
func (o ACMEDNS01ChallengeOptions) MarshalJSON() ([]byte, error)
func (*ACMEDNS01ChallengeOptions) UnmarshalJSON ¶
func (o *ACMEDNS01ChallengeOptions) UnmarshalJSON(bytes []byte) error
type ACMEDNS01CloudflareOptions ¶
type ACMEDNS01CloudflareOptions struct {
APIToken string `json:"api_token,omitempty"`
}
type AddrPrefix ¶
func (AddrPrefix) Build ¶
func (a AddrPrefix) Build() netip.Prefix
func (AddrPrefix) MarshalJSON ¶
func (a AddrPrefix) MarshalJSON() ([]byte, error)
func (*AddrPrefix) UnmarshalJSON ¶
func (a *AddrPrefix) UnmarshalJSON(content []byte) error
type BrutalOptions ¶
type CacheFileOptions ¶
type ClashAPIOptions ¶
type ClashAPIOptions struct {
ExternalController string `json:"external_controller,omitempty"`
ExternalUI string `json:"external_ui,omitempty"`
ExternalUIDownloadURL string `json:"external_ui_download_url,omitempty"`
ExternalUIDownloadDetour string `json:"external_ui_download_detour,omitempty"`
Secret string `json:"secret,omitempty"`
DefaultMode string `json:"default_mode,omitempty"`
ModeList []string `json:"-"`
AccessControlAllowOrigin Listable[string] `json:"access_control_allow_origin,omitempty"`
AccessControlAllowPrivateNetwork bool `json:"access_control_allow_private_network,omitempty"`
// Deprecated: migrated to global cache file
CacheFile string `json:"cache_file,omitempty"`
// Deprecated: migrated to global cache file
CacheID string `json:"cache_id,omitempty"`
// Deprecated: migrated to global cache file
StoreMode bool `json:"store_mode,omitempty"`
// Deprecated: migrated to global cache file
StoreSelected bool `json:"store_selected,omitempty"`
// Deprecated: migrated to global cache file
StoreFakeIP bool `json:"store_fakeip,omitempty"`
}
type DNSClientOptions ¶
type DNSClientOptions struct {
Strategy DomainStrategy `json:"strategy,omitempty"`
DisableCache bool `json:"disable_cache,omitempty"`
DisableExpire bool `json:"disable_expire,omitempty"`
IndependentCache bool `json:"independent_cache,omitempty"`
ClientSubnet *AddrPrefix `json:"client_subnet,omitempty"`
}
type DNSFakeIPOptions ¶
type DNSOptions ¶
type DNSOptions struct {
Servers []DNSServerOptions `json:"servers,omitempty"`
Rules []DNSRule `json:"rules,omitempty"`
Final string `json:"final,omitempty"`
ReverseMapping bool `json:"reverse_mapping,omitempty"`
FakeIP *DNSFakeIPOptions `json:"fakeip,omitempty"`
DNSClientOptions
}
type DNSQueryType ¶
type DNSQueryType uint16
func (DNSQueryType) MarshalJSON ¶
func (t DNSQueryType) MarshalJSON() ([]byte, error)
func (DNSQueryType) String ¶
func (t DNSQueryType) String() string
func (*DNSQueryType) UnmarshalJSON ¶
func (t *DNSQueryType) UnmarshalJSON(bytes []byte) error
type DNSServerOptions ¶
type DNSServerOptions struct {
Tag string `json:"tag,omitempty"`
Address string `json:"address"`
AddressResolver string `json:"address_resolver,omitempty"`
AddressStrategy DomainStrategy `json:"address_strategy,omitempty"`
AddressFallbackDelay Duration `json:"address_fallback_delay,omitempty"`
Strategy DomainStrategy `json:"strategy,omitempty"`
Detour string `json:"detour,omitempty"`
ClientSubnet *AddrPrefix `json:"client_subnet,omitempty"`
}
type DebugOptions ¶
type DebugOptions struct {
Listen string `json:"listen,omitempty"`
GCPercent *int `json:"gc_percent,omitempty"`
MaxStack *int `json:"max_stack,omitempty"`
MaxThreads *int `json:"max_threads,omitempty"`
PanicOnFault *bool `json:"panic_on_fault,omitempty"`
TraceBack string `json:"trace_back,omitempty"`
MemoryLimit MemoryBytes `json:"memory_limit,omitempty"`
OOMKiller *bool `json:"oom_killer,omitempty"`
}
type DefaultDNSRule ¶
type DefaultDNSRule struct {
Inbound Listable[string] `json:"inbound,omitempty"`
IPVersion int `json:"ip_version,omitempty"`
QueryType Listable[DNSQueryType] `json:"query_type,omitempty"`
Network Listable[string] `json:"network,omitempty"`
AuthUser Listable[string] `json:"auth_user,omitempty"`
Protocol Listable[string] `json:"protocol,omitempty"`
Domain Listable[string] `json:"domain,omitempty"`
DomainSuffix Listable[string] `json:"domain_suffix,omitempty"`
DomainKeyword Listable[string] `json:"domain_keyword,omitempty"`
DomainRegex Listable[string] `json:"domain_regex,omitempty"`
Geosite Listable[string] `json:"geosite,omitempty"`
SourceGeoIP Listable[string] `json:"source_geoip,omitempty"`
GeoIP Listable[string] `json:"geoip,omitempty"`
IPCIDR Listable[string] `json:"ip_cidr,omitempty"`
IPIsPrivate bool `json:"ip_is_private,omitempty"`
SourceIPCIDR Listable[string] `json:"source_ip_cidr,omitempty"`
SourceIPIsPrivate bool `json:"source_ip_is_private,omitempty"`
SourcePort Listable[uint16] `json:"source_port,omitempty"`
SourcePortRange Listable[string] `json:"source_port_range,omitempty"`
Port Listable[uint16] `json:"port,omitempty"`
PortRange Listable[string] `json:"port_range,omitempty"`
ProcessName Listable[string] `json:"process_name,omitempty"`
ProcessPath Listable[string] `json:"process_path,omitempty"`
ProcessPathRegex Listable[string] `json:"process_path_regex,omitempty"`
PackageName Listable[string] `json:"package_name,omitempty"`
User Listable[string] `json:"user,omitempty"`
UserID Listable[int32] `json:"user_id,omitempty"`
Outbound Listable[string] `json:"outbound,omitempty"`
ClashMode string `json:"clash_mode,omitempty"`
WIFISSID Listable[string] `json:"wifi_ssid,omitempty"`
WIFIBSSID Listable[string] `json:"wifi_bssid,omitempty"`
RuleSet Listable[string] `json:"rule_set,omitempty"`
RuleSetIPCIDRMatchSource bool `json:"rule_set_ip_cidr_match_source,omitempty"`
RuleSetIPCIDRAcceptEmpty bool `json:"rule_set_ip_cidr_accept_empty,omitempty"`
Invert bool `json:"invert,omitempty"`
Server string `json:"server,omitempty"`
DisableCache bool `json:"disable_cache,omitempty"`
RewriteTTL *uint32 `json:"rewrite_ttl,omitempty"`
ClientSubnet *AddrPrefix `json:"client_subnet,omitempty"`
// Deprecated: renamed to rule_set_ip_cidr_match_source
Deprecated_RulesetIPCIDRMatchSource bool `json:"rule_set_ipcidr_match_source,omitempty"`
}
func (*DefaultDNSRule) IsValid ¶
func (r *DefaultDNSRule) IsValid() bool
type DefaultHeadlessRule ¶
type DefaultHeadlessRule struct {
QueryType Listable[DNSQueryType] `json:"query_type,omitempty"`
Network Listable[string] `json:"network,omitempty"`
Domain Listable[string] `json:"domain,omitempty"`
DomainSuffix Listable[string] `json:"domain_suffix,omitempty"`
DomainKeyword Listable[string] `json:"domain_keyword,omitempty"`
DomainRegex Listable[string] `json:"domain_regex,omitempty"`
SourceIPCIDR Listable[string] `json:"source_ip_cidr,omitempty"`
IPCIDR Listable[string] `json:"ip_cidr,omitempty"`
SourcePort Listable[uint16] `json:"source_port,omitempty"`
SourcePortRange Listable[string] `json:"source_port_range,omitempty"`
Port Listable[uint16] `json:"port,omitempty"`
PortRange Listable[string] `json:"port_range,omitempty"`
ProcessName Listable[string] `json:"process_name,omitempty"`
ProcessPath Listable[string] `json:"process_path,omitempty"`
ProcessPathRegex Listable[string] `json:"process_path_regex,omitempty"`
PackageName Listable[string] `json:"package_name,omitempty"`
WIFISSID Listable[string] `json:"wifi_ssid,omitempty"`
WIFIBSSID Listable[string] `json:"wifi_bssid,omitempty"`
Invert bool `json:"invert,omitempty"`
DomainMatcher *domain.Matcher `json:"-"`
SourceIPSet *netipx.IPSet `json:"-"`
IPSet *netipx.IPSet `json:"-"`
AdGuardDomain Listable[string] `json:"-"`
AdGuardDomainMatcher *domain.AdGuardMatcher `json:"-"`
}
func (DefaultHeadlessRule) IsValid ¶
func (r DefaultHeadlessRule) IsValid() bool
type DefaultRule ¶
type DefaultRule struct {
Inbound Listable[string] `json:"inbound,omitempty"`
IPVersion int `json:"ip_version,omitempty"`
Network Listable[string] `json:"network,omitempty"`
AuthUser Listable[string] `json:"auth_user,omitempty"`
Protocol Listable[string] `json:"protocol,omitempty"`
Client Listable[string] `json:"client,omitempty"`
Domain Listable[string] `json:"domain,omitempty"`
DomainSuffix Listable[string] `json:"domain_suffix,omitempty"`
DomainKeyword Listable[string] `json:"domain_keyword,omitempty"`
DomainRegex Listable[string] `json:"domain_regex,omitempty"`
Geosite Listable[string] `json:"geosite,omitempty"`
SourceGeoIP Listable[string] `json:"source_geoip,omitempty"`
GeoIP Listable[string] `json:"geoip,omitempty"`
SourceIPCIDR Listable[string] `json:"source_ip_cidr,omitempty"`
SourceIPIsPrivate bool `json:"source_ip_is_private,omitempty"`
IPCIDR Listable[string] `json:"ip_cidr,omitempty"`
IPIsPrivate bool `json:"ip_is_private,omitempty"`
SourcePort Listable[uint16] `json:"source_port,omitempty"`
SourcePortRange Listable[string] `json:"source_port_range,omitempty"`
Port Listable[uint16] `json:"port,omitempty"`
PortRange Listable[string] `json:"port_range,omitempty"`
ProcessName Listable[string] `json:"process_name,omitempty"`
ProcessPath Listable[string] `json:"process_path,omitempty"`
ProcessPathRegex Listable[string] `json:"process_path_regex,omitempty"`
PackageName Listable[string] `json:"package_name,omitempty"`
User Listable[string] `json:"user,omitempty"`
UserID Listable[int32] `json:"user_id,omitempty"`
ClashMode string `json:"clash_mode,omitempty"`
WIFISSID Listable[string] `json:"wifi_ssid,omitempty"`
WIFIBSSID Listable[string] `json:"wifi_bssid,omitempty"`
RuleSet Listable[string] `json:"rule_set,omitempty"`
RuleSetIPCIDRMatchSource bool `json:"rule_set_ip_cidr_match_source,omitempty"`
Invert bool `json:"invert,omitempty"`
Outbound string `json:"outbound,omitempty"`
// Deprecated: renamed to rule_set_ip_cidr_match_source
Deprecated_RulesetIPCIDRMatchSource bool `json:"rule_set_ipcidr_match_source,omitempty"`
}
func (*DefaultRule) IsValid ¶
func (r *DefaultRule) IsValid() bool
type DialerOptions ¶
type DialerOptions struct {
Detour string `json:"detour,omitempty"`
BindInterface string `json:"bind_interface,omitempty"`
Inet4BindAddress *ListenAddress `json:"inet4_bind_address,omitempty"`
Inet6BindAddress *ListenAddress `json:"inet6_bind_address,omitempty"`
ProtectPath string `json:"protect_path,omitempty"`
RoutingMark uint32 `json:"routing_mark,omitempty"`
ReuseAddr bool `json:"reuse_addr,omitempty"`
ConnectTimeout Duration `json:"connect_timeout,omitempty"`
TCPFastOpen bool `json:"tcp_fast_open,omitempty"`
TCPMultiPath bool `json:"tcp_multi_path,omitempty"`
UDPFragment *bool `json:"udp_fragment,omitempty"`
UDPFragmentDefault bool `json:"-"`
DomainStrategy DomainStrategy `json:"domain_strategy,omitempty"`
FallbackDelay Duration `json:"fallback_delay,omitempty"`
IsWireGuardListener bool `json:"-"`
}
func (*DialerOptions) ReplaceDialerOptions ¶
func (o *DialerOptions) ReplaceDialerOptions(options DialerOptions)
func (*DialerOptions) TakeDialerOptions ¶
func (o *DialerOptions) TakeDialerOptions() DialerOptions
type DialerOptionsWrapper ¶
type DialerOptionsWrapper interface {
TakeDialerOptions() DialerOptions
ReplaceDialerOptions(options DialerOptions)
}
type DirectInboundOptions ¶
type DirectInboundOptions struct {
ListenOptions
Network NetworkList `json:"network,omitempty"`
OverrideAddress string `json:"override_address,omitempty"`
OverridePort uint16 `json:"override_port,omitempty"`
}
type DirectOutboundOptions ¶
type DirectOutboundOptions struct {
DialerOptions
OverrideAddress string `json:"override_address,omitempty"`
OverridePort uint16 `json:"override_port,omitempty"`
ProxyProtocol uint8 `json:"proxy_protocol,omitempty"`
}
type DomainStrategy ¶
type DomainStrategy dns.DomainStrategy
func (DomainStrategy) MarshalJSON ¶
func (s DomainStrategy) MarshalJSON() ([]byte, error)
func (*DomainStrategy) UnmarshalJSON ¶
func (s *DomainStrategy) UnmarshalJSON(bytes []byte) error
type Duration ¶
func ParseDuration ¶
ParseDuration parses a duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
func (Duration) MarshalJSON ¶
func (*Duration) UnmarshalJSON ¶
type ExperimentalOptions ¶
type ExperimentalOptions struct {
CacheFile *CacheFileOptions `json:"cache_file,omitempty"`
ClashAPI *ClashAPIOptions `json:"clash_api,omitempty"`
V2RayAPI *V2RayAPIOptions `json:"v2ray_api,omitempty"`
Debug *DebugOptions `json:"debug,omitempty"`
}
type GeoIPOptions ¶
type GeositeOptions ¶
type HTTPHeader ¶
func (HTTPHeader) Build ¶
func (h HTTPHeader) Build() http.Header
type HTTPMixedInboundOptions ¶
type HTTPMixedInboundOptions struct {
ListenOptions
Users []auth.User `json:"users,omitempty"`
SetSystemProxy bool `json:"set_system_proxy,omitempty"`
InboundTLSOptionsContainer
}
type HTTPOutboundOptions ¶
type HTTPOutboundOptions struct {
DialerOptions
ServerOptions
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
OutboundTLSOptionsContainer
Path string `json:"path,omitempty"`
Headers HTTPHeader `json:"headers,omitempty"`
}
type HTTPProxyOptions ¶
type HeadlessRule ¶
type HeadlessRule _HeadlessRule
func (HeadlessRule) IsValid ¶
func (r HeadlessRule) IsValid() bool
func (HeadlessRule) MarshalJSON ¶
func (r HeadlessRule) MarshalJSON() ([]byte, error)
func (*HeadlessRule) UnmarshalJSON ¶
func (r *HeadlessRule) UnmarshalJSON(bytes []byte) error
type Hysteria2InboundOptions ¶
type Hysteria2InboundOptions struct {
ListenOptions
UpMbps int `json:"up_mbps,omitempty"`
DownMbps int `json:"down_mbps,omitempty"`
Obfs *Hysteria2Obfs `json:"obfs,omitempty"`
Users []Hysteria2User `json:"users,omitempty"`
IgnoreClientBandwidth bool `json:"ignore_client_bandwidth,omitempty"`
InboundTLSOptionsContainer
Masquerade string `json:"masquerade,omitempty"`
BrutalDebug bool `json:"brutal_debug,omitempty"`
}
type Hysteria2Obfs ¶
type Hysteria2OutboundOptions ¶
type Hysteria2OutboundOptions struct {
DialerOptions
ServerOptions
UpMbps int `json:"up_mbps,omitempty"`
DownMbps int `json:"down_mbps,omitempty"`
Obfs *Hysteria2Obfs `json:"obfs,omitempty"`
Password string `json:"password,omitempty"`
Network NetworkList `json:"network,omitempty"`
OutboundTLSOptionsContainer
BrutalDebug bool `json:"brutal_debug,omitempty"`
}
type Hysteria2User ¶
type HysteriaInboundOptions ¶
type HysteriaInboundOptions struct {
ListenOptions
Up string `json:"up,omitempty"`
UpMbps int `json:"up_mbps,omitempty"`
Down string `json:"down,omitempty"`
DownMbps int `json:"down_mbps,omitempty"`
Obfs string `json:"obfs,omitempty"`
Users []HysteriaUser `json:"users,omitempty"`
ReceiveWindowConn uint64 `json:"recv_window_conn,omitempty"`
ReceiveWindowClient uint64 `json:"recv_window_client,omitempty"`
MaxConnClient int `json:"max_conn_client,omitempty"`
DisableMTUDiscovery bool `json:"disable_mtu_discovery,omitempty"`
InboundTLSOptionsContainer
}
type HysteriaOutboundOptions ¶
type HysteriaOutboundOptions struct {
DialerOptions
ServerOptions
Up string `json:"up,omitempty"`
UpMbps int `json:"up_mbps,omitempty"`
Down string `json:"down,omitempty"`
DownMbps int `json:"down_mbps,omitempty"`
Obfs string `json:"obfs,omitempty"`
Auth []byte `json:"auth,omitempty"`
AuthString string `json:"auth_str,omitempty"`
ReceiveWindowConn uint64 `json:"recv_window_conn,omitempty"`
ReceiveWindow uint64 `json:"recv_window,omitempty"`
DisableMTUDiscovery bool `json:"disable_mtu_discovery,omitempty"`
Network NetworkList `json:"network,omitempty"`
OutboundTLSOptionsContainer
}
type HysteriaUser ¶
type Inbound ¶
type Inbound _Inbound
func (Inbound) MarshalJSON ¶
func (*Inbound) RawOptions ¶
func (*Inbound) UnmarshalJSON ¶
type InboundACMEOptions ¶
type InboundACMEOptions struct {
Domain Listable[string] `json:"domain,omitempty"`
DataDirectory string `json:"data_directory,omitempty"`
DefaultServerName string `json:"default_server_name,omitempty"`
Email string `json:"email,omitempty"`
Provider string `json:"provider,omitempty"`
DisableHTTPChallenge bool `json:"disable_http_challenge,omitempty"`
DisableTLSALPNChallenge bool `json:"disable_tls_alpn_challenge,omitempty"`
AlternativeHTTPPort uint16 `json:"alternative_http_port,omitempty"`
AlternativeTLSPort uint16 `json:"alternative_tls_port,omitempty"`
ExternalAccount *ACMEExternalAccountOptions `json:"external_account,omitempty"`
DNS01Challenge *ACMEDNS01ChallengeOptions `json:"dns01_challenge,omitempty"`
}
type InboundECHOptions ¶
type InboundECHOptions struct {
Enabled bool `json:"enabled,omitempty"`
PQSignatureSchemesEnabled bool `json:"pq_signature_schemes_enabled,omitempty"`
DynamicRecordSizingDisabled bool `json:"dynamic_record_sizing_disabled,omitempty"`
Key Listable[string] `json:"key,omitempty"`
KeyPath string `json:"key_path,omitempty"`
}
type InboundMultiplexOptions ¶
type InboundMultiplexOptions struct {
Enabled bool `json:"enabled,omitempty"`
Padding bool `json:"padding,omitempty"`
Brutal *BrutalOptions `json:"brutal,omitempty"`
}
type InboundOptions ¶
type InboundOptions struct {
SniffEnabled bool `json:"sniff,omitempty"`
SniffOverrideDestination bool `json:"sniff_override_destination,omitempty"`
SniffTimeout Duration `json:"sniff_timeout,omitempty"`
DomainStrategy DomainStrategy `json:"domain_strategy,omitempty"`
UDPDisableDomainUnmapping bool `json:"udp_disable_domain_unmapping,omitempty"`
}
type InboundRealityHandshakeOptions ¶
type InboundRealityHandshakeOptions struct {
ServerOptions
DialerOptions
}
type InboundRealityOptions ¶
type InboundRealityOptions struct {
Enabled bool `json:"enabled,omitempty"`
Handshake InboundRealityHandshakeOptions `json:"handshake,omitempty"`
PrivateKey string `json:"private_key,omitempty"`
ShortID Listable[string] `json:"short_id,omitempty"`
MaxTimeDifference Duration `json:"max_time_difference,omitempty"`
}
type InboundTLSOptions ¶
type InboundTLSOptions struct {
Enabled bool `json:"enabled,omitempty"`
ServerName string `json:"server_name,omitempty"`
Insecure bool `json:"insecure,omitempty"`
ALPN Listable[string] `json:"alpn,omitempty"`
MinVersion string `json:"min_version,omitempty"`
MaxVersion string `json:"max_version,omitempty"`
CipherSuites Listable[string] `json:"cipher_suites,omitempty"`
Certificate Listable[string] `json:"certificate,omitempty"`
CertificatePath string `json:"certificate_path,omitempty"`
Key Listable[string] `json:"key,omitempty"`
KeyPath string `json:"key_path,omitempty"`
ACME *InboundACMEOptions `json:"acme,omitempty"`
ECH *InboundECHOptions `json:"ech,omitempty"`
Reality *InboundRealityOptions `json:"reality,omitempty"`
}
type InboundTLSOptionsContainer ¶
type InboundTLSOptionsContainer struct {
TLS *InboundTLSOptions `json:"tls,omitempty"`
}
func (*InboundTLSOptionsContainer) ReplaceInboundTLSOptions ¶
func (o *InboundTLSOptionsContainer) ReplaceInboundTLSOptions(options *InboundTLSOptions)
func (*InboundTLSOptionsContainer) TakeInboundTLSOptions ¶
func (o *InboundTLSOptionsContainer) TakeInboundTLSOptions() *InboundTLSOptions
type InboundTLSOptionsWrapper ¶
type InboundTLSOptionsWrapper interface {
TakeInboundTLSOptions() *InboundTLSOptions
ReplaceInboundTLSOptions(options *InboundTLSOptions)
}
type IntRange ¶
func Parse2IntRange ¶
func (IntRange) UniformRand ¶
UniformRand generate a uniform random number given the range
type Listable ¶
type Listable[T any] []T
func (Listable[T]) MarshalJSON ¶
func (*Listable[T]) UnmarshalJSON ¶
type ListenAddress ¶
func NewListenAddress ¶
func NewListenAddress(addr netip.Addr) *ListenAddress
func (*ListenAddress) Build ¶
func (a *ListenAddress) Build() netip.Addr
func (ListenAddress) MarshalJSON ¶
func (a ListenAddress) MarshalJSON() ([]byte, error)
func (*ListenAddress) UnmarshalJSON ¶
func (a *ListenAddress) UnmarshalJSON(content []byte) error
type ListenOptions ¶
type ListenOptions struct {
Listen *ListenAddress `json:"listen,omitempty"`
ListenPort uint16 `json:"listen_port,omitempty"`
TCPFastOpen bool `json:"tcp_fast_open,omitempty"`
TCPMultiPath bool `json:"tcp_multi_path,omitempty"`
UDPFragment *bool `json:"udp_fragment,omitempty"`
UDPFragmentDefault bool `json:"-"`
UDPTimeout UDPTimeoutCompat `json:"udp_timeout,omitempty"`
ProxyProtocol bool `json:"proxy_protocol,omitempty"`
ProxyProtocolAcceptNoHeader bool `json:"proxy_protocol_accept_no_header,omitempty"`
Detour string `json:"detour,omitempty"`
InboundOptions
}
func (*ListenOptions) ReplaceListenOptions ¶
func (o *ListenOptions) ReplaceListenOptions(options ListenOptions)
func (*ListenOptions) TakeListenOptions ¶
func (o *ListenOptions) TakeListenOptions() ListenOptions
type ListenOptionsWrapper ¶
type ListenOptionsWrapper interface {
TakeListenOptions() ListenOptions
ReplaceListenOptions(options ListenOptions)
}
type LocalRuleSet ¶
type LocalRuleSet struct {
Path string `json:"path,omitempty"`
}
type LogOptions ¶
type LogicalDNSRule ¶
type LogicalDNSRule struct {
Mode string `json:"mode"`
Rules []DNSRule `json:"rules,omitempty"`
Invert bool `json:"invert,omitempty"`
Server string `json:"server,omitempty"`
DisableCache bool `json:"disable_cache,omitempty"`
RewriteTTL *uint32 `json:"rewrite_ttl,omitempty"`
ClientSubnet *AddrPrefix `json:"client_subnet,omitempty"`
}
func (LogicalDNSRule) IsValid ¶
func (r LogicalDNSRule) IsValid() bool
type LogicalHeadlessRule ¶
type LogicalHeadlessRule struct {
Mode string `json:"mode"`
Rules []HeadlessRule `json:"rules,omitempty"`
Invert bool `json:"invert,omitempty"`
}
func (LogicalHeadlessRule) IsValid ¶
func (r LogicalHeadlessRule) IsValid() bool
type LogicalRule ¶
type LogicalRule struct {
Mode string `json:"mode"`
Rules []Rule `json:"rules,omitempty"`
Invert bool `json:"invert,omitempty"`
Outbound string `json:"outbound,omitempty"`
}
func (LogicalRule) IsValid ¶
func (r LogicalRule) IsValid() bool
type MemoryBytes ¶
type MemoryBytes uint64
func (MemoryBytes) MarshalJSON ¶
func (l MemoryBytes) MarshalJSON() ([]byte, error)
func (*MemoryBytes) UnmarshalJSON ¶
func (l *MemoryBytes) UnmarshalJSON(bytes []byte) error
type NTPOptions ¶
type NTPOptions struct {
Enabled bool `json:"enabled,omitempty"`
Interval Duration `json:"interval,omitempty"`
WriteToSystem bool `json:"write_to_system,omitempty"`
ServerOptions
DialerOptions
}
type NaiveInboundOptions ¶
type NaiveInboundOptions struct {
ListenOptions
Users []auth.User `json:"users,omitempty"`
Network NetworkList `json:"network,omitempty"`
InboundTLSOptionsContainer
}
type NetworkList ¶
type NetworkList string
func (NetworkList) Build ¶
func (v NetworkList) Build() []string
func (*NetworkList) UnmarshalJSON ¶
func (v *NetworkList) UnmarshalJSON(content []byte) error
type OnDemandOptions ¶
type OnDemandOptions struct {
Enabled bool `json:"enabled,omitempty"`
Rules []OnDemandRule `json:"rules,omitempty"`
}
type OnDemandRule ¶
type OnDemandRule struct {
Action *OnDemandRuleAction `json:"action,omitempty"`
DNSSearchDomainMatch Listable[string] `json:"dns_search_domain_match,omitempty"`
DNSServerAddressMatch Listable[string] `json:"dns_server_address_match,omitempty"`
InterfaceTypeMatch *OnDemandRuleInterfaceType `json:"interface_type_match,omitempty"`
SSIDMatch Listable[string] `json:"ssid_match,omitempty"`
ProbeURL string `json:"probe_url,omitempty"`
}
type OnDemandRuleAction ¶
type OnDemandRuleAction int
func (*OnDemandRuleAction) MarshalJSON ¶
func (r *OnDemandRuleAction) MarshalJSON() ([]byte, error)
func (*OnDemandRuleAction) UnmarshalJSON ¶
func (r *OnDemandRuleAction) UnmarshalJSON(bytes []byte) error
type OnDemandRuleInterfaceType ¶
type OnDemandRuleInterfaceType int
func (*OnDemandRuleInterfaceType) MarshalJSON ¶
func (r *OnDemandRuleInterfaceType) MarshalJSON() ([]byte, error)
func (*OnDemandRuleInterfaceType) UnmarshalJSON ¶
func (r *OnDemandRuleInterfaceType) UnmarshalJSON(bytes []byte) error
type Outbound ¶
type Outbound _Outbound
func (*Outbound) MarshalJSON ¶
func (*Outbound) RawOptions ¶
func (*Outbound) UnmarshalJSON ¶
type OutboundECHOptions ¶
type OutboundECHOptions struct {
Enabled bool `json:"enabled,omitempty"`
PQSignatureSchemesEnabled bool `json:"pq_signature_schemes_enabled,omitempty"`
DynamicRecordSizingDisabled bool `json:"dynamic_record_sizing_disabled,omitempty"`
Config Listable[string] `json:"config,omitempty"`
ConfigPath string `json:"config_path,omitempty"`
}
type OutboundMultiplexOptions ¶
type OutboundMultiplexOptions struct {
Enabled bool `json:"enabled,omitempty"`
Protocol string `json:"protocol,omitempty"`
MaxConnections int `json:"max_connections,omitempty"`
MinStreams int `json:"min_streams,omitempty"`
MaxStreams int `json:"max_streams,omitempty"`
Padding bool `json:"padding,omitempty"`
Brutal *BrutalOptions `json:"brutal,omitempty"`
}
type OutboundRealityOptions ¶
type OutboundTLSOptions ¶
type OutboundTLSOptions struct {
Enabled bool `json:"enabled,omitempty"`
DisableSNI bool `json:"disable_sni,omitempty"`
ServerName string `json:"server_name,omitempty"`
Insecure bool `json:"insecure,omitempty"`
ALPN Listable[string] `json:"alpn,omitempty"`
MinVersion string `json:"min_version,omitempty"`
MaxVersion string `json:"max_version,omitempty"`
CipherSuites Listable[string] `json:"cipher_suites,omitempty"`
Certificate Listable[string] `json:"certificate,omitempty"`
CertificatePath string `json:"certificate_path,omitempty"`
ECH *OutboundECHOptions `json:"ech,omitempty"`
UTLS *OutboundUTLSOptions `json:"utls,omitempty"`
Reality *OutboundRealityOptions `json:"reality,omitempty"`
TLSTricks *TLSTricksOptions `json:"tls_tricks,omitempty"`
}
type OutboundTLSOptionsContainer ¶
type OutboundTLSOptionsContainer struct {
TLS *OutboundTLSOptions `json:"tls,omitempty"`
}
func (*OutboundTLSOptionsContainer) ReplaceOutboundTLSOptions ¶
func (o *OutboundTLSOptionsContainer) ReplaceOutboundTLSOptions(options *OutboundTLSOptions)
func (*OutboundTLSOptionsContainer) TakeOutboundTLSOptions ¶
func (o *OutboundTLSOptionsContainer) TakeOutboundTLSOptions() *OutboundTLSOptions
type OutboundTLSOptionsWrapper ¶
type OutboundTLSOptionsWrapper interface {
TakeOutboundTLSOptions() *OutboundTLSOptions
ReplaceOutboundTLSOptions(options *OutboundTLSOptions)
}
type OutboundUTLSOptions ¶
type PlainRuleSet ¶
type PlainRuleSet struct {
Rules []HeadlessRule `json:"rules,omitempty"`
}
type PlainRuleSetCompat ¶
type PlainRuleSetCompat _PlainRuleSetCompat
func (PlainRuleSetCompat) MarshalJSON ¶
func (r PlainRuleSetCompat) MarshalJSON() ([]byte, error)
func (*PlainRuleSetCompat) UnmarshalJSON ¶
func (r *PlainRuleSetCompat) UnmarshalJSON(bytes []byte) error
func (PlainRuleSetCompat) Upgrade ¶
func (r PlainRuleSetCompat) Upgrade() (PlainRuleSet, error)
type RedirectInboundOptions ¶
type RedirectInboundOptions struct {
ListenOptions
}
type RemoteRuleSet ¶
type RouteOptions ¶
type RouteOptions struct {
GeoIP *GeoIPOptions `json:"geoip,omitempty"`
Geosite *GeositeOptions `json:"geosite,omitempty"`
Rules []Rule `json:"rules,omitempty"`
RuleSet []RuleSet `json:"rule_set,omitempty"`
Final string `json:"final,omitempty"`
FindProcess bool `json:"find_process,omitempty"`
AutoDetectInterface bool `json:"auto_detect_interface,omitempty"`
OverrideAndroidVPN bool `json:"override_android_vpn,omitempty"`
DefaultInterface string `json:"default_interface,omitempty"`
DefaultMark uint32 `json:"default_mark,omitempty"`
}
type SSHOutboundOptions ¶
type SSHOutboundOptions struct {
DialerOptions
ServerOptions
User string `json:"user,omitempty"`
Password string `json:"password,omitempty"`
PrivateKey Listable[string] `json:"private_key,omitempty"`
PrivateKeyPath string `json:"private_key_path,omitempty"`
PrivateKeyPassphrase string `json:"private_key_passphrase,omitempty"`
HostKey Listable[string] `json:"host_key,omitempty"`
HostKeyAlgorithms Listable[string] `json:"host_key_algorithms,omitempty"`
ClientVersion string `json:"client_version,omitempty"`
}
type SelectorOutboundOptions ¶
type ServerOptions ¶
func (ServerOptions) Build ¶
func (o ServerOptions) Build() M.Socksaddr
func (*ServerOptions) ReplaceServerOptions ¶
func (o *ServerOptions) ReplaceServerOptions(options ServerOptions)
func (*ServerOptions) TakeServerOptions ¶
func (o *ServerOptions) TakeServerOptions() ServerOptions
type ServerOptionsWrapper ¶
type ServerOptionsWrapper interface {
TakeServerOptions() ServerOptions
ReplaceServerOptions(options ServerOptions)
}
type ShadowTLSHandshakeOptions ¶
type ShadowTLSHandshakeOptions struct {
ServerOptions
DialerOptions
}
type ShadowTLSInboundOptions ¶
type ShadowTLSInboundOptions struct {
ListenOptions
Version int `json:"version,omitempty"`
Password string `json:"password,omitempty"`
Users []ShadowTLSUser `json:"users,omitempty"`
Handshake ShadowTLSHandshakeOptions `json:"handshake,omitempty"`
HandshakeForServerName map[string]ShadowTLSHandshakeOptions `json:"handshake_for_server_name,omitempty"`
StrictMode bool `json:"strict_mode,omitempty"`
}
type ShadowTLSOutboundOptions ¶
type ShadowTLSOutboundOptions struct {
DialerOptions
ServerOptions
Version int `json:"version,omitempty"`
Password string `json:"password,omitempty"`
OutboundTLSOptionsContainer
}
type ShadowTLSUser ¶
type ShadowsocksDestination ¶
type ShadowsocksDestination struct {
Name string `json:"name"`
Password string `json:"password"`
ServerOptions
}
type ShadowsocksInboundOptions ¶
type ShadowsocksInboundOptions struct {
ListenOptions
Network NetworkList `json:"network,omitempty"`
Method string `json:"method"`
Password string `json:"password,omitempty"`
Users []ShadowsocksUser `json:"users,omitempty"`
Destinations []ShadowsocksDestination `json:"destinations,omitempty"`
Multiplex *InboundMultiplexOptions `json:"multiplex,omitempty"`
}
type ShadowsocksOutboundOptions ¶
type ShadowsocksOutboundOptions struct {
DialerOptions
ServerOptions
Method string `json:"method"`
Password string `json:"password"`
Plugin string `json:"plugin,omitempty"`
PluginOptions string `json:"plugin_opts,omitempty"`
Network NetworkList `json:"network,omitempty"`
UDPOverTCP *UDPOverTCPOptions `json:"udp_over_tcp,omitempty"`
Multiplex *OutboundMultiplexOptions `json:"multiplex,omitempty"`
}
type ShadowsocksROutboundOptions ¶
type ShadowsocksROutboundOptions struct {
DialerOptions
ServerOptions
Method string `json:"method"`
Password string `json:"password"`
Obfs string `json:"obfs,omitempty"`
ObfsParam string `json:"obfs_param,omitempty"`
Protocol string `json:"protocol,omitempty"`
ProtocolParam string `json:"protocol_param,omitempty"`
Network NetworkList `json:"network,omitempty"`
}
type ShadowsocksUser ¶
type SocksInboundOptions ¶
type SocksInboundOptions struct {
ListenOptions
Users []auth.User `json:"users,omitempty"`
}
type SocksOutboundOptions ¶
type SocksOutboundOptions struct {
DialerOptions
ServerOptions
Version string `json:"version,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Network NetworkList `json:"network,omitempty"`
UDPOverTCP *UDPOverTCPOptions `json:"udp_over_tcp,omitempty"`
}
type TLSTricksOptions ¶
type TProxyInboundOptions ¶
type TProxyInboundOptions struct {
ListenOptions
Network NetworkList `json:"network,omitempty"`
}
type TUICInboundOptions ¶
type TUICInboundOptions struct {
ListenOptions
Users []TUICUser `json:"users,omitempty"`
CongestionControl string `json:"congestion_control,omitempty"`
AuthTimeout Duration `json:"auth_timeout,omitempty"`
ZeroRTTHandshake bool `json:"zero_rtt_handshake,omitempty"`
Heartbeat Duration `json:"heartbeat,omitempty"`
InboundTLSOptionsContainer
}
type TUICOutboundOptions ¶
type TUICOutboundOptions struct {
DialerOptions
ServerOptions
UUID string `json:"uuid,omitempty"`
Password string `json:"password,omitempty"`
CongestionControl string `json:"congestion_control,omitempty"`
UDPRelayMode string `json:"udp_relay_mode,omitempty"`
UDPOverStream bool `json:"udp_over_stream,omitempty"`
ZeroRTTHandshake bool `json:"zero_rtt_handshake,omitempty"`
Heartbeat Duration `json:"heartbeat,omitempty"`
Network NetworkList `json:"network,omitempty"`
OutboundTLSOptionsContainer
}
type TorOutboundOptions ¶
type TrojanInboundOptions ¶
type TrojanInboundOptions struct {
ListenOptions
Users []TrojanUser `json:"users,omitempty"`
InboundTLSOptionsContainer
Fallback *ServerOptions `json:"fallback,omitempty"`
FallbackForALPN map[string]*ServerOptions `json:"fallback_for_alpn,omitempty"`
Multiplex *InboundMultiplexOptions `json:"multiplex,omitempty"`
Transport *V2RayTransportOptions `json:"transport,omitempty"`
}
type TrojanOutboundOptions ¶
type TrojanOutboundOptions struct {
DialerOptions
ServerOptions
Password string `json:"password"`
Network NetworkList `json:"network,omitempty"`
OutboundTLSOptionsContainer
Multiplex *OutboundMultiplexOptions `json:"multiplex,omitempty"`
Transport *V2RayTransportOptions `json:"transport,omitempty"`
}
type TrojanUser ¶
type TunInboundOptions ¶
type TunInboundOptions struct {
InterfaceName string `json:"interface_name,omitempty"`
MTU uint32 `json:"mtu,omitempty"`
GSO bool `json:"gso,omitempty"`
Address Listable[netip.Prefix] `json:"address,omitempty"`
AutoRoute bool `json:"auto_route,omitempty"`
IPRoute2TableIndex int `json:"iproute2_table_index,omitempty"`
IPRoute2RuleIndex int `json:"iproute2_rule_index,omitempty"`
AutoRedirect bool `json:"auto_redirect,omitempty"`
AutoRedirectInputMark FwMark `json:"auto_redirect_input_mark,omitempty"`
AutoRedirectOutputMark FwMark `json:"auto_redirect_output_mark,omitempty"`
StrictRoute bool `json:"strict_route,omitempty"`
RouteAddress Listable[netip.Prefix] `json:"route_address,omitempty"`
RouteAddressSet Listable[string] `json:"route_address_set,omitempty"`
RouteExcludeAddress Listable[netip.Prefix] `json:"route_exclude_address,omitempty"`
RouteExcludeAddressSet Listable[string] `json:"route_exclude_address_set,omitempty"`
IncludeInterface Listable[string] `json:"include_interface,omitempty"`
ExcludeInterface Listable[string] `json:"exclude_interface,omitempty"`
IncludeUID Listable[uint32] `json:"include_uid,omitempty"`
IncludeUIDRange Listable[string] `json:"include_uid_range,omitempty"`
ExcludeUID Listable[uint32] `json:"exclude_uid,omitempty"`
ExcludeUIDRange Listable[string] `json:"exclude_uid_range,omitempty"`
IncludeAndroidUser Listable[int] `json:"include_android_user,omitempty"`
IncludePackage Listable[string] `json:"include_package,omitempty"`
ExcludePackage Listable[string] `json:"exclude_package,omitempty"`
EndpointIndependentNat bool `json:"endpoint_independent_nat,omitempty"`
UDPTimeout UDPTimeoutCompat `json:"udp_timeout,omitempty"`
Stack string `json:"stack,omitempty"`
Platform *TunPlatformOptions `json:"platform,omitempty"`
InboundOptions
// Deprecated: merged to Address
Inet4Address Listable[netip.Prefix] `json:"inet4_address,omitempty"`
// Deprecated: merged to Address
Inet6Address Listable[netip.Prefix] `json:"inet6_address,omitempty"`
// Deprecated: merged to RouteAddress
Inet4RouteAddress Listable[netip.Prefix] `json:"inet4_route_address,omitempty"`
// Deprecated: merged to RouteAddress
Inet6RouteAddress Listable[netip.Prefix] `json:"inet6_route_address,omitempty"`
// Deprecated: merged to RouteExcludeAddress
Inet4RouteExcludeAddress Listable[netip.Prefix] `json:"inet4_route_exclude_address,omitempty"`
// Deprecated: merged to RouteExcludeAddress
Inet6RouteExcludeAddress Listable[netip.Prefix] `json:"inet6_route_exclude_address,omitempty"`
}
type TunPlatformOptions ¶
type TunPlatformOptions struct {
HTTPProxy *HTTPProxyOptions `json:"http_proxy,omitempty"`
}
type UDPOverTCPOptions ¶
type UDPOverTCPOptions _UDPOverTCPOptions
func (UDPOverTCPOptions) MarshalJSON ¶
func (o UDPOverTCPOptions) MarshalJSON() ([]byte, error)
func (*UDPOverTCPOptions) UnmarshalJSON ¶
func (o *UDPOverTCPOptions) UnmarshalJSON(bytes []byte) error
type UDPTimeoutCompat ¶
type UDPTimeoutCompat Duration
func (UDPTimeoutCompat) MarshalJSON ¶
func (c UDPTimeoutCompat) MarshalJSON() ([]byte, error)
func (*UDPTimeoutCompat) UnmarshalJSON ¶
func (c *UDPTimeoutCompat) UnmarshalJSON(data []byte) error
type URLTestOutboundOptions ¶
type URLTestOutboundOptions struct {
Outbounds []string `json:"outbounds"`
URL string `json:"url,omitempty"`
Interval Duration `json:"interval,omitempty"`
Tolerance uint16 `json:"tolerance,omitempty"`
IdleTimeout Duration `json:"idle_timeout,omitempty"`
InterruptExistConnections bool `json:"interrupt_exist_connections,omitempty"`
}
type V2RayAPIOptions ¶
type V2RayAPIOptions struct {
Listen string `json:"listen,omitempty"`
Stats *V2RayStatsServiceOptions `json:"stats,omitempty"`
}
type V2RayGRPCOptions ¶
type V2RayHTTPOptions ¶
type V2RayHTTPOptions struct {
Host Listable[string] `json:"host,omitempty"`
Path string `json:"path,omitempty"`
Method string `json:"method,omitempty"`
Headers HTTPHeader `json:"headers,omitempty"`
IdleTimeout Duration `json:"idle_timeout,omitempty"`
PingTimeout Duration `json:"ping_timeout,omitempty"`
}
type V2RayHTTPUpgradeOptions ¶
type V2RayHTTPUpgradeOptions struct {
Host string `json:"host,omitempty"`
Path string `json:"path,omitempty"`
Headers HTTPHeader `json:"headers,omitempty"`
}
type V2RayQUICOptions ¶
type V2RayQUICOptions struct{}
type V2RayTransportOptions ¶
type V2RayTransportOptions _V2RayTransportOptions
func (V2RayTransportOptions) MarshalJSON ¶
func (o V2RayTransportOptions) MarshalJSON() ([]byte, error)
func (*V2RayTransportOptions) UnmarshalJSON ¶
func (o *V2RayTransportOptions) UnmarshalJSON(bytes []byte) error
type V2RayWebsocketOptions ¶
type V2RayWebsocketOptions struct {
Path string `json:"path,omitempty"`
Headers HTTPHeader `json:"headers,omitempty"`
MaxEarlyData uint32 `json:"max_early_data,omitempty"`
EarlyDataHeaderName string `json:"early_data_header_name,omitempty"`
}
type VLESSInboundOptions ¶
type VLESSInboundOptions struct {
ListenOptions
Users []VLESSUser `json:"users,omitempty"`
InboundTLSOptionsContainer
Multiplex *InboundMultiplexOptions `json:"multiplex,omitempty"`
Transport *V2RayTransportOptions `json:"transport,omitempty"`
}
type VLESSOutboundOptions ¶
type VLESSOutboundOptions struct {
DialerOptions
ServerOptions
UUID string `json:"uuid"`
Flow string `json:"flow,omitempty"`
Network NetworkList `json:"network,omitempty"`
OutboundTLSOptionsContainer
Multiplex *OutboundMultiplexOptions `json:"multiplex,omitempty"`
Transport *V2RayTransportOptions `json:"transport,omitempty"`
PacketEncoding *string `json:"packet_encoding,omitempty"`
}
type VMessInboundOptions ¶
type VMessInboundOptions struct {
ListenOptions
Users []VMessUser `json:"users,omitempty"`
InboundTLSOptionsContainer
Multiplex *InboundMultiplexOptions `json:"multiplex,omitempty"`
Transport *V2RayTransportOptions `json:"transport,omitempty"`
}
type VMessOutboundOptions ¶
type VMessOutboundOptions struct {
DialerOptions
ServerOptions
UUID string `json:"uuid"`
Security string `json:"security"`
AlterId int `json:"alter_id,omitempty"`
GlobalPadding bool `json:"global_padding,omitempty"`
AuthenticatedLength bool `json:"authenticated_length,omitempty"`
Network NetworkList `json:"network,omitempty"`
OutboundTLSOptionsContainer
PacketEncoding string `json:"packet_encoding,omitempty"`
Multiplex *OutboundMultiplexOptions `json:"multiplex,omitempty"`
Transport *V2RayTransportOptions `json:"transport,omitempty"`
}
type WireGuardOutboundOptions ¶
type WireGuardOutboundOptions struct {
DialerOptions
SystemInterface bool `json:"system_interface,omitempty"`
GSO bool `json:"gso,omitempty"`
InterfaceName string `json:"interface_name,omitempty"`
LocalAddress Listable[netip.Prefix] `json:"local_address"`
PrivateKey string `json:"private_key"`
Peers []WireGuardPeer `json:"peers,omitempty"`
ServerOptions
PeerPublicKey string `json:"peer_public_key"`
Reserved []uint8 `json:"reserved,omitempty"`
Workers int `json:"workers,omitempty"`
MTU uint32 `json:"mtu,omitempty"`
Network NetworkList `json:"network,omitempty"`
}
type WireGuardPeer ¶
type WireGuardPeer struct {
ServerOptions
PublicKey string `json:"public_key,omitempty"`
AllowedIPs Listable[string] `json:"allowed_ips,omitempty"`
Reserved []uint8 `json:"reserved,omitempty"`
}
Source Files
¶
- config.go
- debug.go
- direct.go
- dns.go
- experimental.go
- group.go
- hysteria.go
- hysteria2.go
- inbound.go
- json.go
- multiplex.go
- naive.go
- ntp.go
- outbound.go
- platform.go
- range.go
- redir.go
- route.go
- rule.go
- rule_dns.go
- rule_set.go
- shadowsocks.go
- shadowsocksr.go
- shadowtls.go
- simple.go
- ssh.go
- time_unit.go
- tls.go
- tls_acme.go
- tls_tricks.go
- tor.go
- trojan.go
- tuic.go
- tun.go
- tun_platform.go
- types.go
- udp_over_tcp.go
- v2ray.go
- v2ray_transport.go
- vless.go
- vmess.go
- wireguard.go
Click to show internal directories.
Click to hide internal directories.