server

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: GPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GlobalConfig = &Config{
		LogFile: "logs/shuttles.log",
	}
	Passwords   = make(map[string]*Password)
	WHPasswords = make(map[string]*Password)
)

config var

Functions

This section is empty.

Types

type Addr

type Addr struct {
	Addr string `yaml:"addr"`
	Cert string `yaml:"cert"`
	Key  string `yaml:"key"`
}

type Config

type Config struct {
	Addrs     []Addr `yaml:"addrs"`
	LogFile   string `yaml:"logFile"`
	Gateway   Gateway
	Instances []Instance
	Trojan    Trojan
	Wormhole  Wormhole
}

Config struct

func Load

func Load(path string) (config *Config, err error)

Load load config

type Filter

type Filter struct {
	Name     string
	Params   interface{}
	Open     bool
	Loggable bool
}

Filter struct

type Gateway

type Gateway struct {
	Routes []Route
}

Gateway struct

type Instance

type Instance struct {
	Group        string
	URL          string `yaml:"url"`
	Weight       int
	RegisterTime int64
	Tags         []string
}

Instance struct

type Password

type Password struct {
	Raw  string
	Hash string
}

Password struct

type Route

type Route struct {
	ID       string `yaml:"id"`
	Order    int
	Host     string
	Path     string
	Filters  []Filter
	Loggable bool
}

Route struct

func (Route) GetFilter

func (r Route) GetFilter(name string) (Filter, error)

GetFilter route get filter

type Trojan

type Trojan struct {
	Passwords []string
}

Trojan struct

type Wormhole

type Wormhole struct {
	Passwords []string
}

Wormhole struct

Jump to

Keyboard shortcuts

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