Documentation
¶
Index ¶
- func MarshalRawConfig(cfg *RawConfig) ([]byte, error)
- type ConnBreakStrategy
- type DNSConfig
- type Experimental
- type FallbackFilter
- type GRPCOptions
- type HTTP2Options
- type HTTPOptions
- type HealthCheck
- type Hosts
- type Inbound
- type InboundType
- type ObfsOptions
- type PluginOptions
- type Profile
- type Proxies
- type Proxy
- type ProxyGroup
- type ProxyGroups
- type ProxyProvider
- type ProxyProviders
- type RawConfig
- type RealityOptions
- type RuleProvider
- type RuleProviders
- type Script
- type Tunnel
- type WSOptions
- type WireGuardPeerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalRawConfig ¶
Types ¶
type ConnBreakStrategy ¶
type DNSConfig ¶
type DNSConfig struct { Enable *bool `yaml:"enable,omitempty"` IPV6 *bool `yaml:"ipv6,omitempty"` PreferH3 *bool `yaml:"prefer-h3,omitempty"` Listen *string `yaml:"listen,omitempty"` DefaultNameserver []string `yaml:"default-nameserver,omitempty"` EnhancedMode *string `yaml:"enhanced-mode,omitempty"` FakeIPRange *string `yaml:"fake-ip-range,omitempty"` UseHosts *bool `yaml:"use-hosts,omitempty"` SearchDomains []string `yaml:"search-domains,omitempty"` FakeIPFilter []string `yaml:"fake-ip-filter,omitempty"` Nameserver []string `yaml:"nameserver,omitempty"` Fallback []string `yaml:"fallback,omitempty"` FallbackFilter FallbackFilter `yaml:"fallback-filter,omitempty"` NameserverPolicy *map[string]string `yaml:"nameserver-policy,omitempty"` }
type Experimental ¶
type FallbackFilter ¶
type GRPCOptions ¶
type GRPCOptions struct {
GrpcServiceName *string `yaml:"grpc-service-name,omitempty"`
}
type HTTP2Options ¶
type HTTPOptions ¶
type HealthCheck ¶
type InboundType ¶
type InboundType string
const ( InboundTypeSocks InboundType = "socks" InboundTypeRedir InboundType = "redir" InboundTypeTproxy InboundType = "tproxy" InboundTypeHTTP InboundType = "http" InboundTypeMixed InboundType = "mixed" )
type ObfsOptions ¶
type PluginOptions ¶
type PluginOptions struct { MaxEarlyData *int `yaml:"max-early-data,omitempty"` Mode *string `yaml:"mode,omitempty"` Host *string `yaml:"host,omitempty"` Path *string `yaml:"path,omitempty"` EarlyDataHeader *string `yaml:"early-data-header-name,omitempty"` ServerName *string `yaml:"servername,omitempty"` TLS *bool `yaml:"tls,omitempty"` SkipCertVerify *bool `yaml:"skip-cert-verify,omitempty"` Mux *bool `yaml:"mux,omitempty"` Headers *map[string]string `yaml:"headers,omitempty"` WSOptions WSOptions `yaml:"ws-opts,omitempty"` H2Options HTTP2Options `yaml:"h2-opts,omitempty"` HTTPOptions HTTPOptions `yaml:"http-opts,omitempty"` GRPCOptions GRPCOptions `yaml:"grpc-opts,omitempty"` ObfsOptions ObfsOptions `yaml:"obfs-opts,omitempty"` }
type Proxy ¶
type Proxy struct { Name string `yaml:"name"` Type string `yam:"type"` Server string `yaml:"server"` // basic TFO *bool `yaml:"tfo,omitempty"` MPTCP *bool `yaml:"mptcp,omitempty"` Interface *string `yaml:"interface-name,omitempty"` RoutingMark *int `yaml:"routing-mark,omitempty"` IPVersion *string `yaml:"ip-version,omitempty"` DialerProxy *string `yaml:"dialer-proxy,omitempty"` // Port int `yaml:"port"` // Password string `yaml:"password"` Cipher *string `yaml:"cipher,omitempty"` UDP *bool `yaml:"udp,omitempty"` Plugin *string `yaml:"plugin,omitempty"` PluginOpts PluginOptions `yaml:"plugin-opts,omitempty"` UDPOverTCP *bool `yaml:"udp-over-tcp,omitempty"` UDPOverTCPVersion *int `yaml:"udp-over-tcp-version,omitempty"` ClientFingerprint *string `yaml:"client-fingerprint,omitempty"` // ssr // Name string `yaml:"name"` // Server string `yaml:"server"` // Port int `yaml:"port"` // Password string `yaml:"password"` // Cipher string `yaml:"cipher"` // Obfs string `yaml:"obfs"` ObfsParam *string `yaml:"obfs-param,omitempty"` // Protocol string `yaml:"protocol"` ProtocolParam *string `yaml:"protocol-param,omitempty"` // sock5 // Name string `yaml:"name"` // Server string `yaml:"server"` // Port int `yaml:"port"` UserName *string `yaml:"username,omitempty"` Password *string `yaml:"password,omitempty"` TLS *bool `yaml:"tls,omitempty"` // UDP bool `yaml:"udp,omitempty"` SkipCertVerify *bool `yaml:"skip-cert-verify,omitempty"` Fingerprint *string `yaml:"fingerprint,omitempty"` // http // Name string `yaml:"name"` // Server string `yaml:"server"` // Port int `yaml:"port"` // UserName string `yaml:"username,omitempty"` // Password string `yaml:"password,omitempty"` // TLS bool `yaml:"tls,omitempty"` SNI *string `yaml:"sni,omitempty"` // SkipCertVerify bool `yaml:"skip-cert-verify,omitempty"` // Fingerprint string `yaml:"fingerprint,omitempty"` Headers *map[string]string `yaml:"headers,omitempty"` // vmess // Name string `yaml:"name"` // Server string `yaml:"server"` // Port int `yaml:"port"` UUID *string `yaml:"uuid,omitempty"` AlterID *int `yaml:"alterId,omitempty"` // Cipher string `yaml:"cipher"` // UDP bool `yaml:"udp,omitempty"` Network *string `yaml:"network,omitempty"` // TLS bool `yaml:"tls,omitempty"` ALPN []string `yaml:"alpn,omitempty"` // SkipCertVerify bool `yaml:"skip-cert-verify,omitempty"` // Fingerprint string `yaml:"fingerprint,omitempty"` ServerName *string `yaml:"servername,omitempty"` RealityOpts RealityOptions `yaml:"reality-opts,omitempty"` HTTPOpts HTTPOptions `yaml:"http-opts,omitempty"` HTTP2Opts HTTP2Options `yaml:"h2-opts,omitempty"` GrpcOpts GRPCOptions `yaml:"grpc-opts,omitempty"` WSOpts WSOptions `yaml:"ws-opts,omitempty"` PacketAddr *bool `yaml:"packet-addr,omitempty"` XUDP *bool `yaml:"xudp,omitempty"` PacketEncoding *string `yaml:"packet-encoding,omitempty"` GlobalPadding *bool `yaml:"global-padding,omitempty"` AuthenticatedLength *bool `yaml:"authenticated-length,omitempty"` // vless // Name string `yaml:"name"` // Server string `yaml:"server"` // Port int `yaml:"port"` // UUID string `yaml:"uuid"` Flow *string `yaml:"flow,omitempty"` // TLS bool `yaml:"tls,omitempty"` // ALPN []string `yaml:"alpn,omitempty"` // UDP bool `yaml:"udp,omitempty"` // PacketAddr bool `yaml:"packet-addr,omitempty"` // XUDP bool `yaml:"xudp,omitempty"` // PacketEncoding string `yaml:"packet-encoding,omitempty"` // Network string `yaml:"network,omitempty"` // RealityOpts RealityOptions `yaml:"reality-opts,omitempty"` // HTTPOpts HTTPOptions `yaml:"http-opts,omitempty"` // HTTP2Opts HTTP2Options `yaml:"h2-opts,omitempty"` // GrpcOpts GrpcOptions `yaml:"grpc-opts,omitempty"` // WSOpts WSOptions `yaml:"ws-opts,omitempty"` WSPath *string `yaml:"ws-path,omitempty"` WSHeaders *map[string]string `yaml:"ws-headers,omitempty"` //snell // Name string `yaml:"name"` // Server string `yaml:"server"` // Port int `yaml:"port"` Psk *string `yaml:"psk,omitempty"` // UDP bool `yaml:"udp,omitempty"` Version *int `yaml:"version,omitempty"` ObfsOpts ObfsOptions `yaml:"obfs-opts,omitempty"` // hysteria // Name string `yaml:"name"` // Server string `yaml:"server"` Port *int `yaml:"port,omitempty"` Ports *string `yaml:"ports,omitempty"` Protocol *string `yaml:"protocol,omitempty"` ObfsProtocol string `yaml:"obfs-protocol,omitempty"` // compatible with Stash Up *string `yaml:"up,omitempty"` UpSpeed int `yaml:"up-speed,omitempty"` // compatible with Stash Down *string `yaml:"down,omitempty"` DownSpeed int `yaml:"down-speed,omitempty"` // compatible with Stash Auth *string `yaml:"auth,omitempty"` AuthString *string `yaml:"auth-str,omitempty"` Obfs *string `yaml:"obfs,omitempty"` // SNI string `yaml:"sni,omitempty"` // SkipCertVerify bool `yaml:"skip-cert-verify,omitempty"` // Fingerprint string `yaml:"fingerprint,omitempty"` // ALPN []string `yaml:"alpn,omitempty"` CustomCA *string `yaml:"ca,omitempty"` CustomCAString *string `yaml:"ca-str,omitempty"` ReceiveWindowConn *int `yaml:"recv-window-conn,omitempty"` ReceiveWindow *int `yaml:"recv-window,omitempty"` DisableMTUDiscovery *bool `yaml:"disable-mtu-discovery,omitempty"` FastOpen *bool `yaml:"fast-open,omitempty"` HopInterval *int `yaml:"hop-interval,omitempty"` // wireguard // Server string `yaml:"server"` // Port int `yaml:"port"` Ip *string `yaml:"ip,omitempty"` Ipv6 *string `yaml:"ipv6,omitempty"` PublicKey *string `yaml:"public-key,omitempty"` Reserved []uint8 `yaml:"reserved,omitempty"` AllowedIPs []string `yaml:"allowed-ips,omitempty"` // Name string `yaml:"name"` PrivateKey *string `yaml:"private-key,omitempty"` Workers *int `yaml:"workers,omitempty"` MTU *int `yaml:"mtu,omitempty"` // UDP bool `yaml:"udp,omitempty"` PersistentKeepalive *int `yaml:"persistent-keepalive,omitempty"` Peers []WireGuardPeerOption `yaml:"peers,omitempty"` RemoteDnsResolve *bool `yaml:"remote-dns-resolve,omitempty"` Dns []string `yaml:"dns,omitempty"` // tuic // Name string `yaml:"name"` // Server string `yaml:"server"` // Port int `yaml:"port"` Token *string `yaml:"token,omitempty"` // UUID string `yaml:"uuid,omitempty"` // Password string `yaml:"password,omitempty"` // Ip string `yaml:"ip,omitempty"` HeartbeatInterval *int `yaml:"heartbeat-interval,omitempty"` // ALPN []string `yaml:"alpn,omitempty"` ReduceRtt *bool `yaml:"reduce-rtt,omitempty"` RequestTimeout *int `yaml:"request-timeout,omitempty"` UdpRelayMode *string `yaml:"udp-relay-mode,omitempty"` CongestionController *string `yaml:"congestion-controller,omitempty"` DisableSni *bool `yaml:"disable-sni,omitempty"` MaxUdpRelayPacketSize *int `yaml:"max-udp-relay-packet-size,omitempty"` // FastOpen bool `yaml:"fast-open,omitempty"` MaxOpenStreams *int `yaml:"max-open-streams,omitempty"` CWND *int `yaml:"cwnd,omitempty"` // SkipCertVerify bool `yaml:"skip-cert-verify,omitempty"` // Fingerprint string `yaml:"fingerprint,omitempty"` // CustomCA string `yaml:"ca,omitempty"` // CustomCAString string `yaml:"ca-str,omitempty"` // ReceiveWindowConn int `yaml:"recv-window-conn,omitempty"` // ReceiveWindow int `yaml:"recv-window,omitempty"` // DisableMTUDiscovery bool `yaml:"disable-mtu-discovery,omitempty"` MaxDatagramFrameSize *int `yaml:"max-datagram-frame-size,omitempty"` UDPOverStream *bool `yaml:"udp-over-stream,omitempty"` UDPOverStreamVersion *int `yaml:"udp-over-stream-version,omitempty"` }
type ProxyGroup ¶
type ProxyGroup struct { Name string `yaml:"name"` Type string `yaml:"type"` Proxies []string `yaml:"proxies,omitempty"` Use []string `yaml:"use,omitempty"` URL *string `yaml:"url,omitempty"` Tolerance *int `yaml:"tolerance,omitempty"` Strategy *string `yaml:"strategy,omitempty"` Interval *int `yaml:"interval,omitempty"` Lazy *bool `yaml:"lazy,omitempty"` DisableUDP *bool `yaml:"disable-udp,omitempty"` Filter *string `yaml:"filter,omitempty"` ExcludeFilter *string `yaml:"exclude-filter,omitempty"` ExcludeType *string `yaml:"exclude-type,omitempty"` ExpectedStatus *string `yaml:"expected-status,omitempty"` // basic TFO *bool `yaml:"tfo,omitempty"` MPTCP *bool `yaml:"mptcp,omitempty"` Interface *string `yaml:"interface-name,omitempty"` RoutingMark *int `yaml:"routing-mark,omitempty"` IPVersion *string `yaml:"ip-version,omitempty"` DialerProxy *string `yaml:"dialer-proxy,omitempty"` }
type ProxyGroups ¶
type ProxyGroups struct { *ordered.Map[string, ProxyGroup] }
func (ProxyGroups) MarshalYAML ¶
func (o ProxyGroups) MarshalYAML() (interface{}, error)
func (*ProxyGroups) UnmarshalYAML ¶
func (o *ProxyGroups) UnmarshalYAML(value *yaml.Node) error
type ProxyProvider ¶
type ProxyProvider struct { Type string `yaml:"type"` Path *string `yaml:"path,omitempty"` URL *string `yaml:"url,omitempty"` Interval *int `yaml:"interval,omitempty"` Filter *string `yaml:"filter,omitempty"` ExcludeFilter *string `yaml:"exclude-filter,omitempty"` ExcludeType *string `yaml:"exclude-type,omitempty"` DialerProxy *string `yaml:"dialer-proxy,omitempty"` HealthCheck HealthCheck `yaml:"health-check,omitempty"` }
type ProxyProviders ¶
type ProxyProviders struct { *ordered.Map[string, ProxyProvider] }
func (ProxyProviders) MarshalYAML ¶
func (o ProxyProviders) MarshalYAML() (interface{}, error)
func (*ProxyProviders) UnmarshalYAML ¶
func (o *ProxyProviders) UnmarshalYAML(value *yaml.Node) error
type RawConfig ¶
type RawConfig struct { Port *int `yaml:"port,omitempty"` SocksPort *int `yaml:"socks-port,omitempty"` RedirPort *int `yaml:"redir-port,omitempty"` TproxyPort *int `yaml:"tproxy-port,omitempty"` MixedPort *int `yaml:"mixed-port,omitempty"` Authentication []string `yaml:"authentication,omitempty"` AllowLan *bool `yaml:"allow-lan,omitempty"` BindAddress *string `yaml:"bind-address,omitempty"` Mode *string `yaml:"mode,omitempty"` LogLevel *string `yaml:"log-level,omitempty"` IPV6 *bool `yaml:"ipv6,omitempty"` ExternalController *string `yaml:"external-controller,omitempty"` ExternalUI *string `yaml:"external-ui,omitempty"` Secret *string `yaml:"secret,omitempty"` InterfaceName *string `yaml:"interface-name,omitempty"` RoutingMark *int `yaml:"routing-mark,omitempty"` Hosts Hosts `yaml:"hosts,omitempty"` Profile Profile `yaml:"profile,omitempty"` DNS DNSConfig `yaml:"dns,omitempty"` Experimental Experimental `yaml:"experimental,omitempty"` CFWLatencyTimeout *int `yaml:"cfw-latency-timeout,omitempty"` CFWLatencyURL *string `yaml:"cfw-latency-url,omitempty"` CFWConnBreakStrategy ConnBreakStrategy `yaml:"cfw-conn-break-strategy,omitempty"` CFWBypass []string `yaml:"cfw-bypass,omitempty"` Proxies Proxies `yaml:"proxies,omitempty"` ProxyGroup ProxyGroups `yaml:"proxy-groups,omitempty"` ProxyProviders ProxyProviders `yaml:"proxy-providers,omitempty"` Script Script `yaml:"script,omitempty"` RuleProviders RuleProviders `yaml:"rule-providers,omitempty"` Inbounds []Inbound `yaml:"inbounds,omitempty"` Tunnels []Tunnel `yaml:"tunnels,omitempty"` Rule []string `yaml:"rules,omitempty"` }
func UnmarshalRawConfig ¶
type RealityOptions ¶
type RuleProvider ¶
type RuleProviders ¶
type RuleProviders struct { *ordered.Map[string, RuleProvider] }
func (RuleProviders) MarshalYAML ¶
func (o RuleProviders) MarshalYAML() (interface{}, error)
func (*RuleProviders) UnmarshalYAML ¶
func (o *RuleProviders) UnmarshalYAML(value *yaml.Node) error
type WireGuardPeerOption ¶
type WireGuardPeerOption struct { Server string `yaml:"server"` Port int `yaml:"port"` Ip *string `yaml:"ip,omitempty"` Ipv6 *string `yaml:"ipv6,omitempty"` PublicKey *string `yaml:"public-key,omitempty"` Reserved []uint8 `yaml:"reserved,omitempty"` AllowedIPs []string `yaml:"allowed-ips,omitempty"` }
Click to show internal directories.
Click to hide internal directories.