disable inline lua

This commit is contained in:
Meo597
2026-10-14 10:18:40 +08:00
parent 19842ed0c2
commit 4c0f3a94c5
2 changed files with 13 additions and 5 deletions
+3
View File
@@ -8,6 +8,7 @@ import (
"time"
"github.com/xtls/xray-core/common/base64"
"github.com/xtls/xray-core/common/errors"
"github.com/xtls/xray-core/common/platform"
glua "github.com/yuin/gopher-lua"
"github.com/yuin/gopher-lua/parse"
@@ -30,6 +31,8 @@ func Compile(script string) (*Program, error) {
name := "[inline]"
privileged := false
if strings.HasPrefix(script, base64.GzipPrefix) || strings.HasPrefix(script, base64.Prefix) {
// TODO: Restore inline script support and re-enable the related tests.
return nil, errors.New("currently unavailable")
code, err = base64.Decode(script)
} else if name, err = platform.ResolveLuaFile(script); err == nil {
if code, err = os.ReadFile(name); err == nil {