feat: add lan_snat_direct option for non-transparent-bridge user (#14)

This commit is contained in:
mzz
2023-02-11 13:34:12 +08:00
committed by GitHub
parent 61014019de
commit 4145a79559
8 changed files with 151 additions and 241 deletions

View File

@ -273,11 +273,12 @@ func FuzzyDecode(to interface{}, val string) bool {
}
v.SetUint(i)
case reflect.Bool:
if val == "true" || val == "1" {
switch strings.ToLower(val) {
case "true", "1", "y", "yes":
v.SetBool(true)
} else if val == "false" || val == "0" {
case "false", "0", "n", "no":
v.SetBool(false)
} else {
default:
return false
}
case reflect.String: