Versions in this module Expand all Collapse all v0 v0.0.1 Sep 18, 2023 Changes in this version + func DNSQueryTypeToString(queryType uint16) string + func MarshallObjects(objects ...any) ([]byte, error) + func MergeObjects(objects ...any) (*badjson.JSONObject, error) + func ToMap(v any) (*badjson.JSONObject, error) + func UnmarshallExcluded(inputContent []byte, parentObject any, object any) error + type ACMEExternalAccountOptions struct + KeyID string + MACKey string + type BytesLength int64 + func (l *BytesLength) UnmarshalJSON(bytes []byte) error + func (l BytesLength) MarshalJSON() ([]byte, error) + type ClashAPIOptions struct + CacheFile string + CacheID string + DefaultMode string + ExternalController string + ExternalUI string + ExternalUIDownloadDetour string + ExternalUIDownloadURL string + ModeList []string + Secret string + StoreFakeIP bool + StoreMode bool + StoreSelected bool + type DNSClientOptions struct + DisableCache bool + DisableExpire bool + IndependentCache bool + Strategy DomainStrategy + type DNSFakeIPOptions struct + Enabled bool + Inet4Range *ListenPrefix + Inet6Range *ListenPrefix + type DNSOptions struct + FakeIP *DNSFakeIPOptions + Final string + ReverseMapping bool + Rules []DNSRule + Servers []DNSServerOptions + type DNSQueryType uint16 + func (t *DNSQueryType) UnmarshalJSON(bytes []byte) error + func (t DNSQueryType) MarshalJSON() ([]byte, error) + type DNSRule _DNSRule + func (r *DNSRule) UnmarshalJSON(bytes []byte) error + func (r DNSRule) MarshalJSON() ([]byte, error) + type DNSServerOptions struct + Address string + AddressFallbackDelay Duration + AddressResolver string + AddressStrategy DomainStrategy + Detour string + Strategy DomainStrategy + Tag string + type DebugOptions struct + GCPercent *int + Listen string + MaxStack *int + MaxThreads *int + MemoryLimit BytesLength + OOMKiller *bool + PanicOnFault *bool + TraceBack string + type DefaultDNSRule struct + AuthUser Listable[string] + ClashMode string + DisableCache bool + Domain Listable[string] + DomainKeyword Listable[string] + DomainRegex Listable[string] + DomainSuffix Listable[string] + Geosite Listable[string] + IPVersion int + Inbound Listable[string] + Invert bool + Network Listable[string] + Outbound Listable[string] + PackageName Listable[string] + Port Listable[uint16] + PortRange Listable[string] + ProcessName Listable[string] + ProcessPath Listable[string] + Protocol Listable[string] + QueryType Listable[DNSQueryType] + RewriteTTL *uint32 + Server string + SourceGeoIP Listable[string] + SourceIPCIDR Listable[string] + SourcePort Listable[uint16] + SourcePortRange Listable[string] + User Listable[string] + UserID Listable[int32] + func (r DefaultDNSRule) IsValid() bool + type DefaultRule struct + AuthUser Listable[string] + ClashMode string + Domain Listable[string] + DomainKeyword Listable[string] + DomainRegex Listable[string] + DomainSuffix Listable[string] + GeoIP Listable[string] + Geosite Listable[string] + IPCIDR Listable[string] + IPVersion int + Inbound Listable[string] + Invert bool + Network Listable[string] + Outbound string + PackageName Listable[string] + Port Listable[uint16] + PortRange Listable[string] + ProcessName Listable[string] + ProcessPath Listable[string] + Protocol Listable[string] + SourceGeoIP Listable[string] + SourceIPCIDR Listable[string] + SourcePort Listable[uint16] + SourcePortRange Listable[string] + User Listable[string] + UserID Listable[int32] + func (r DefaultRule) IsValid() bool + type DialerOptions struct + BindInterface string + ConnectTimeout Duration + Detour string + DomainStrategy DomainStrategy + FallbackDelay Duration + Inet4BindAddress *ListenAddress + Inet6BindAddress *ListenAddress + ProtectPath string + ReuseAddr bool + RoutingMark int + TCPFastOpen bool + TCPMultiPath bool + UDPFragment *bool + UDPFragmentDefault bool + type DirectInboundOptions struct + Network NetworkList + OverrideAddress string + OverridePort uint16 + type DirectOutboundOptions struct + OverrideAddress string + OverridePort uint16 + ProxyProtocol uint8 + type DomainStrategy dns.DomainStrategy + func (s *DomainStrategy) UnmarshalJSON(bytes []byte) error + func (s DomainStrategy) MarshalJSON() ([]byte, error) + type Duration time.Duration + func (d *Duration) UnmarshalJSON(bytes []byte) error + func (d Duration) MarshalJSON() ([]byte, error) + type ExperimentalOptions struct + ClashAPI *ClashAPIOptions + Debug *DebugOptions + V2RayAPI *V2RayAPIOptions + type GeoIPOptions struct + DownloadDetour string + DownloadURL string + Path string + type GeositeOptions struct + DownloadDetour string + DownloadURL string + Path string + type HTTPMixedInboundOptions struct + SetSystemProxy bool + TLS *InboundTLSOptions + Users []auth.User + type HTTPOutboundOptions struct + Headers map[string]Listable[string] + Password string + Path string + TLS *OutboundTLSOptions + Username string + type HTTPProxyOptions struct + Enabled bool + type HysteriaInboundOptions struct + DisableMTUDiscovery bool + Down string + DownMbps int + MaxConnClient int + Obfs string + ReceiveWindowClient uint64 + ReceiveWindowConn uint64 + TLS *InboundTLSOptions + Up string + UpMbps int + Users []HysteriaUser + type HysteriaOutboundOptions struct + Auth []byte + AuthString string + DisableMTUDiscovery bool + Down string + DownMbps int + Network NetworkList + Obfs string + ReceiveWindow uint64 + ReceiveWindowConn uint64 + TLS *OutboundTLSOptions + Up string + UpMbps int + type HysteriaUser struct + Auth []byte + AuthString string + Name string + type Inbound _Inbound + func (h *Inbound) UnmarshalJSON(bytes []byte) error + func (h Inbound) MarshalJSON() ([]byte, error) + type InboundACMEOptions struct + AlternativeHTTPPort uint16 + AlternativeTLSPort uint16 + DataDirectory string + DefaultServerName string + DisableHTTPChallenge bool + DisableTLSALPNChallenge bool + Domain Listable[string] + Email string + ExternalAccount *ACMEExternalAccountOptions + Provider string + type InboundOptions struct + DomainStrategy DomainStrategy + SniffEnabled bool + SniffOverrideDestination bool + SniffTimeout Duration + type InboundRealityHandshakeOptions struct + type InboundRealityOptions struct + Enabled bool + Handshake InboundRealityHandshakeOptions + MaxTimeDifference Duration + PrivateKey string + ShortID Listable[string] + type InboundTLSOptions struct + ACME *InboundACMEOptions + ALPN Listable[string] + Certificate string + CertificatePath string + CipherSuites Listable[string] + Enabled bool + Insecure bool + Key string + KeyPath string + MaxVersion string + MinVersion string + Reality *InboundRealityOptions + ServerName string + type Listable []T + func (l *Listable[T]) UnmarshalJSON(content []byte) error + func (l Listable[T]) MarshalJSON() ([]byte, error) + type ListenAddress netip.Addr + func NewListenAddress(addr netip.Addr) *ListenAddress + func (a *ListenAddress) Build() netip.Addr + func (a *ListenAddress) UnmarshalJSON(content []byte) error + func (a ListenAddress) MarshalJSON() ([]byte, error) + type ListenOptions struct + Detour string + Listen *ListenAddress + ListenPort uint16 + ProxyProtocol bool + ProxyProtocolAcceptNoHeader bool + TCPFastOpen bool + TCPMultiPath bool + UDPFragment *bool + UDPFragmentDefault bool + UDPTimeout int64 + type ListenPrefix netip.Prefix + func (p *ListenPrefix) UnmarshalJSON(bytes []byte) error + func (p ListenPrefix) Build() netip.Prefix + func (p ListenPrefix) MarshalJSON() ([]byte, error) + type LogOptions struct + DisableColor bool + Disabled bool + Level string + Output string + Timestamp bool + type LogicalDNSRule struct + DisableCache bool + Invert bool + Mode string + RewriteTTL *uint32 + Rules []DefaultDNSRule + Server string + func (r LogicalDNSRule) IsValid() bool + type LogicalRule struct + Invert bool + Mode string + Outbound string + Rules []DefaultRule + func (r LogicalRule) IsValid() bool + type MultiplexOptions struct + Enabled bool + MaxConnections int + MaxStreams int + MinStreams int + Padding bool + Protocol string + type NTPOptions struct + Enabled bool + Interval Duration + WriteToSystem bool + type NaiveInboundOptions struct + Network NetworkList + TLS *InboundTLSOptions + Users []auth.User + type NetworkList string + func (v *NetworkList) UnmarshalJSON(content []byte) error + func (v NetworkList) Build() []string + type OnDemandOptions struct + Enabled bool + Rules []OnDemandRule + type OnDemandRule struct + Action *OnDemandRuleAction + DNSSearchDomainMatch Listable[string] + DNSServerAddressMatch Listable[string] + InterfaceTypeMatch *OnDemandRuleInterfaceType + ProbeURL string + SSIDMatch Listable[string] + type OnDemandRuleAction int + func (r *OnDemandRuleAction) MarshalJSON() ([]byte, error) + func (r *OnDemandRuleAction) UnmarshalJSON(bytes []byte) error + type OnDemandRuleInterfaceType int + func (r *OnDemandRuleInterfaceType) MarshalJSON() ([]byte, error) + func (r *OnDemandRuleInterfaceType) UnmarshalJSON(bytes []byte) error + type Options _Options + func (o *Options) UnmarshalJSON(content []byte) error + type Outbound _Outbound + func (h *Outbound) UnmarshalJSON(bytes []byte) error + func (h Outbound) MarshalJSON() ([]byte, error) + type OutboundECHOptions struct + Config string + DynamicRecordSizingDisabled bool + Enabled bool + PQSignatureSchemesEnabled bool + type OutboundRealityOptions struct + Enabled bool + PublicKey string + ShortID string + type OutboundTLSOptions struct + ALPN Listable[string] + Certificate string + CertificatePath string + CipherSuites Listable[string] + DisableSNI bool + ECH *OutboundECHOptions + Enabled bool + Insecure bool + MaxVersion string + MinVersion string + Reality *OutboundRealityOptions + ServerName string + UTLS *OutboundUTLSOptions + type OutboundUTLSOptions struct + Enabled bool + Fingerprint string + type RedirectInboundOptions struct + type RouteOptions struct + AutoDetectInterface bool + DefaultInterface string + DefaultMark int + Final string + FindProcess bool + GeoIP *GeoIPOptions + Geosite *GeositeOptions + OverrideAndroidVPN bool + Rules []Rule + type Rule _Rule + func (r *Rule) UnmarshalJSON(bytes []byte) error + func (r Rule) MarshalJSON() ([]byte, error) + type SSHOutboundOptions struct + ClientVersion string + HostKey Listable[string] + HostKeyAlgorithms Listable[string] + Password string + PrivateKey string + PrivateKeyPassphrase string + PrivateKeyPath string + User string + type SelectorOutboundOptions struct + Default string + Outbounds []string + type ServerOptions struct + Server string + ServerPort uint16 + func (o ServerOptions) Build() M.Socksaddr + type ShadowTLSHandshakeOptions struct + type ShadowTLSInboundOptions struct + Handshake ShadowTLSHandshakeOptions + HandshakeForServerName map[string]ShadowTLSHandshakeOptions + Password string + StrictMode bool + Users []ShadowTLSUser + Version int + type ShadowTLSOutboundOptions struct + Password string + TLS *OutboundTLSOptions + Version int + type ShadowTLSUser struct + Name string + Password string + type ShadowsocksDestination struct + Name string + Password string + type ShadowsocksInboundOptions struct + Destinations []ShadowsocksDestination + Method string + Network NetworkList + Password string + Users []ShadowsocksUser + type ShadowsocksOutboundOptions struct + Method string + MultiplexOptions *MultiplexOptions + Network NetworkList + Password string + Plugin string + PluginOptions string + UDPOverTCPOptions *UDPOverTCPOptions + type ShadowsocksROutboundOptions struct + Method string + Network NetworkList + Obfs string + ObfsParam string + Password string + Protocol string + ProtocolParam string + type ShadowsocksUser struct + Name string + Password string + type SocksInboundOptions struct + Users []auth.User + type SocksOutboundOptions struct + Network NetworkList + Password string + UDPOverTCPOptions *UDPOverTCPOptions + Username string + Version string + type TProxyInboundOptions struct + Network NetworkList + type TUICInboundOptions struct + AuthTimeout Duration + CongestionControl string + Heartbeat Duration + TLS *InboundTLSOptions + Users []TUICUser + ZeroRTTHandshake bool + type TUICOutboundOptions struct + CongestionControl string + Heartbeat Duration + Network NetworkList + Password string + TLS *OutboundTLSOptions + UDPOverStream bool + UDPRelayMode string + UUID string + ZeroRTTHandshake bool + type TUICUser struct + Name string + Password string + UUID string + type TorOutboundOptions struct + DataDirectory string + ExecutablePath string + ExtraArgs []string + Options map[string]string + type TrojanInboundOptions struct + Fallback *ServerOptions + FallbackForALPN map[string]*ServerOptions + TLS *InboundTLSOptions + Transport *V2RayTransportOptions + Users []TrojanUser + type TrojanOutboundOptions struct + Multiplex *MultiplexOptions + Network NetworkList + Password string + TLS *OutboundTLSOptions + Transport *V2RayTransportOptions + type TrojanUser struct + Name string + Password string + type TunInboundOptions struct + AutoRoute bool + EndpointIndependentNat bool + ExcludeInterface Listable[string] + ExcludePackage Listable[string] + ExcludeUID Listable[uint32] + ExcludeUIDRange Listable[string] + IncludeAndroidUser Listable[int] + IncludeInterface Listable[string] + IncludePackage Listable[string] + IncludeUID Listable[uint32] + IncludeUIDRange Listable[string] + Inet4Address Listable[ListenPrefix] + Inet4RouteAddress Listable[ListenPrefix] + Inet6Address Listable[ListenPrefix] + Inet6RouteAddress Listable[ListenPrefix] + InterfaceName string + MTU uint32 + Platform *TunPlatformOptions + Stack string + StrictRoute bool + UDPTimeout int64 + type TunPlatformOptions struct + HTTPProxy *HTTPProxyOptions + type UDPOverTCPOptions _UDPOverTCPOptions + func (o *UDPOverTCPOptions) UnmarshalJSON(bytes []byte) error + func (o UDPOverTCPOptions) MarshalJSON() ([]byte, error) + type URLTestOutboundOptions struct + Interval Duration + Outbounds []string + Tolerance uint16 + URL string + type V2RayAPIOptions struct + Listen string + Stats *V2RayStatsServiceOptions + type V2RayGRPCOptions struct + ForceLite bool + IdleTimeout Duration + PermitWithoutStream bool + PingTimeout Duration + ServiceName string + type V2RayHTTPOptions struct + Headers map[string]Listable[string] + Host Listable[string] + IdleTimeout Duration + Method string + Path string + PingTimeout Duration + type V2RayQUICOptions struct + type V2RayStatsServiceOptions struct + Enabled bool + Inbounds []string + Outbounds []string + Users []string + type V2RayTransportOptions _V2RayTransportOptions + func (o *V2RayTransportOptions) UnmarshalJSON(bytes []byte) error + func (o V2RayTransportOptions) MarshalJSON() ([]byte, error) + type V2RayWebsocketOptions struct + EarlyDataHeaderName string + Headers map[string]Listable[string] + MaxEarlyData uint32 + Path string + type VLESSInboundOptions struct + TLS *InboundTLSOptions + Transport *V2RayTransportOptions + Users []VLESSUser + type VLESSOutboundOptions struct + Flow string + Multiplex *MultiplexOptions + Network NetworkList + PacketEncoding *string + TLS *OutboundTLSOptions + Transport *V2RayTransportOptions + UUID string + type VLESSUser struct + Flow string + Name string + UUID string + type VMessInboundOptions struct + TLS *InboundTLSOptions + Transport *V2RayTransportOptions + Users []VMessUser + type VMessOutboundOptions struct + AlterId int + AuthenticatedLength bool + GlobalPadding bool + Multiplex *MultiplexOptions + Network NetworkList + PacketEncoding string + Security string + TLS *OutboundTLSOptions + Transport *V2RayTransportOptions + UUID string + type VMessUser struct + AlterId int + Name string + UUID string + type WireGuardOutboundOptions struct + InterfaceName string + LocalAddress Listable[ListenPrefix] + MTU uint32 + Network NetworkList + PeerPublicKey string + Peers []WireGuardPeer + PreSharedKey string + PrivateKey string + Reserved []uint8 + SystemInterface bool + Workers int + type WireGuardPeer struct + AllowedIPs Listable[string] + PreSharedKey string + PublicKey string + Reserved []uint8