config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Groups []Group `json:"groups"`
}

func BuildConfig

func BuildConfig(path string) (*Config, error)

func (*Config) Build

func (c *Config) Build() ([]*dispatcher.Dispatcher, error)

type Group

type Group struct {
	Listen      string   `json:"listen"`
	Port        int      `json:"port"`
	TCPFastOpen bool     `json:"tcpFastOpen"`
	AntiReplay  bool     `json:"antiReplay"`
	Servers     []Server `json:"servers"`
}

func (*Group) AsAccounts

func (g *Group) AsAccounts() ([]*vmess.Account, error)

func (*Group) Build

func (g *Group) Build() (*dispatcher.Dispatcher, error)

type Server

type Server struct {
	Target      string   `json:"target"`
	ID          []string `json:"id"`
	TCPFastOpen bool     `json:"tcpFastOpen"`
}

func (*Server) AsAccounts

func (s *Server) AsAccounts() ([]*vmess.Account, error)

Jump to

Keyboard shortcuts

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