mirror of https://github.com/wulabing/Xray_onekey
[update] ss_whitlist 添加 通过访问 /purge 清空白名单信息
parent
8e5bbc9f4c
commit
ad3d82f270
|
@ -28,3 +28,7 @@
|
||||||
|
|
||||||
大部分代理使用场景都是在固定场所,在一定时间内有相对固定的 IP,因此在大部分情况下,通过白名单限制访问 ss 的 IP 来源方式相对可行
|
大部分代理使用场景都是在固定场所,在一定时间内有相对固定的 IP,因此在大部分情况下,通过白名单限制访问 ss 的 IP 来源方式相对可行
|
||||||
|
|
||||||
|
## 使用方法
|
||||||
|
|
||||||
|
* 访问 IP/域名 输入鉴权信息,添加当前 IP 地址进入白名单
|
||||||
|
* 访问 /purge 清空白名单信息
|
||||||
|
|
|
@ -110,5 +110,19 @@ http {
|
||||||
os.execute("/usr/local/openresty/nginx/sbin/nginx -s reload")
|
os.execute("/usr/local/openresty/nginx/sbin/nginx -s reload")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
location /purge {
|
||||||
|
auth_basic "";
|
||||||
|
auth_basic_user_file /etc/openresty/auth;
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
content_by_lua_block {
|
||||||
|
ngx.header.content_type = "text/plain;charset=UTF-8";
|
||||||
|
file = io.open("/etc/openresty/allow.list","w")
|
||||||
|
io.input(file)
|
||||||
|
io.output(file)
|
||||||
|
ngx.print("IP列表已被清空")
|
||||||
|
io.close(file)
|
||||||
|
os.execute("/usr/local/openresty/nginx/sbin/nginx -s reload")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue