|
@ -7,27 +7,27 @@ import ( |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
type Config struct { |
|
|
type Config struct { |
|
|
Log int `yaml:"log" json:"log"` |
|
|
Log int `yaml:"log" json:"log" toml:"log"` |
|
|
Dev string `yaml:"dev" json:"dev"` |
|
|
Dev string `yaml:"dev" json:"dev" toml:"dev"` |
|
|
Enable bool `yaml:"enable" json:"enable"` |
|
|
Enable bool `yaml:"enable" json:"enable" toml:"enable"` |
|
|
Client []string `yaml:"client" json:"client"` |
|
|
Client []string `yaml:"client" json:"client" toml:"client"` |
|
|
Option map[string]string `yaml:"option" json:"option"` |
|
|
Option map[string]string `yaml:"option" json:"option" toml:"option"` |
|
|
Route struct { |
|
|
Route struct { |
|
|
Cidr string `yaml:"cidr" json:"cidr"` |
|
|
Cidr string `yaml:"cidr" json:"cidr" toml:"cidr"` |
|
|
Option map[string]string `yaml:"option" json:"option"` |
|
|
Option map[string]string `yaml:"option" json:"option" toml:"option"` |
|
|
} `yaml:"route" json:"route"` |
|
|
} `yaml:"route" json:"route" toml:"route"` |
|
|
Prefix struct { |
|
|
Prefix struct { |
|
|
Cidr string `yaml:"cidr" json:"cidr"` |
|
|
Cidr string `yaml:"cidr" json:"cidr" toml:"cidr"` |
|
|
Option map[string]string `yaml:"option" json:"option"` |
|
|
Option map[string]string `yaml:"option" json:"option" toml:"option"` |
|
|
} `yaml:"prefix" json:"prefix"` |
|
|
} `yaml:"prefix" json:"prefix" toml:"prefix"` |
|
|
DNSSL struct { // DNS Search List
|
|
|
DNSSL struct { // DNS Search List
|
|
|
Suffix []string `yaml:"suffix" json:"suffix"` |
|
|
Suffix []string `yaml:"suffix" json:"suffix" toml:"suffix"` |
|
|
Option map[string]string `yaml:"option" json:"option"` |
|
|
Option map[string]string `yaml:"option" json:"option" toml:"option"` |
|
|
} `yaml:"dnssl" json:"dnssl"` |
|
|
} `yaml:"dnssl" json:"dnssl" toml:"dnssl"` |
|
|
RDNSS struct { // Recursive DNS Server
|
|
|
RDNSS struct { // Recursive DNS Server
|
|
|
IP []string `yaml:"ip" json:"ip"` |
|
|
IP []string `yaml:"ip" json:"ip" toml:"ip"` |
|
|
Option map[string]string `yaml:"option" json:"option"` |
|
|
Option map[string]string `yaml:"option" json:"option" toml:"option"` |
|
|
} `yaml:"rdnss" json:"rdnss"` |
|
|
} `yaml:"rdnss" json:"rdnss" toml:"rdnss"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func genSpace(num int) string { |
|
|
func genSpace(num int) string { |
|
|