Multi user Support

This commit is contained in:
paniy
2021-10-16 22:43:33 +08:00
parent f1f1dee3dd
commit f396f60b8a
4 changed files with 482 additions and 204 deletions
+17
View File
@@ -4,6 +4,23 @@
"error": "/var/log/xray/error.log",
"loglevel": "warning"
},
"stats": {},
"policy": {
"levels": {
"0": {
"handshake": 4,
"connIdle": 300,
"uplinkOnly": 2,
"downlinkOnly": 5,
"statsUserUplink": false,
"statsUserDownlink": false
}
},
"system": {
"statsInboundUplink": true,
"statsInboundDownlink": true
}
},
"inbounds": [{
"port": 10086,
"listen": "127.0.0.1",
+17
View File
@@ -4,6 +4,23 @@
"error": "/var/log/xray/error.log",
"loglevel": "warning"
},
"stats": {},
"policy": {
"levels": {
"0": {
"handshake": 4,
"connIdle": 300,
"uplinkOnly": 2,
"downlinkOnly": 5,
"statsUserUplink": false,
"statsUserDownlink": false
}
},
"system": {
"statsInboundUplink": true,
"statsInboundDownlink": true
}
},
"inbounds": [{
"port": 443,
"listen": "0.0.0.0",
+445 -201
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -7,8 +7,8 @@ idleleo_dir="/etc/idleleo"
nginx_systemd_file="/etc/systemd/system/nginx.service"
ssl_chainpath="${idleleo_dir}/cert"
xray_qr_config_file="${idleleo_dir}/info/vmess_qr.json"
host=$(grep '\"host\"' ${xray_qr_config_file} | awk -F '"' '{print $4}')
bt_nginx=$(grep '\"bt_nginx\"' ${xray_qr_config_file} | awk -F '"' '{print $4}')
host=$(jq -r '.host' ${xray_qr_config_file})
bt_nginx=$(jq -r '.bt_nginx' ${xray_qr_config_file})
[[ -f ${nginx_systemd_file} ]] && systemctl stop nginx &> /dev/null
[[ bt_nginx == "Yes" ]] && /etc/init.d/nginx stop &> /dev/null
@@ -23,4 +23,4 @@ chmod -f a+rw ${ssl_chainpath}/xray.key
chown -fR nobody:${cert_group} ${ssl_chainpath}/*
wait
[[ -f ${nginx_systemd_file} ]] && systemctl start nginx &> /dev/null
[[ bt_nginx == "Yes" ]] && /etc/init.d/nginx start &> /dev/null
[[ bt_nginx == "Yes" ]] && /etc/init.d/nginx start &> /dev/null