mirror of https://github.com/wulabing/Xray_onekey
ss_whitelist V1.0.5
[update] 切换 openresty tag 至 alpine [update] 适配 aarch 64,已在 Oracle ARM 上测试通过pull/437/head
parent
c23b957fee
commit
6a7f248981
|
@ -33,3 +33,4 @@
|
||||||
* 访问 IP/auth (eg: http://1.1.1.1/auth) 输入鉴权信息,添加当前 IP 地址进入白名单
|
* 访问 IP/auth (eg: http://1.1.1.1/auth) 输入鉴权信息,添加当前 IP 地址进入白名单
|
||||||
* 访问 /purge 清空白名单信息
|
* 访问 /purge 清空白名单信息
|
||||||
* 务必将 allow.list 的权限设置为 666 及以上
|
* 务必将 allow.list 的权限设置为 666 及以上
|
||||||
|
* 适配 ARM 架构机器,可以在 Oracle ARM 上使用
|
|
@ -27,15 +27,15 @@ services:
|
||||||
- ipv6nat
|
- ipv6nat
|
||||||
|
|
||||||
openresty:
|
openresty:
|
||||||
image: openresty/openresty:latest
|
image: openresty/openresty:alpine
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
- "7777:7777"
|
- "7777:7777"
|
||||||
- "7777:7777/udp"
|
- "7777:7777/udp"
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/etc/openresty/nginx.conf
|
- ./nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
|
||||||
- ./allow.list:/etc/openresty/allow.list
|
- ./allow.list:/usr/local/openresty/nginx/conf/allow.list
|
||||||
- ./auth:/etc/openresty/auth
|
- ./auth:/etc/openresty/auth
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -104,7 +104,7 @@ http {
|
||||||
content_by_lua_block {
|
content_by_lua_block {
|
||||||
clientIP=ngx.var.remote_addr
|
clientIP=ngx.var.remote_addr
|
||||||
headers=ngx.req.get_headers()
|
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.input(file)
|
||||||
io.output(file)
|
io.output(file)
|
||||||
for line in file:lines() do
|
for line in file:lines() do
|
||||||
|
@ -132,7 +132,7 @@ http {
|
||||||
auth_basic "Please enter your username and password";
|
auth_basic "Please enter your username and password";
|
||||||
auth_basic_user_file /etc/openresty/auth;
|
auth_basic_user_file /etc/openresty/auth;
|
||||||
content_by_lua_block {
|
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."}')
|
ngx.print('{"code":200,"status":"OK","server":"openresty","info":"IP list has been cleared."}')
|
||||||
io.close(file)
|
io.close(file)
|
||||||
os.execute("/usr/local/openresty/nginx/sbin/nginx -s reload")
|
os.execute("/usr/local/openresty/nginx/sbin/nginx -s reload")
|
||||||
|
|
Loading…
Reference in New Issue