mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-11 12:46:19 +00:00
update install.sh
This commit is contained in:
parent
adb08a60cf
commit
50890fd19c
4 changed files with 17 additions and 15 deletions
10
README.md
10
README.md
|
@ -27,7 +27,7 @@
|
||||||
## Install & Upgrade
|
## Install & Upgrade
|
||||||
|
|
||||||
```
|
```
|
||||||
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)
|
bash <(curl -Ls https://raw.githubusercontent.com/solodecode/3x-ui/master/install.sh)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install legacy Version (we don't recommend)
|
## Install legacy Version (we don't recommend)
|
||||||
|
@ -35,7 +35,7 @@ bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.
|
||||||
To install your desired version, use following installation command. e.g., ver `v1.7.9`:
|
To install your desired version, use following installation command. e.g., ver `v1.7.9`:
|
||||||
|
|
||||||
```
|
```
|
||||||
VERSION=v1.7.9 && bash <(curl -Ls "https://raw.githubusercontent.com/mhsanaei/3x-ui/$VERSION/install.sh") $VERSION
|
VERSION=v1.7.9 && bash <(curl -Ls "https://raw.githubusercontent.com/solodecode/3x-ui/$VERSION/install.sh") $VERSION
|
||||||
```
|
```
|
||||||
|
|
||||||
## SSL Certificate
|
## SSL Certificate
|
||||||
|
@ -113,7 +113,7 @@ case "${ARCH}" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
wget https://github.com/MHSanaei/3x-ui/releases/latest/download/x-ui-linux-${XUI_ARCH}.tar.gz
|
wget https://github.com/solodecode/3x-ui/releases/latest/download/x-ui-linux-${XUI_ARCH}.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Once the compressed package is downloaded, execute the following commands to install or upgrade x-ui:
|
2. Once the compressed package is downloaded, execute the following commands to install or upgrade x-ui:
|
||||||
|
@ -161,7 +161,7 @@ systemctl restart x-ui
|
||||||
2. **Clone the Project Repository:**
|
2. **Clone the Project Repository:**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/MHSanaei/3x-ui.git
|
git clone https://github.com/solodecode/3x-ui.git
|
||||||
cd 3x-ui
|
cd 3x-ui
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ systemctl restart x-ui
|
||||||
--network=host \
|
--network=host \
|
||||||
--restart=unless-stopped \
|
--restart=unless-stopped \
|
||||||
--name 3x-ui \
|
--name 3x-ui \
|
||||||
ghcr.io/mhsanaei/3x-ui:latest
|
ghcr.io/solodecode/3x-ui:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Update to the Latest Version:**
|
4. **Update to the Latest Version:**
|
||||||
|
|
|
@ -202,13 +202,13 @@ install_x-ui() {
|
||||||
cd /usr/local/
|
cd /usr/local/
|
||||||
|
|
||||||
if [ $# == 0 ]; then
|
if [ $# == 0 ]; then
|
||||||
tag_version=$(curl -Ls "https://api.github.com/repos/MHSanaei/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
tag_version=$(curl -Ls "https://api.github.com/repos/solodecode/3x-ui/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||||
if [[ ! -n "$tag_version" ]]; then
|
if [[ ! -n "$tag_version" ]]; then
|
||||||
echo -e "${red}Failed to fetch x-ui version, it may be due to GitHub API restrictions, please try it later${plain}"
|
echo -e "${red}Failed to fetch x-ui version, it may be due to GitHub API restrictions, please try it later${plain}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo -e "Got x-ui latest version: ${tag_version}, beginning the installation..."
|
echo -e "Got x-ui latest version: ${tag_version}, beginning the installation..."
|
||||||
wget -N --no-check-certificate -O /usr/local/x-ui-linux-$(arch).tar.gz https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz
|
wget -N --no-check-certificate -O /usr/local/x-ui-linux-$(arch).tar.gz https://github.com/solodecode/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo -e "${red}Downloading x-ui failed, please be sure that your server can access GitHub ${plain}"
|
echo -e "${red}Downloading x-ui failed, please be sure that your server can access GitHub ${plain}"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -223,7 +223,7 @@ install_x-ui() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
url="https://github.com/MHSanaei/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz"
|
url="https://github.com/solodecode/3x-ui/releases/download/${tag_version}/x-ui-linux-$(arch).tar.gz"
|
||||||
echo -e "Beginning to install x-ui $1"
|
echo -e "Beginning to install x-ui $1"
|
||||||
wget -N --no-check-certificate -O /usr/local/x-ui-linux-$(arch).tar.gz ${url}
|
wget -N --no-check-certificate -O /usr/local/x-ui-linux-$(arch).tar.gz ${url}
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
|
@ -250,7 +250,7 @@ install_x-ui() {
|
||||||
|
|
||||||
chmod +x x-ui bin/xray-linux-$(arch)
|
chmod +x x-ui bin/xray-linux-$(arch)
|
||||||
cp -f x-ui.service /etc/systemd/system/
|
cp -f x-ui.service /etc/systemd/system/
|
||||||
wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/MHSanaei/3x-ui/main/x-ui.sh
|
wget --no-check-certificate -O /usr/bin/x-ui https://raw.githubusercontent.com/solodecode/3x-ui/main/x-ui.sh
|
||||||
chmod +x /usr/local/x-ui/x-ui.sh
|
chmod +x /usr/local/x-ui/x-ui.sh
|
||||||
chmod +x /usr/bin/x-ui
|
chmod +x /usr/bin/x-ui
|
||||||
config_after_install
|
config_after_install
|
||||||
|
|
|
@ -880,6 +880,8 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
|
||||||
tgUserID := callbackQuery.From.ID
|
tgUserID := callbackQuery.From.ID
|
||||||
t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.buttons.clientUsage"))
|
t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.buttons.clientUsage"))
|
||||||
t.getClientUsage(chatId, tgUserID)
|
t.getClientUsage(chatId, tgUserID)
|
||||||
|
case "admin_help":
|
||||||
|
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.answers.adminContact"))
|
||||||
case "client_commands":
|
case "client_commands":
|
||||||
t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.buttons.commands"))
|
t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.buttons.commands"))
|
||||||
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.commands.helpClientCommands"))
|
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.commands.helpClientCommands"))
|
||||||
|
@ -927,7 +929,7 @@ func (t *Tgbot) SendAnswer(chatId int64, msg string, isAdmin bool) {
|
||||||
numericKeyboardClient := tu.InlineKeyboard(
|
numericKeyboardClient := tu.InlineKeyboard(
|
||||||
tu.InlineKeyboardRow(
|
tu.InlineKeyboardRow(
|
||||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.clientUsage")).WithCallbackData(t.encodeQuery("client_traffic")),
|
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.clientUsage")).WithCallbackData(t.encodeQuery("client_traffic")),
|
||||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.commands")).WithCallbackData(t.encodeQuery("client_commands")),
|
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.adminContact")).WithCallbackData(t.encodeQuery("admin_help")),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,8 @@
|
||||||
"delDepletedClients" = "Удалить отключенных пользователей"
|
"delDepletedClients" = "Удалить отключенных пользователей"
|
||||||
"delDepletedClientsTitle" = "Удаление отключенных пользователей"
|
"delDepletedClientsTitle" = "Удаление отключенных пользователей"
|
||||||
"delDepletedClientsContent" = "Вы уверены, что хотите удалить всех отключенных пользователей?"
|
"delDepletedClientsContent" = "Вы уверены, что хотите удалить всех отключенных пользователей?"
|
||||||
"email" = "Email"
|
"email" = "MAC"
|
||||||
"emailDesc" = "Пожалуйста, укажите уникальный Email"
|
"emailDesc" = "Пожалуйста, укажите уникальный MAC-адрес"
|
||||||
"IPLimit" = "Ограничение по IP"
|
"IPLimit" = "Ограничение по IP"
|
||||||
"IPLimitDesc" = "Сбросить подключение, если подключено больше введенного значения (введите 0, чтобы отключить ограничение IP-адресов)"
|
"IPLimitDesc" = "Сбросить подключение, если подключено больше введенного значения (введите 0, чтобы отключить ограничение IP-адресов)"
|
||||||
"IPLimitlog" = "IP лог"
|
"IPLimitlog" = "IP лог"
|
||||||
|
@ -483,8 +483,8 @@
|
||||||
"status" = "✅ Бот работает нормально!"
|
"status" = "✅ Бот работает нормально!"
|
||||||
"usage" = "❗ Пожалуйста, укажите текст для поиска!"
|
"usage" = "❗ Пожалуйста, укажите текст для поиска!"
|
||||||
"getID" = "🆔 Ваш ID: <code>{{ .ID }}</code>"
|
"getID" = "🆔 Ваш ID: <code>{{ .ID }}</code>"
|
||||||
"helpAdminCommands" = "Для перезапуска Xray Core:\r\n<code>/restart force</code>\r\n\r\nДля поиска электронной почты клиента:\r\n<code>/usage [Email]</code>\r\n\r\nДля поиска входящих (со статистикой клиента):\r\n<code>/inbound [Примечание]</code>\r\n\r\nID чата Telegram:\r\n<code>/id</code>"
|
"helpAdminCommands" = "Для перезапуска Xray Core:\r\n<code>/restart force</code>\r\n\r\nДля поиска электронной почты клиента:\r\n<code>/usage [MAC-адрес]</code>\r\n\r\nДля поиска входящих (со статистикой клиента):\r\n<code>/inbound [Примечание]</code>\r\n\r\nID чата Telegram:\r\n<code>/id</code>"
|
||||||
"helpClientCommands" = "Для поиска статистики используйте следующую команду:\r\n<code>/usage [Email]</code>\r\n\r\nID чата Telegram:\r\n<code>/id</code>"
|
"helpClientCommands" = "Для поиска статистики используйте следующую команду:\r\n<code>/usage [MAC-адрес]</code>\r\n\r\nID чата Telegram:\r\n<code>/id</code>"
|
||||||
"restartUsage" = "\r\n\r\n<code>/restart force</code>"
|
"restartUsage" = "\r\n\r\n<code>/restart force</code>"
|
||||||
"restartSuccess" = "✅ Операция успешно завершена!"
|
"restartSuccess" = "✅ Операция успешно завершена!"
|
||||||
"restartFailed" = "❗ Ошибка в операции.\r\n\r\n<code>Ошибка: {{ .Error }}</code>."
|
"restartFailed" = "❗ Ошибка в операции.\r\n\r\n<code>Ошибка: {{ .Error }}</code>."
|
||||||
|
@ -522,7 +522,7 @@
|
||||||
"active" = "💡 Активен: {{ .Enable }}\r\n"
|
"active" = "💡 Активен: {{ .Enable }}\r\n"
|
||||||
"enabled" = "🚨 Включен: {{ .Enable }}\r\n"
|
"enabled" = "🚨 Включен: {{ .Enable }}\r\n"
|
||||||
"online" = "🌐 Статус соединения: {{ .Status }}\r\n"
|
"online" = "🌐 Статус соединения: {{ .Status }}\r\n"
|
||||||
"email" = "📧 Email: {{ .Email }}\r\n"
|
"email" = "📧 MAC-адрес роутера: {{ .Email }}\r\n"
|
||||||
"upload" = "🔼 Исходящий трафик: ↑{{ .Upload }}\r\n"
|
"upload" = "🔼 Исходящий трафик: ↑{{ .Upload }}\r\n"
|
||||||
"download" = "🔽 Входящий трафик: ↓{{ .Download }}\r\n"
|
"download" = "🔽 Входящий трафик: ↓{{ .Download }}\r\n"
|
||||||
"total" = "📊 Всего: ↑↓{{ .UpDown }} из {{ .Total }}\r\n"
|
"total" = "📊 Всего: ↑↓{{ .UpDown }} из {{ .Total }}\r\n"
|
||||||
|
|
Loading…
Reference in a new issue