Unify environment var readers
This commit is contained in:
1 parent
e241e5bda6
commit
4f05e0ac2b
9 files changed
+32
-23
No files matched your search
@@ -41,7 +41,7 @@ func init() {
|
||||
return h, nil
|
||||
}))
|
||||
const defaultFlagValue = "NOT_DEFINED_AT_ALL"
|
||||
value := platform.NewEnvFlag("xray.buf.splice").GetValue(func() string { return defaultFlagValue })
|
||||
value := platform.NewEnvFlag(platform.UseFreedomSplice).GetValue(func() string { return defaultFlagValue })
|
||||
switch value {
|
||||
case "auto", "enable":
|
||||
useSplice = true
|
||||
|
||||
@@ -245,7 +245,7 @@ func init() {
|
||||
|
||||
const defaultFlagValue = "NOT_DEFINED_AT_ALL"
|
||||
|
||||
paddingValue := platform.NewEnvFlag("xray.vmess.padding").GetValue(func() string { return defaultFlagValue })
|
||||
paddingValue := platform.NewEnvFlag(platform.UseVmessPadding).GetValue(func() string { return defaultFlagValue })
|
||||
if paddingValue != defaultFlagValue {
|
||||
enablePadding = true
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user