From 4789e40574409c6f480710ad2e1938353d676df4 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 5 Dec 2025 15:42:20 +0800 Subject: [PATCH] up --- plugins/openresty/resty/obf/util.lua | 5 +++++ web/misc/nginx/rewrite/obf.conf | 2 ++ 2 files changed, 7 insertions(+) diff --git a/plugins/openresty/resty/obf/util.lua b/plugins/openresty/resty/obf/util.lua index 216d06f42..33bbc71a1 100644 --- a/plugins/openresty/resty/obf/util.lua +++ b/plugins/openresty/resty/obf/util.lua @@ -15,6 +15,11 @@ function _M.to_uint8array(content) if len == 0 then return "new Uint8Array([])" end + local mode = ngx.var.obf_uint8_b64 + if mode == "true" or (not mode and len >= 4096) then + local b64 = ngx.encode_base64(content) + return "(function(){var s='"..b64.."';var b=atob(s);var a=new Uint8Array(b.length);for(var i=0;i