ss_whitelist V1.0.5

[update] 切换 openresty tag 至 alpine
[update] 适配 aarch 64,已在 Oracle ARM 上测试通过
pull/437/head
wulabing 2022-07-16 11:41:29 +08:00
parent c23b957fee
commit 6a7f248981
No known key found for this signature in database
GPG Key ID: 213391AFDF73AE00
3 changed files with 7 additions and 6 deletions

View File

@ -33,3 +33,4 @@
* 访问 IP/auth (eg: http://1.1.1.1/auth) 输入鉴权信息,添加当前 IP 地址进入白名单
* 访问 /purge 清空白名单信息
* 务必将 allow.list 的权限设置为 666 及以上
* 适配 ARM 架构机器,可以在 Oracle ARM 上使用

View File

@ -27,15 +27,15 @@ services:
- ipv6nat
openresty:
image: openresty/openresty:latest
image: openresty/openresty:alpine
ports:
- "80:80"
- "443:443"
- "7777:7777"
- "7777:7777/udp"
volumes:
- ./nginx.conf:/etc/openresty/nginx.conf
- ./allow.list:/etc/openresty/allow.list
- ./nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
- ./allow.list:/usr/local/openresty/nginx/conf/allow.list
- ./auth:/etc/openresty/auth
restart: always
networks:

View File

@ -104,7 +104,7 @@ http {
content_by_lua_block {
clientIP=ngx.var.remote_addr
headers=ngx.req.get_headers()
file = io.open("/etc/openresty/allow.list","a+")
file = io.open("/usr/local/openresty/nginx/conf/allow.list","a+")
io.input(file)
io.output(file)
for line in file:lines() do
@ -132,7 +132,7 @@ http {
auth_basic "Please enter your username and password";
auth_basic_user_file /etc/openresty/auth;
content_by_lua_block {
file = io.open("/etc/openresty/allow.list","w+")
file = io.open("/usr/local/openresty/nginx/conf/allow.list","w+")
ngx.print('{"code":200,"status":"OK","server":"openresty","info":"IP list has been cleared."}')
io.close(file)
os.execute("/usr/local/openresty/nginx/sbin/nginx -s reload")