config

package
v0.0.0-...-45a9176 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListenPrefix

type ListenPrefix netip.Prefix

func StringSliceToListenPrefixSlice

func StringSliceToListenPrefixSlice(ss []string) ([]ListenPrefix, error)

func (ListenPrefix) Build

func (p ListenPrefix) Build() netip.Prefix

func (ListenPrefix) MarshalJSON

func (p ListenPrefix) MarshalJSON() ([]byte, error)

func (ListenPrefix) MarshalYAML

func (p ListenPrefix) MarshalYAML() (interface{}, error)

func (*ListenPrefix) UnmarshalJSON

func (p *ListenPrefix) UnmarshalJSON(bytes []byte) error

func (*ListenPrefix) UnmarshalYAML

func (p *ListenPrefix) UnmarshalYAML(node *yaml.Node) error

type ShadowsocksServer

type ShadowsocksServer struct {
	Enable   bool
	Listen   string
	Password string
	Cipher   string
}

func (ShadowsocksServer) String

func (t ShadowsocksServer) String() string

type TuicServer

type TuicServer struct {
	Enable                bool     `yaml:"enable" json:"enable"`
	Listen                string   `yaml:"listen" json:"listen"`
	Token                 []string `yaml:"token" json:"token"`
	Certificate           string   `yaml:"certificate" json:"certificate"`
	PrivateKey            string   `yaml:"private-key" json:"private-key"`
	CongestionController  string   `yaml:"congestion-controller" json:"congestion-controller,omitempty"`
	MaxIdleTime           int      `yaml:"max-idle-time" json:"max-idle-time,omitempty"`
	AuthenticationTimeout int      `yaml:"authentication-timeout" json:"authentication-timeout,omitempty"`
	ALPN                  []string `yaml:"alpn" json:"alpn,omitempty"`
	MaxUdpRelayPacketSize int      `yaml:"max-udp-relay-packet-size" json:"max-udp-relay-packet-size,omitempty"`
}

func (TuicServer) String

func (t TuicServer) String() string

type Tun

type Tun struct {
	Enable              bool       `yaml:"enable" json:"enable"`
	Device              string     `yaml:"device" json:"device"`
	Stack               C.TUNStack `yaml:"stack" json:"stack"`
	DNSHijack           []string   `yaml:"dns-hijack" json:"dns-hijack"`
	AutoRoute           bool       `yaml:"auto-route" json:"auto-route"`
	AutoDetectInterface bool       `yaml:"auto-detect-interface" json:"auto-detect-interface"`
	RedirectToTun       []string   `yaml:"-" json:"-"`

	MTU                    uint32         `yaml:"mtu" json:"mtu,omitempty"`
	Inet4Address           []ListenPrefix `yaml:"inet4-address" json:"inet4-address,omitempty"`
	Inet6Address           []ListenPrefix `yaml:"inet6-address" json:"inet6-address,omitempty"`
	StrictRoute            bool           `yaml:"strict-route" json:"strict-route,omitempty"`
	Inet4RouteAddress      []ListenPrefix `yaml:"inet4-route-address" json:"inet4-route-address,omitempty"`
	Inet6RouteAddress      []ListenPrefix `yaml:"inet6-route-address" json:"inet6-route-address,omitempty"`
	IncludeUID             []uint32       `yaml:"include-uid" json:"include-uid,omitempty"`
	IncludeUIDRange        []string       `yaml:"include-uid-range" json:"include-uid-range,omitempty"`
	ExcludeUID             []uint32       `yaml:"exclude-uid" json:"exclude-uid,omitempty"`
	ExcludeUIDRange        []string       `yaml:"exclude-uid-range" json:"exclude-uid-range,omitempty"`
	IncludeAndroidUser     []int          `yaml:"include-android-user" json:"include-android-user,omitempty"`
	IncludePackage         []string       `yaml:"include-package" json:"include-package,omitempty"`
	ExcludePackage         []string       `yaml:"exclude-package" json:"exclude-package,omitempty"`
	EndpointIndependentNat bool           `yaml:"endpoint-independent-nat" json:"endpoint-independent-nat,omitempty"`
	UDPTimeout             int64          `yaml:"udp-timeout" json:"udp-timeout,omitempty"`
}

type Tunnel

type Tunnel tunnel

func (*Tunnel) UnmarshalYAML

func (t *Tunnel) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements yaml.Unmarshaler

type VmessServer

type VmessServer struct {
	Enable bool
	Listen string
	Users  []VmessUser
}

func (VmessServer) String

func (t VmessServer) String() string

type VmessUser

type VmessUser struct {
	Username string
	UUID     string
	AlterID  int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL