This commit is contained in:
dami
2025-12-05 15:42:20 +08:00
parent 39109ae40b
commit 4789e40574
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -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<b.length;i++){a[i]=b.charCodeAt(i)};return a;})()"
end
local arr = {}
for i = 1, len do
arr[i] = byte(content, i)
+2
View File
@@ -8,6 +8,8 @@ location / {
set $close_close 'true'; # 关闭 关闭开关
set $debug_close 'true'; # 关闭 开始调试
set $obf_timeout 100; # 缓存时间
set $obf_uint8_b64 'true'; # uint8_b64
set $obf_skip_large 262144; #
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
break;