mirror of
https://github.com/samuelhbne/server-xray.git
synced 2025-12-16 20:07:06 +03:00
Remove default email to avoid id conflict
This commit is contained in:
@@ -74,8 +74,8 @@ do
|
||||
if [ -z "${uopt[0]}" ]; then
|
||||
echo "Incorrect user format: ${xu}"
|
||||
echo "Correct user format: user=<uid>[:level:email]"
|
||||
echo "Like: user=myid:0:nobody@g.cn"
|
||||
echo "Like: user=myid::nobody@g.cn"
|
||||
echo "Like: user=myid:0:me@g.cn"
|
||||
echo "Like: user=myid::me@g.cn"
|
||||
echo "Like: user=myid:0"
|
||||
echo "Like: user=myid"
|
||||
exit 1
|
||||
@@ -83,9 +83,6 @@ do
|
||||
if [ -z "${uopt[1]}" ]; then
|
||||
uopt[1]=0
|
||||
fi
|
||||
if [ -z "${uopt[2]}" ]; then
|
||||
uopt[2]="nobody@g.cn"
|
||||
fi
|
||||
cat $XCONF |jq --arg port "${port}" --arg uid "${uopt[0]}" --arg level "${uopt[1]}" --arg email "${uopt[2]}" \
|
||||
'( .inbounds[] | select(.port == ($port|tonumber)) | .settings.clients ) += [ {"id":$uid, "level":($level|tonumber), "email":$email} ] ' \
|
||||
|sponge $XCONF
|
||||
|
||||
Reference in New Issue
Block a user