From 161c4c950b771f5245a25a7856c48f4d5c1d9fb7 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Mon, 15 May 2023 22:58:57 +0430 Subject: [PATCH 01/23] Update translation --- web/translation/translate.en_US.toml | 16 ++++++++-------- web/translation/translate.fa_IR.toml | 6 +++--- web/translation/translate.ru_RU.toml | 2 +- web/translation/translate.zh_Hans.toml | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 913e6f46..7cb707a9 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -52,8 +52,8 @@ [menu] "dashboard" = "System Status" "inbounds" = "Inbounds" -"setting" = "Panel Setting" -"logout" = "LogOut" +"settings" = "Panel Settings" +"logout" = "Logout" "link" = "Other" [pages.login] @@ -68,10 +68,10 @@ "successLogin" = "Login" [pages.index] -"title" = "System status" +"title" = "System Status" "memory" = "Memory" "hard" = "Hard disk" -"xrayStatus" = "xray Status" +"xrayStatus" = "Xray Status" "stopXray" = "Stop" "restartXray" = "Restart" "xraySwitch" = "Switch Version" @@ -88,11 +88,11 @@ "totalReceive" = "Total download traffic of all network cards since system startup" "xraySwitchVersionDialog" = "Switch xray version" "xraySwitchVersionDialogDesc" = "Whether to switch the xray version to" -"dontRefreshh" = "Installation is in progress, please do not refresh this page" +"dontRefresh" = "Installation is in progress, please do not refresh this page" "logs" = "Logs" "config" = "Config" -"backup" = "Backup" -"backupTitle" = "Backup Database" +"backup" = "Backup & Restore" +"backupTitle" = "Backup & Restore Database" "backupDescription" = "Remember to backup before importing a new database" "exportDatabase" = "Download Database" "importDatabase" = "Upload Database" @@ -198,7 +198,7 @@ "encryption" = "Encryption" [pages.settings] -"title" = "Setting" +"title" = "Settings" "save" = "Save" "infoDesc" = "Every change here needs to be saved and restart panel to take effect" "restartPanel" = "Restart Panel" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index efce12e3..392da5ab 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -51,8 +51,8 @@ [menu] "dashboard" = "وضعیت سیستم" -"inbounds" = "سرویس ها" -"setting" = "تنظیمات پنل" +"inbounds" = "سرویس ها" +"settings" = "تنظیمات پنل" "logout" = "خروج" "link" = "دیگر" @@ -88,7 +88,7 @@ "totalReceive" = "جمع کل ترافیک دانلود مصرفی" "xraySwitchVersionDialog" = "تغییر ورژن Xray" "xraySwitchVersionDialogDesc" = "آیا از تغییر ورژن مطمئن هستین" -"dontRefreshh" = "در حال نصب ، لطفا رفرش نکنید " +"dontRefresh" = "در حال نصب ، لطفا رفرش نکنید " "logs" = "گزارش ها" "config" = "تنظیمات" "backup" = "پشتیبان گیری" diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index a6eb8e54..f4d8548c 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -52,7 +52,7 @@ [menu] "dashboard" = "статус системы" "inbounds" = "пользователи" -"setting" = "настройки" +"settings" = "настройки" "logout" = "выход" "link" = "другое" diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index 7c146403..7c48c34e 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -52,7 +52,7 @@ [menu] "dashboard" = "系统状态" "inbounds" = "入站列表" -"setting" = "面板设置" +"settings" = "面板设置" "logout" = "退出登录" "link" = "其他" @@ -88,7 +88,7 @@ "totalReceive" = "系统启动以来所有网卡的总下载流量" "xraySwitchVersionDialog" = "切换 xray 版本" "xraySwitchVersionDialogDesc" = "是否切换 xray 版本至" -"dontRefreshh" = "安装中,请不要刷新此页面" +"dontRefresh" = "安装中,请不要刷新此页面" "logs" = "日志" "config" = "配置" "backup" = "备份" From c538301d42cc4604cfe4cc2975445e1341d33bf6 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Mon, 15 May 2023 22:59:23 +0430 Subject: [PATCH 02/23] Update docker-compose --- docker-compose.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2e57169f..978fa2fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,16 @@ -version: '3.9' +--- +version: "3.9" + services: xui: image: alireza7/x-ui container_name: x-ui + hostname: yourhostname volumes: - $PWD/db/:/etc/x-ui/ - $PWD/cert/:/root/cert/ + environment: + XRAY_VMESS_AEAD_FORCED: "false" + tty: true + network_mode: host restart: unless-stopped - ports: - - 54321:54321 - - 443:443 From d14c5f4f6773131fb7f067975ff03b43f2adf417 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Mon, 15 May 2023 23:01:07 +0430 Subject: [PATCH 03/23] Update sub remarks --- web/controller/xui.go | 6 +++--- web/service/config.json | 40 +++++++++++++++------------------------- web/service/sub.go | 16 ++++++++++------ 3 files changed, 28 insertions(+), 34 deletions(-) diff --git a/web/controller/xui.go b/web/controller/xui.go index fc3ca5f8..1844181d 100644 --- a/web/controller/xui.go +++ b/web/controller/xui.go @@ -23,7 +23,7 @@ func (a *XUIController) initRouter(g *gin.RouterGroup) { g.GET("/", a.index) g.GET("/inbounds", a.inbounds) - g.GET("/setting", a.setting) + g.GET("/settings", a.settings) a.inboundController = NewInboundController(g) a.settingController = NewSettingController(g) @@ -37,6 +37,6 @@ func (a *XUIController) inbounds(c *gin.Context) { html(c, "inbounds.html", "pages.inbounds.title", nil) } -func (a *XUIController) setting(c *gin.Context) { - html(c, "setting.html", "pages.settings.title", nil) +func (a *XUIController) settings(c *gin.Context) { + html(c, "settings.html", "pages.settings.title", nil) } diff --git a/web/service/config.json b/web/service/config.json index a986ea94..87069239 100644 --- a/web/service/config.json +++ b/web/service/config.json @@ -3,22 +3,18 @@ "loglevel": "warning" }, "api": { - "services": [ - "HandlerService", - "LoggerService", - "StatsService" - ], - "tag": "api" + "tag": "api", + "services": ["HandlerService", "LoggerService", "StatsService"] }, "inbounds": [ { + "tag": "api", "listen": "127.0.0.1", "port": 62789, "protocol": "dokodemo-door", "settings": { "address": "127.0.0.1" - }, - "tag": "api" + } } ], "outbounds": [ @@ -27,16 +23,16 @@ "settings": {} }, { + "tag": "blocked", "protocol": "blackhole", - "settings": {}, - "tag": "blocked" + "settings": {} } ], "policy": { "levels": { "0": { - "statsUserUplink": true, - "statsUserDownlink": true + "statsUserDownlink": true, + "statsUserUplink": true } }, "system": { @@ -48,25 +44,19 @@ "domainStrategy": "IPIfNonMatch", "rules": [ { - "inboundTag": [ - "api" - ], - "outboundTag": "api", - "type": "field" + "type": "field", + "inboundTag": ["api"], + "outboundTag": "api" }, { - "ip": [ - "geoip:private" - ], + "type": "field", "outboundTag": "blocked", - "type": "field" + "ip": ["geoip:private"] }, { + "type": "field", "outboundTag": "blocked", - "protocol": [ - "bittorrent" - ], - "type": "field" + "protocol": ["bittorrent"] } ] }, diff --git a/web/service/sub.go b/web/service/sub.go index f887c681..53099497 100644 --- a/web/service/sub.go +++ b/web/service/sub.go @@ -38,7 +38,7 @@ func (s *SubService) GetSubs(subId string, host string) ([]string, string, error continue } for _, client := range clients { - if client.SubID == subId { + if client.Enable && client.SubID == subId { link := s.getLink(inbound, client.Email) result = append(result, link) clientTraffics = append(clientTraffics, s.getClientTraffics(inbound.ClientStats, client.Email)) @@ -73,7 +73,7 @@ func (s *SubService) GetSubs(subId string, host string) ([]string, string, error func (s *SubService) getInboundsBySubId(subId string) ([]*model.Inbound, error) { db := database.GetDB() var inbounds []*model.Inbound - err := db.Model(model.Inbound{}).Preload("ClientStats").Where("settings like ?", fmt.Sprintf(`%%"subId": "%s"%%`, subId)).Find(&inbounds).Error + err := db.Model(model.Inbound{}).Preload("ClientStats").Where("settings like ? and enable = ?", fmt.Sprintf(`%%"subId": "%s"%%`, subId), true).Find(&inbounds).Error if err != nil && err != gorm.ErrRecordNotFound { return nil, err } @@ -107,9 +107,10 @@ func (s *SubService) genVmessLink(inbound *model.Inbound, email string) string { if inbound.Protocol != model.VMess { return "" } + remark := fmt.Sprintf("%s-%s", inbound.Remark, email) obj := map[string]interface{}{ "v": "2", - "ps": email, + "ps": remark, "add": s.address, "port": inbound.Port, "type": "none", @@ -353,7 +354,8 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string { // Set the new query values on the URL url.RawQuery = q.Encode() - url.Fragment = email + remark := fmt.Sprintf("%s-%s", inbound.Remark, email) + url.Fragment = remark return url.String() } @@ -502,7 +504,8 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string // Set the new query values on the URL url.RawQuery = q.Encode() - url.Fragment = email + remark := fmt.Sprintf("%s-%s", inbound.Remark, email) + url.Fragment = remark return url.String() } @@ -583,7 +586,8 @@ func (s *SubService) genShadowsocksLink(inbound *model.Inbound, email string) st // Set the new query values on the URL url.RawQuery = q.Encode() - url.Fragment = clients[clientIndex].Email + remark := fmt.Sprintf("%s-%s", inbound.Remark, clients[clientIndex].Email) + url.Fragment = remark return url.String() } From b00d33830c333b53a717a18f1a1cbe18339bc2fd Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Mon, 15 May 2023 23:01:44 +0430 Subject: [PATCH 04/23] Add password component --- web/html/xui/component/password.html | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 web/html/xui/component/password.html diff --git a/web/html/xui/component/password.html b/web/html/xui/component/password.html new file mode 100644 index 00000000..ebea3be6 --- /dev/null +++ b/web/html/xui/component/password.html @@ -0,0 +1,35 @@ +{{define "component/passwordInput"}} + +{{end}} + +{{define "component/password"}} + +{{end}} \ No newline at end of file From 2349c9fdbeb08a0207420256c3b6dea10ab7f313 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Mon, 15 May 2023 23:02:10 +0430 Subject: [PATCH 05/23] FIX themeSwitcher classes --- web/html/xui/component/themeSwitch.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/html/xui/component/themeSwitch.html b/web/html/xui/component/themeSwitch.html index 35013a9e..7cbedecf 100644 --- a/web/html/xui/component/themeSwitch.html +++ b/web/html/xui/component/themeSwitch.html @@ -28,7 +28,7 @@ isDarkTheme, bgStyle: `background: ${colors[theme].bg};`, textStyle: `color: ${colors[theme].text};`, - darkClass: isDarkTheme ? 'ant-card-dark' : '', + darkClass: isDarkTheme ? 'ant-dark' : '', darkCardClass: isDarkTheme ? 'ant-card-dark' : '', darkDrawerClass: isDarkTheme ? 'ant-drawer-dark' : '', get currentTheme() { @@ -40,7 +40,7 @@ localStorage.setItem('dark-mode', this.isDarkTheme); this.bgStyle = `background: ${colors[this.theme].bg};`; this.textStyle = `color: ${colors[this.theme].text};`; - this.darkClass = this.isDarkTheme ? 'ant-card-dark' : ''; + this.darkClass = this.isDarkTheme ? 'ant-dark' : ''; this.darkCardClass = this.isDarkTheme ? 'ant-card-dark' : ''; this.darkDrawerClass = this.isDarkTheme ? 'ant-drawer-dark' : ''; }, From b87705f50bce65fd38454f0415343938ca4014be Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Mon, 15 May 2023 23:02:21 +0430 Subject: [PATCH 06/23] Update htmls --- web/html/common/prompt_modal.html | 10 +++---- web/html/common/qrcode_modal.html | 2 +- web/html/common/text_modal.html | 2 +- web/html/login.html | 26 +++++++++---------- web/html/xui/client_bulk_modal.html | 6 ++--- web/html/xui/common_sider.html | 4 +-- web/html/xui/form/client.html | 4 +-- web/html/xui/form/inbound.html | 4 +-- web/html/xui/form/protocol/dokodemo.html | 2 +- web/html/xui/form/protocol/shadowsocks.html | 10 +++---- web/html/xui/form/protocol/socks.html | 1 - web/html/xui/form/protocol/trojan.html | 6 ++--- web/html/xui/form/protocol/vless.html | 4 +-- web/html/xui/form/protocol/vmess.html | 2 +- web/html/xui/form/stream/stream_kcp.html | 2 +- web/html/xui/form/stream/stream_quic.html | 4 +-- web/html/xui/form/stream/stream_settings.html | 2 +- web/html/xui/form/tls_settings.html | 10 +++---- web/html/xui/inbounds.html | 20 +++++++------- web/html/xui/index.html | 4 +-- web/html/xui/{setting.html => settings.html} | 15 +++++------ 21 files changed, 68 insertions(+), 72 deletions(-) rename web/html/xui/{setting.html => settings.html} (98%) diff --git a/web/html/common/prompt_modal.html b/web/html/common/prompt_modal.html index 6b64bc95..23bdca64 100644 --- a/web/html/common/prompt_modal.html +++ b/web/html/common/prompt_modal.html @@ -36,11 +36,11 @@ }, confirm() {}, open({ - title='', - type='text', - value='', - okText='{{ i18n "sure"}}', - confirm=() => {}, + title = '', + type = 'text', + value = '', + okText = '{{ i18n "sure"}}', + confirm = () => {}, }) { this.title = title; this.type = type; diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html index 06ca07a8..76ab7b41 100644 --- a/web/html/common/qrcode_modal.html +++ b/web/html/common/qrcode_modal.html @@ -23,7 +23,7 @@ qrcode: null, clipboard: null, visible: false, - show: function (title='', content='', dbInbound=new DBInbound(), copyText='', clientName = null) { + show: function (title = '', content = '', dbInbound = new DBInbound(), copyText = '', clientName = null) { this.title = title; this.content = content; this.dbInbound = dbInbound; diff --git a/web/html/common/text_modal.html b/web/html/common/text_modal.html index 649f73dd..1514051b 100644 --- a/web/html/common/text_modal.html +++ b/web/html/common/text_modal.html @@ -21,7 +21,7 @@ qrcode: null, clipboard: null, visible: false, - show: function (title='', content='', fileName='') { + show: function (title = '', content = '', fileName = '') { this.title = title; this.content = content; this.fileName = fileName; diff --git a/web/html/login.html b/web/html/login.html index b98059e2..c1b88449 100644 --- a/web/html/login.html +++ b/web/html/login.html @@ -50,7 +50,7 @@ -

{{ i18n "pages.login.title" }}

+

{{ i18n "pages.login.title" }}

@@ -63,10 +63,9 @@ - - - + + @@ -78,14 +77,12 @@ - - - - -    - - - + + + +    + + @@ -101,6 +98,7 @@ {{template "js" .}} {{template "component/themeSwitcher" .}} +{{template "component/password" .}} + }); + -{{template "inboundModal"}} -{{template "promptModal"}} -{{template "qrcodeModal"}} -{{template "textModal"}} -{{template "inboundInfoModal"}} -{{template "clientsModal"}} -{{template "clientsBulkModal"}} + {{template "inboundModal"}} + {{template "promptModal"}} + {{template "qrcodeModal"}} + {{template "textModal"}} + {{template "inboundInfoModal"}} + {{template "clientsModal"}} + {{template "clientsBulkModal"}} + \ No newline at end of file From 545d7a73c8524950678601a6375d3b02e4f3fb92 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Mon, 15 May 2023 20:41:24 +0200 Subject: [PATCH 11/23] security issue - CVE-2023-29401 Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function References gin-gonic/gin#3555 gin-gonic/gin#3556 https://pkg.go.dev/vuln/GO-2023-1737 Co-authored-by: MHSanaei --- web/controller/server.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/web/controller/server.go b/web/controller/server.go index 9e649e6c..7122d0ce 100644 --- a/web/controller/server.go +++ b/web/controller/server.go @@ -1,6 +1,9 @@ package controller import ( + "fmt" + "net/http" + "regexp" "time" "x-ui/web/global" "x-ui/web/service" @@ -8,6 +11,8 @@ import ( "github.com/gin-gonic/gin" ) +var filenameRegex = regexp.MustCompile(`^[a-zA-Z0-9_\-.]+$`) + type ServerController struct { BaseController @@ -136,9 +141,17 @@ func (a *ServerController) getDb(c *gin.Context) { jsonMsg(c, "get Database", err) return } + + filename := "x-ui.db" + + if !filenameRegex.MatchString(filename) { + c.AbortWithError(http.StatusBadRequest, fmt.Errorf("invalid filename")) + return + } + // Set the headers for the response c.Header("Content-Type", "application/octet-stream") - c.Header("Content-Disposition", "attachment; filename=x-ui.db") + c.Header("Content-Disposition", "attachment; filename="+filename) // Write the file contents to the response c.Writer.Write(db) From ef0a48de236ad151244eb695f5421d186bf910d2 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Mon, 15 May 2023 21:26:08 +0200 Subject: [PATCH 12/23] [feature] multi cert per inbound #290 --- web/assets/js/model/xray.js | 4 +- web/html/xui/form/tls_settings.html | 106 +++++++++++++++------------- web/html/xui/inbound_modal.html | 6 +- 3 files changed, 60 insertions(+), 56 deletions(-) diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index 4e4bad78..5f111a99 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -478,8 +478,8 @@ class TlsStreamSettings extends XrayCommonClass { this.settings = settings; } - addCert(cert) { - this.certs.push(cert); + addCert() { + this.certs.push(new TlsStreamSettings.Cert()); } removeCert(index) { diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html index 30fe1a18..5077bc9d 100644 --- a/web/html/xui/form/tls_settings.html +++ b/web/html/xui/form/tls_settings.html @@ -90,57 +90,61 @@ - - - - - {{ i18n "pages.inbounds.certificatePath" }} - {{ i18n "pages.inbounds.certificateContent" }} - - - - - - @@ -172,7 +165,7 @@ - + @@ -187,8 +180,8 @@ uTLS - + [[ key ]] From a0a4d7571d50b7ce96bffdeab39616cdc387ca35 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Tue, 16 May 2023 02:20:53 +0430 Subject: [PATCH 15/23] rename doAllItemsExist function --- web/assets/js/util/common.js | 2 +- web/html/xui/settings.html | 131 ++++++++++++++++++----------------- 2 files changed, 70 insertions(+), 63 deletions(-) diff --git a/web/assets/js/util/common.js b/web/assets/js/util/common.js index e4f6a95c..43bf77ef 100644 --- a/web/assets/js/util/common.js +++ b/web/assets/js/util/common.js @@ -106,7 +106,7 @@ function usageColor(data, threshold, total) { } } -function areAllItemsExist(array1, array2) { +function doAllItemsExist(array1, array2) { for (let i = 0; i < array1.length; i++) { if (!array2.includes(array1[i])) { return false; diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 7f13e5c1..2bf40c0f 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -79,7 +79,7 @@ - + @@ -233,7 +233,7 @@ - +

@@ -272,7 +272,7 @@ allSetting: new AllSetting(), saveBtnDisable: true, user: {}, - lang : getLang(), + lang: getLang(), ipv4Settings: { tag: "IPv4", protocol: "freedom", @@ -337,8 +337,8 @@ } }, methods: { - loading(spinning = true, obj) { - if (obj == null) this.spinning = spinning; + loading(spinning = true) { + this.spinning = spinning; }, async getAllSetting() { this.loading(true); @@ -395,15 +395,22 @@ this.saveBtnDisable = true; } }, + doAllItemsExist(array1, array2) { + for (let i = 0; i < array1.length; i++) { + if (!array2.includes(array1[i])) { + return false; + } + } + return true; + }, syncRulesWithOutbound(tag, setting) { const newTemplateSettings = this.templateSettings; const haveRules = newTemplateSettings.routing.rules.some((r) => r?.outboundTag === tag); const outboundIndex = newTemplateSettings.outbounds.findIndex((o) => o.tag === tag); - if (!haveRules && outboundIndex > 0){ + if (!haveRules && outboundIndex > 0) { newTemplateSettings.outbounds.splice(outboundIndex); } if (haveRules && outboundIndex < 0) { - newTemplateSettings.outbounds.push(setting); } this.templateSettings = newTemplateSettings; @@ -430,7 +437,7 @@ const { data, property, outboundTag } = routeSettings; const oldTemplateSettings = this.templateSettings; const newTemplateSettings = oldTemplateSettings; - currentProperty = this.templateRuleGetter({outboundTag: outboundTag, property: property}) + currentProperty = this.templateRuleGetter({ outboundTag, property }) if (currentProperty.length == 0) { const propertyRule = { type: "field", @@ -449,7 +456,7 @@ routingRule.hasOwnProperty("outboundTag") && routingRule.outboundTag === outboundTag ) { - if (!insertedOnce && data.length>0){ + if (!insertedOnce && data.length > 0) { insertedOnce = true; routingRule[property] = data; newRules.push(routingRule); @@ -513,7 +520,7 @@ newTemplateSettings = this.templateSettings; freedomOutboundIndex = newTemplateSettings.outbounds.findIndex((o) => o.protocol === "freedom" && !o.tag); if (!newTemplateSettings.outbounds[freedomOutboundIndex].settings) { - newTemplateSettings.outbounds[freedomOutboundIndex].settings = {"domainStrategy": newValue}; + newTemplateSettings.outbounds[freedomOutboundIndex].settings = { "domainStrategy": newValue }; } else { newTemplateSettings.outbounds[freedomOutboundIndex].settings.domainStrategy = newValue; } @@ -532,66 +539,66 @@ } }, blockedIPs: { - get: function() { - return this.templateRuleGetter({outboundTag: "blocked", property: "ip"}); + get: function () { + return this.templateRuleGetter({ outboundTag: "blocked", property: "ip" }); }, - set: function(newValue) { - this.templateRuleSetter({outboundTag: "blocked", property: "ip", data: newValue}); + set: function (newValue) { + this.templateRuleSetter({ outboundTag: "blocked", property: "ip", data: newValue }); } }, blockedDomains: { - get: function() { - return this.templateRuleGetter({outboundTag: "blocked", property: "domain"}); + get: function () { + return this.templateRuleGetter({ outboundTag: "blocked", property: "domain" }); }, - set: function(newValue) { - this.templateRuleSetter({outboundTag: "blocked", property: "domain", data: newValue}); + set: function (newValue) { + this.templateRuleSetter({ outboundTag: "blocked", property: "domain", data: newValue }); } }, blockedProtocols: { - get: function() { - return this.templateRuleGetter({outboundTag: "blocked", property: "protocol"}); + get: function () { + return this.templateRuleGetter({ outboundTag: "blocked", property: "protocol" }); }, - set: function(newValue) { - this.templateRuleSetter({outboundTag: "blocked", property: "protocol", data: newValue}); + set: function (newValue) { + this.templateRuleSetter({ outboundTag: "blocked", property: "protocol", data: newValue }); } }, directIPs: { - get: function() { - return this.templateRuleGetter({outboundTag: "direct", property: "ip"}); + get: function () { + return this.templateRuleGetter({ outboundTag: "direct", property: "ip" }); }, - set: function(newValue) { - this.templateRuleSetter({outboundTag: "direct", property: "ip", data: newValue}); - this.syncRulesWithOutbound("direct",this.directSettings); + set: function (newValue) { + this.templateRuleSetter({ outboundTag: "direct", property: "ip", data: newValue }); + this.syncRulesWithOutbound("direct", this.directSettings); } }, directDomains: { - get: function() { - return this.templateRuleGetter({outboundTag: "direct", property: "domain"}); + get: function () { + return this.templateRuleGetter({ outboundTag: "direct", property: "domain" }); }, - set: function(newValue) { - this.templateRuleSetter({outboundTag: "direct", property: "domain", data: newValue}); - this.syncRulesWithOutbound("direct",this.directSettings); + set: function (newValue) { + this.templateRuleSetter({ outboundTag: "direct", property: "domain", data: newValue }); + this.syncRulesWithOutbound("direct", this.directSettings); } }, manualBlockedIPs: { - get: function() { return JSON.stringify(this.blockedIPs, null, 2); }, - set: debounce(function(value) { this.blockedIPs = JSON.parse(value); } , 1000) + get: function () { return JSON.stringify(this.blockedIPs, null, 2); }, + set: debounce(function (value) { this.blockedIPs = JSON.parse(value); }, 1000) }, manualBlockedDomains: { - get: function() { return JSON.stringify(this.blockedDomains, null, 2); }, - set: debounce(function(value) { this.blockedDomains = JSON.parse(value); } , 1000) + get: function () { return JSON.stringify(this.blockedDomains, null, 2); }, + set: debounce(function (value) { this.blockedDomains = JSON.parse(value); }, 1000) }, manualDirectIPs: { - get: function() { return JSON.stringify(this.directIPs, null, 2); }, - set: debounce(function(value) { this.directIPs = JSON.parse(value); } , 1000) + get: function () { return JSON.stringify(this.directIPs, null, 2); }, + set: debounce(function (value) { this.directIPs = JSON.parse(value); }, 1000) }, manualDirectDomains: { - get: function() { return JSON.stringify(this.directDomains, null, 2); }, - set: debounce(function(value) { this.directDomains = JSON.parse(value); } , 1000) + get: function () { return JSON.stringify(this.directDomains, null, 2); }, + set: debounce(function (value) { this.directDomains = JSON.parse(value); }, 1000) }, torrentSettings: { get: function () { - return areAllItemsExist(this.settingsData.protocols.bittorrent, this.blockedProtocols); + return doAllItemsExist(this.settingsData.protocols.bittorrent, this.blockedProtocols); }, set: function (newValue) { if (newValue) { @@ -603,7 +610,7 @@ }, privateIpSettings: { get: function () { - return areAllItemsExist(this.settingsData.ips.local, this.blockedIPs); + return doAllItemsExist(this.settingsData.ips.local, this.blockedIPs); }, set: function (newValue) { if (newValue) { @@ -615,7 +622,7 @@ }, AdsSettings: { get: function () { - return areAllItemsExist(this.settingsData.domains.ads, this.blockedDomains); + return doAllItemsExist(this.settingsData.domains.ads, this.blockedDomains); }, set: function (newValue) { if (newValue) { @@ -628,7 +635,7 @@ familyProtectSettings: { get: function () { if (!this.templateSettings || !this.templateSettings.dns || !this.templateSettings.dns.servers) return false; - return areAllItemsExist(this.templateSettings.dns.servers, this.settingsData.familyProtectDNS.servers); + return doAllItemsExist(this.templateSettings.dns.servers, this.settingsData.familyProtectDNS.servers); }, set: function (newValue) { newTemplateSettings = this.templateSettings; @@ -642,10 +649,10 @@ }, GoogleIPv4Settings: { get: function () { - return areAllItemsExist(this.settingsData.domains.google, this.templateRuleGetter({outboundTag: "IPv4", property: "domain"})); + return doAllItemsExist(this.settingsData.domains.google, this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" })); }, set: function (newValue) { - oldData = this.templateRuleGetter({outboundTag: "IPv4", property: "domain"}); + oldData = this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" }); if (newValue) { oldData = [...oldData, ...this.settingsData.domains.google]; } else { @@ -661,10 +668,10 @@ }, NetflixIPv4Settings: { get: function () { - return areAllItemsExist(this.settingsData.domains.netflix, this.templateRuleGetter({outboundTag: "IPv4", property: "domain"})); + return doAllItemsExist(this.settingsData.domains.netflix, this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" })); }, set: function (newValue) { - oldData = this.templateRuleGetter({outboundTag: "IPv4", property: "domain"}); + oldData = this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" }); if (newValue) { oldData = [...oldData, ...this.settingsData.domains.netflix]; } else { @@ -680,7 +687,7 @@ }, IRIpSettings: { get: function () { - return areAllItemsExist(this.settingsData.ips.ir, this.blockedIPs); + return doAllItemsExist(this.settingsData.ips.ir, this.blockedIPs); }, set: function (newValue) { if (newValue) { @@ -692,7 +699,7 @@ }, IRDomainSettings: { get: function () { - return areAllItemsExist(this.settingsData.domains.ir, this.blockedDomains); + return doAllItemsExist(this.settingsData.domains.ir, this.blockedDomains); }, set: function (newValue) { if (newValue) { @@ -704,7 +711,7 @@ }, ChinaIpSettings: { get: function () { - return areAllItemsExist(this.settingsData.ips.cn, this.blockedIPs); + return doAllItemsExist(this.settingsData.ips.cn, this.blockedIPs); }, set: function (newValue) { if (newValue) { @@ -716,7 +723,7 @@ }, ChinaDomainSettings: { get: function () { - return areAllItemsExist(this.settingsData.domains.cn, this.blockedDomains); + return doAllItemsExist(this.settingsData.domains.cn, this.blockedDomains); }, set: function (newValue) { if (newValue) { @@ -728,7 +735,7 @@ }, RussiaIpSettings: { get: function () { - return areAllItemsExist(this.settingsData.ips.ru, this.blockedIPs); + return doAllItemsExist(this.settingsData.ips.ru, this.blockedIPs); }, set: function (newValue) { if (newValue) { @@ -740,7 +747,7 @@ }, RussiaDomainSettings: { get: function () { - return areAllItemsExist(this.settingsData.domains.ru, this.blockedDomains); + return doAllItemsExist(this.settingsData.domains.ru, this.blockedDomains); }, set: function (newValue) { if (newValue) { @@ -752,7 +759,7 @@ }, IRIpDirectSettings: { get: function () { - return areAllItemsExist(this.settingsData.ips.ir, this.directIPs); + return doAllItemsExist(this.settingsData.ips.ir, this.directIPs); }, set: function (newValue) { if (newValue) { @@ -764,7 +771,7 @@ }, IRDomainDirectSettings: { get: function () { - return areAllItemsExist(this.settingsData.domains.ir, this.directDomains); + return doAllItemsExist(this.settingsData.domains.ir, this.directDomains); }, set: function (newValue) { if (newValue) { @@ -776,7 +783,7 @@ }, ChinaIpDirectSettings: { get: function () { - return areAllItemsExist(this.settingsData.ips.cn, this.directIPs); + return doAllItemsExist(this.settingsData.ips.cn, this.directIPs); }, set: function (newValue) { if (newValue) { @@ -788,7 +795,7 @@ }, ChinaDomainDirectSettings: { get: function () { - return areAllItemsExist(this.settingsData.domains.cn, this.directDomains); + return doAllItemsExist(this.settingsData.domains.cn, this.directDomains); }, set: function (newValue) { if (newValue) { @@ -800,7 +807,7 @@ }, RussiaIpDirectSettings: { get: function () { - return areAllItemsExist(this.settingsData.ips.ru, this.directIPs); + return doAllItemsExist(this.settingsData.ips.ru, this.directIPs); }, set: function (newValue) { if (newValue) { @@ -812,7 +819,7 @@ }, RussiaDomainDirectSettings: { get: function () { - return areAllItemsExist(this.settingsData.domains.ru, this.directDomains); + return doAllItemsExist(this.settingsData.domains.ru, this.directDomains); }, set: function (newValue) { if (newValue) { @@ -821,9 +828,9 @@ this.directDomains = this.directDomains.filter(data => !this.settingsData.domains.ru.includes(data)); } } - }, }, - }); + }, + }); \ No newline at end of file From 28233884bb04ae65a7de3ca2aa89f345592b2f93 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Tue, 16 May 2023 02:21:24 +0430 Subject: [PATCH 16/23] Update translations --- web/controller/setting.go | 18 +- web/html/xui/inbounds.html | 2 +- web/translation/translate.en_US.toml | 247 +++++++++++++------------ web/translation/translate.fa_IR.toml | 10 +- web/translation/translate.ru_RU.toml | 4 +- web/translation/translate.zh_Hans.toml | 10 +- 6 files changed, 146 insertions(+), 145 deletions(-) diff --git a/web/controller/setting.go b/web/controller/setting.go index 10129d17..623a34ce 100644 --- a/web/controller/setting.go +++ b/web/controller/setting.go @@ -43,7 +43,7 @@ func (a *SettingController) initRouter(g *gin.RouterGroup) { func (a *SettingController) getAllSetting(c *gin.Context) { allSetting, err := a.settingService.GetAllSetting() if err != nil { - jsonMsg(c, I18n(c, "pages.settings.toasts.getSetting"), err) + jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err) return } jsonObj(c, allSetting, nil) @@ -52,22 +52,22 @@ func (a *SettingController) getAllSetting(c *gin.Context) { func (a *SettingController) getDefaultSettings(c *gin.Context) { expireDiff, err := a.settingService.GetExpireDiff() if err != nil { - jsonMsg(c, I18n(c, "pages.settings.toasts.getSetting"), err) + jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err) return } trafficDiff, err := a.settingService.GetTrafficDiff() if err != nil { - jsonMsg(c, I18n(c, "pages.settings.toasts.getSetting"), err) + jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err) return } defaultCert, err := a.settingService.GetCertFile() if err != nil { - jsonMsg(c, I18n(c, "pages.settings.toasts.getSetting"), err) + jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err) return } defaultKey, err := a.settingService.GetKeyFile() if err != nil { - jsonMsg(c, I18n(c, "pages.settings.toasts.getSetting"), err) + jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err) return } result := map[string]interface{}{ @@ -83,18 +83,18 @@ func (a *SettingController) updateSetting(c *gin.Context) { allSetting := &entity.AllSetting{} err := c.ShouldBind(allSetting) if err != nil { - jsonMsg(c, I18n(c, "pages.settings.toasts.modifySetting"), err) + jsonMsg(c, I18n(c, "pages.settings.toasts.modifySettings"), err) return } err = a.settingService.UpdateAllSetting(allSetting) - jsonMsg(c, I18n(c, "pages.settings.toasts.modifySetting"), err) + jsonMsg(c, I18n(c, "pages.settings.toasts.modifySettings"), err) } func (a *SettingController) updateUser(c *gin.Context) { form := &updateUserForm{} err := c.ShouldBind(form) if err != nil { - jsonMsg(c, I18n(c, "pages.settings.toasts.modifySetting"), err) + jsonMsg(c, I18n(c, "pages.settings.toasts.modifySettings"), err) return } user := session.GetLoginUser(c) @@ -123,7 +123,7 @@ func (a *SettingController) restartPanel(c *gin.Context) { func (a *SettingController) getDefaultXrayConfig(c *gin.Context) { defaultJsonConfig, err := a.settingService.GetDefaultXrayConfig() if err != nil { - jsonMsg(c, I18n(c, "pages.settings.toasts.getSetting"), err) + jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err) return } jsonObj(c, defaultJsonConfig, nil) diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index bb58b3bc..c358fb09 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -163,7 +163,7 @@ }} - {{ i18n "pages.inbounds.Clone"}} + {{ i18n "pages.inbounds.clone"}} diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 7cb707a9..639a556e 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -22,11 +22,11 @@ "unlimited" = "Unlimited" "none" = "None" "qrCode" = "QR Code" -"info" = "More information" +"info" = "More Information" "edit" = "Edit" "delete" = "Delete" "reset" = "Reset" -"copySuccess" = "Copy successfully" +"copySuccess" = "Copied successfully" "sure" = "Sure" "encryption" = "Encryption" "transmission" = "Transmission" @@ -42,7 +42,7 @@ "additional" = "Alter ID" "monitor" = "Listen IP" "certificate" = "Certificate" -"fail" = "Fail" +"fail" = " Fail" "success" = " Success" "getVersion" = "Get version" "install" = "Install" @@ -61,113 +61,114 @@ "loginAgain" = "The login time limit has expired, please log in again" [pages.login.toasts] -"invalidFormData" = "Input Data Format Is Invalid" -"emptyUsername" = "Please Enter Username" -"emptyPassword" = "Please Enter Password" -"wrongUsernameOrPassword" = "Invalid username or password" +"invalidFormData" = "Input data format is invalid." +"emptyUsername" = "Please enter username." +"emptyPassword" = "Please enter password." +"wrongUsernameOrPassword" = "Invalid username or password." "successLogin" = "Login" [pages.index] "title" = "System Status" "memory" = "Memory" -"hard" = "Hard disk" +"hard" = "Hard Disk" "xrayStatus" = "Xray Status" "stopXray" = "Stop" "restartXray" = "Restart" "xraySwitch" = "Switch Version" -"xraySwitchClick" = "Click on the version you want to switch" -"xraySwitchClickDesk" = "Please choose carefully, older versions may have incompatible configurations" +"xraySwitchClick" = "Choose the version you want to switch to." +"xraySwitchClickDesk" = "Choose wisely, as older versions may not be compatible with current configurations." "operationHours" = "Operation Hours" -"operationHoursDesc" = "The running time of the system since it was started" +"operationHoursDesc" = "System uptime: time since startup." "systemLoad" = "System Load" "connectionCount" = "Connection Count" -"connectionCountDesc" = "The total number of connections for all network cards" -"upSpeed" = "Total upload speed for all network cards" -"downSpeed" = "Total download speed for all network cards" -"totalSent" = "Total upload traffic of all network cards since system startup" -"totalReceive" = "Total download traffic of all network cards since system startup" -"xraySwitchVersionDialog" = "Switch xray version" -"xraySwitchVersionDialogDesc" = "Whether to switch the xray version to" -"dontRefresh" = "Installation is in progress, please do not refresh this page" +"connectionCountDesc" = "Total connections across all network cards." +"upSpeed" = "Total upload speed for all network cards." +"downSpeed" = "Total download speed for all network cards." +"totalSent" = "Total upload traffic of all network cards since system startup." +"totalReceive" = "Total download data across all network cards since system startup." +"xraySwitchVersionDialog" = "Switch Xray Version" +"xraySwitchVersionDialogDesc" = "Are you sure you want to switch the Xray version to" +"dontRefresh" = "Installation is in progress, please do not refresh this page." "logs" = "Logs" "config" = "Config" "backup" = "Backup & Restore" "backupTitle" = "Backup & Restore Database" -"backupDescription" = "Remember to backup before importing a new database" +"backupDescription" = "Remember to backup before importing a new database." "exportDatabase" = "Download Database" "importDatabase" = "Upload Database" [pages.inbounds] "title" = "Inbounds" -"totalDownUp" = "Total uploads/downloads" -"totalUsage" = "Total usage" -"inboundCount" = "Number of inbound" -"operate" = "Operate" +"totalDownUp" = "Total Uploads/Downloads" +"totalUsage" = "Total Usage" +"inboundCount" = "Number of Inbounds" +"operate" = "Menu" "enable" = "Enable" "remark" = "Remark" "protocol" = "Protocol" "port" = "Port" "traffic" = "Traffic" "details" = "Details" -"transportConfig" = "Transport config" -"expireDate" = "Expire date" -"resetTraffic" = "Reset traffic" +"transportConfig" = "Transport Config" +"expireDate" = "Expire Date" +"resetTraffic" = "Reset Traffic" "addInbound" = "Add Inbound" "generalActions" = "General Actions" "create" = "Create" "update" = "Update" -"modifyInbound" = "Modify InBound" +"modifyInbound" = "Modify Inbound" "deleteInbound" = "Delete Inbound" "deleteInboundContent" = "Are you sure you want to delete inbound?" "resetTrafficContent" = "Are you sure you want to reset traffic?" "copyLink" = "Copy Link" "address" = "Address" "network" = "Network" -"destinationPort" = "Destination port" -"targetAddress" = "Target address" -"disableInsecureEncryption" = "Disable insecure encryption" +"destinationPort" = "Destination Port" +"targetAddress" = "Target Address" +"disableInsecureEncryption" = "Disable Insecure Encryption" "monitorDesc" = "Leave blank by default" -"meansNoLimit" = "Means no limit" -"totalFlow" = "Total flow" +"meansNoLimit" = "Means No Limit" +"totalFlow" = "Total Flow" "leaveBlankToNeverExpire" = "Leave blank to never expire" -"noRecommendKeepDefault" = "There are no special requirements to keep the default" -"certificatePath" = "Certificate file path" -"certificateContent" = "Certificate file content" -"publicKeyPath" = "Public key file path" -"publicKeyContent" = "Public key content" -"keyPath" = "Key file path" -"keyContent" = "Key content" +"noRecommendKeepDefault" = "No special requirements to keep the default" +"certificatePath" = "Certificate File Path" +"certificateContent" = "Certificate File Content" +"publicKeyPath" = "Public Key Path" +"publicKeyContent" = "Public Key Content" +"keyPath" = "Private Key Path" +"keyContent" = "Private Key Content" "clickOnQRcode" = "Click on QR Code to Copy" "client" = "Client" "export" = "Export Links" -"Clone" = "Clone" -"cloneInbound" = "Create" -"cloneInboundContent" = "All items of this inbound except Port, Listening IP, Clients will be applied to the clone" +"clone" = "Clone" +"cloneInbound" = "Clone" +"cloneInboundContent" = "All settings of this inbound, except for Port, Listening IP, and Clients, will be applied to the clone." +"cloneInboundOk" = "Clone" "resetAllTraffic" = "Reset All Inbounds Traffic" "resetAllTrafficTitle" = "Reset all inbounds traffic" -"resetAllTrafficContent" = "Are you sure to reset all inbounds traffic ?" +"resetAllTrafficContent" = "Are you sure you want to reset all inbounds traffic?" "resetInboundClientTraffics" = "Reset Clients Traffic" "resetInboundClientTrafficTitle" = "Reset all clients traffic" -"resetInboundClientTrafficContent" = "Are you sure to reset all traffics of this inbound's clients ?" +"resetInboundClientTrafficContent" = "Are you sure you want to reset all traffic for this inbound's clients?" "resetAllClientTraffics" = "Reset All Clients Traffic" "resetAllClientTrafficTitle" = "Reset all clients traffic" -"resetAllClientTrafficContent" = "Are you sure to reset all traffics of all clients ?" -"delDepletedClients" = "Delete depleted clients" +"resetAllClientTrafficContent" = "Are you sure you want to reset all traffics for all clients?" +"delDepletedClients" = "Delete Depleted Clients" "delDepletedClientsTitle" = "Delete depleted clients" -"delDepletedClientsContent" = "Are you sure to delete all depleted clients ?" +"delDepletedClientsContent" = "Are you sure you want to delete all depleted clients?" "email" = "Email" -"emailDesc" = "The Email Must Be Completely Unique" +"emailDesc" = "Please provide a unique email address." "setDefaultCert" = "Set cert from panel" "telegramDesc" = "use Telegram ID without @ or chat IDs ( you can get it here @userinfobot )" -"subscriptionDesc" = "you can find your sub link on Details, also ou can use the same name for several configurations" +"subscriptionDesc" = "you can find your sub link on Details, also you can use the same name for several configurations" [pages.client] -"add" = "Add client" -"edit" = "Edit client" -"submitAdd" = "Add client" +"add" = "Add Client" +"edit" = "Edit Client" +"submitAdd" = "Add Client" "submitEdit" = "Save changes" -"clientCount" = "Number of clients" -"bulk" = "Add bulk" +"clientCount" = "Number of Clients" +"bulk" = "Add Bulk" "method" = "Method" "first" = "First" "last" = "Last" @@ -200,48 +201,48 @@ [pages.settings] "title" = "Settings" "save" = "Save" -"infoDesc" = "Every change here needs to be saved and restart panel to take effect" -"restartPanel" = "Restart Panel" -"restartPanelDesc" = "Are you sure you want to restart the panel? Click OK to restart after 3 seconds. If you cannot access the panel after restarting, please go to the server to view the panel log information" +"infoDesc" = "Every change made here needs to be saved. Please restart the panel for the changes to take effect." +"restartPanel" = "Restart Panel " +"restartPanelDesc" = "Are you sure you want to restart the panel? Click OK to restart after 3 seconds. If you cannot access the panel after restarting, please view the panel log information on the server." "resetDefaultConfig" = "Reset to default config" -"panelConfig" = "Panel Configuration" -"userSetting" = "User Setting" -"xrayConfiguration" = "xray Configuration" -"TGReminder" = "TG Reminder Related Settings" -"panelListeningIP" = "Panel listening IP" -"panelListeningIPDesc" = "Leave blank by default to monitor all IPs" +"panelConfig" = "Panel Configurations" +"userSettings" = "User Settings" +"xrayConfiguration" = "xray Configurations" +"TGBotSettings" = "Telegram Bot Settings" +"panelListeningIP" = "Panel Listening IP" +"panelListeningIPDesc" = "Leave blank by default to monitor all IPs." "panelPort" = "Panel Port" -"panelPortDesc" = "Port number for serving this panel" -"publicKeyPath" = "Panel certificate public key file path" +"panelPortDesc" = "Port number for serving the panel." +"publicKeyPath" = "Panel Certificate Public Key File Path" "publicKeyPathDesc" = "Fill in an absolute path starting with '/'" -"privateKeyPath" = "Panel certificate private key file path" +"privateKeyPath" = "Panel Certificate Private Key File Path" "privateKeyPathDesc" = "Fill in an absolute path starting with '/'" -"panelUrlPath" = "Panel url root path" +"panelUrlPath" = "Panel URL Root Path" "panelUrlPathDesc" = "Must start with '/' and end with '/'" "oldUsername" = "Current Username" "currentPassword" = "Current Password" "newUsername" = "New Username" "newPassword" = "New Password" -"telegramBotEnable" = "Enable telegram bot" -"telegramBotEnableDesc" = "Your telegram bot will interact with panel" +"telegramBotEnable" = "Enable Telegram bot" +"telegramBotEnableDesc" = "Your telegram bot will interact with the panel" "telegramToken" = "Telegram Token" -"telegramTokenDesc" = "The Token you have got from BotFather" -"telegramChatId" = "Telegram Admin ChatIds" -"telegramChatIdDesc" = "Multi chatIDs separated by comma" +"telegramTokenDesc" = "The Token you have got from @BotFather" +"telegramChatId" = "Telegram Admin ChatIDs" +"telegramChatIdDesc" = "Multi chatIDs separated by comma." "telegramNotifyTime" = "Telegram bot notification time" -"telegramNotifyTimeDesc" = "Using Crontab timing format" -"tgNotifyBackup" = "Database backup" -"tgNotifyBackupDesc" = "Sending database backup file with report notification" +"telegramNotifyTimeDesc" = "Use Crontab timing format." +"tgNotifyBackup" = "Database Backup" +"tgNotifyBackupDesc" = "Send database backup file with report notification" "sessionMaxAge" = "Session maximum age" "sessionMaxAgeDesc" = "The time that you can stay login (unit: minute)" -"expireTimeDiff" = "Exhaustion time threshold" -"expireTimeDiffDesc" = "Detect exhaustion before expiration (unit:day)" -"trafficDiff" = "Exhaustion traffic threshold" -"trafficDiffDesc" = "Detect exhaustion before finishing traffic (unit:GB)" +"expireTimeDiff" = "Expiration threshold for notification" +"expireTimeDiffDesc" = "Get notified about account expiration before the threshold (unit: day)" +"trafficDiff" = "Traffic threshold for notification" +"trafficDiffDesc" = "Get notified about traffic exhaustion before reaching the threshold (unit: GB)" "tgNotifyCpu" = "CPU percentage alert threshold" -"tgNotifyCpuDesc" = "This telegram bot will send you a notification if CPU usage is more than this percentage (unit:%)" +"tgNotifyCpuDesc" = "Receive notification if CPU usage exceeds this threshold (unit: %)" "timeZone" = "Time Zone" -"timeZoneDesc" = "The scheduled task runs according to the time in the time zone" +"timeZoneDesc" = "Scheduled tasks run according to the time in this time zone." [pages.settings.templates] "title" = "Templates" @@ -249,71 +250,71 @@ "advancedTemplate" = "Advanced Template" "completeTemplate" = "Complete Template" "generalConfigs" = "General Configs" -"generalConfigsDesc" = "These options will provide general adjustmets" +"generalConfigsDesc" = "These options will provide general adjustments." "blockConfigs" = "Blocking Configs" -"blockConfigsDesc" = "These options will prevent users from connecting to specific protocols and websites" +"blockConfigsDesc" = "These options will prevent users from connecting to specific protocols and websites." "countryConfigs" = "Country Configs" -"countryConfigsDesc" = "These options will configure connecting to specific country domains" +"countryConfigsDesc" = "These options will prevent users from connecting to specific country domains." "ipv4Configs" = "IPv4 Configs" -"ipv4ConfigsDesc" = "These options will route to target domains only via IPv4" +"ipv4ConfigsDesc" = "These options will route to target domains only via IPv4." "xrayConfigTemplate" = "Xray Configuration Template" -"xrayConfigTemplateDesc" = "Generate the final Xray configuration file based on this template" -"xrayConfigFreedomStrategy" = "Configure Freedom protocol's strategy" -"xrayConfigFreedomStrategyDesc" = "Set output strategy of network in freedom protocol" -"xrayConfigRoutingStrategy" = "Configure domain strategy of Routing" -"xrayConfigRoutingStrategyDesc" = "Set overall Routing strategy of DNS resolving" +"xrayConfigTemplateDesc" = "Generate the final Xray configuration file based on this template." +"xrayConfigFreedomStrategy" = "Configure Strategy for Freedom Protocol" +"xrayConfigFreedomStrategyDesc" = "Set the output strategy of the network in the Freedom Protocol." +"xrayConfigRoutingStrategy" = "Configure Domains Routing Strategy" +"xrayConfigRoutingStrategyDesc" = "Set the overall routing strategy for DNS resolving." "xrayConfigTorrent" = "Ban BitTorrent Usage" -"xrayConfigTorrentDesc" = "Change the configuration template to avoid using BitTorrent by users" +"xrayConfigTorrentDesc" = "Change the configuration template to avoid using BitTorrent by users." "xrayConfigPrivateIp" = "Ban Private IP Ranges to Connect" -"xrayConfigPrivateIpDesc" = "Change the configuration template to avoid connecting to private IP ranges" +"xrayConfigPrivateIpDesc" = "Change the configuration template to avoid connecting to private IP ranges." "xrayConfigAds" = "Block Ads" "xrayConfigAdsDesc" = "Change the configuration template to block ads" -"xrayConfigFamily" = "Enable Family friendly config" -"xrayConfigFamilyDesc" = "Avoid connecting to unsafe websites for family" +"xrayConfigFamily" = "Enable Family-Friendly Configuration" +"xrayConfigFamilyDesc" = "Avoid connecting to unsafe websites for family protection." "xrayConfigIRIp" = "Disable connection to Iran IP ranges" -"xrayConfigIRIpDesc" = "Change the configuration template to avoid connecting to Iran IP ranges" +"xrayConfigIRIpDesc" = "Change the configuration template to avoid connecting to Iran IP ranges." "xrayConfigIRDomain" = "Disable connection to Iran domains" -"xrayConfigIRDomainDesc" = "Change the configuration template to avoid connecting to Iran domains" +"xrayConfigIRDomainDesc" = "Change the configuration template to avoid connecting to Iran domains." "xrayConfigChinaIp" = "Disable connection to China IP ranges" -"xrayConfigChinaIpDesc" = "Change the configuration template to avoid connecting to China IP ranges" +"xrayConfigChinaIpDesc" = "Change the configuration template to avoid connecting to China IP ranges." "xrayConfigChinaDomain" = "Disable connection to China domains" -"xrayConfigChinaDomainDesc" = "Change the configuration template to avoid connecting to China domains" +"xrayConfigChinaDomainDesc" = "Change the configuration template to avoid connecting to China domains." "xrayConfigRussiaIp" = "Disable connection to Russia IP ranges" -"xrayConfigRussiaIpDesc" = "Change the configuration template to avoid connecting to Russia IP ranges" +"xrayConfigRussiaIpDesc" = "Change the configuration template to avoid connecting to Russia IP ranges." "xrayConfigRussiaDomain" = "Disable connection to Russia domains" -"xrayConfigRussiaDomainDesc" = "Change the configuration template to avoid connecting to Russia domains" +"xrayConfigRussiaDomainDesc" = "Change the configuration template to avoid connecting to Russia domains." "xrayConfigDirectIRIp" = "Direct connection to Iran IP ranges" -"xrayConfigDirectIRIpDesc" = "Change the configuration template for direct connecting to Iran IP ranges" +"xrayConfigDirectIRIpDesc" = "Change the configuration template for direct connecting to Iran IP ranges." "xrayConfigDirectIRDomain" = "Direct connection to Iran domains" -"xrayConfigDirectIRDomainDesc" = "Change the configuration template for direct connecting to Iran domains" +"xrayConfigDirectIRDomainDesc" = "Change the configuration template for direct connecting to Iran domains." "xrayConfigDirectChinaIp" = "Direct connection to China IP ranges" -"xrayConfigDirectChinaIpDesc" = "Change the configuration template for direct connecting to China IP ranges" +"xrayConfigDirectChinaIpDesc" = "Change the configuration template for direct connecting to China IP ranges." "xrayConfigDirectChinaDomain" = "Direct connection to China domains" -"xrayConfigDirectChinaDomainDesc" = "Change the configuration template for direct connecting to China domains" +"xrayConfigDirectChinaDomainDesc" = "Change the configuration template for direct connecting to China domains." "xrayConfigDirectRussiaIp" = "Direct connection to Russia IP ranges" -"xrayConfigDirectRussiaIpDesc" = "Change the configuration template for direct connecting to Russia IP ranges" +"xrayConfigDirectRussiaIpDesc" = "Change the configuration template for direct connecting to Russia IP ranges." "xrayConfigDirectRussiaDomain" = "Direct connection to Russia domains" -"xrayConfigDirectRussiaDomainDesc" = "Change the configuration template for direct connecting to Russia domains" +"xrayConfigDirectRussiaDomainDesc" = "Change the configuration template for direct connecting to Russia domains." "xrayConfigGoogleIPv4" = "Use IPv4 for Google" -"xrayConfigGoogleIPv4Desc" = "Add routing for Google to connect with IPv4" +"xrayConfigGoogleIPv4Desc" = "Add routing for Google to connect with IPv4." "xrayConfigNetflixIPv4" = "Use IPv4 for Netflix" -"xrayConfigNetflixIPv4Desc" = "Add routing for Netflix to connect with IPv4" +"xrayConfigNetflixIPv4Desc" = "Add routing for Netflix to connect with IPv4." "xrayConfigInbounds" = "Configuration of Inbounds" -"xrayConfigInboundsDesc" = "Change the configuration template to accept specific clients" +"xrayConfigInboundsDesc" = "Change the configuration template to accept specific clients." "xrayConfigOutbounds" = "Configuration of Outbounds" -"xrayConfigOutboundsDesc" = "Change the configuration template to define outgoing ways for this server" +"xrayConfigOutboundsDesc" = "Change the configuration template to define outgoing ways for this server." "xrayConfigRoutings" = "Configuration of routing rules" -"xrayConfigRoutingsDesc" = "Change the configuration template to define routing rules for this server" -"manualLists" = "Manual lists" -"manualListsDesc" = "PLease use JSON array format" -"manualBlockedIPs" = "List of blocked IPs" -"manualBlockedDomains" = "List of blocked domains" -"manualDirectIPs" = "List of direct IPs" -"manualDirectDomains" = "List of direct domains" +"xrayConfigRoutingsDesc" = "Change the configuration template to define routing rules for this server." +"manualLists" = "Manual Lists" +"manualListsDesc" = "Please use the JSON array format." +"manualBlockedIPs" = "List of Blocked IPs" +"manualBlockedDomains" = "List of Blocked Domains" +"manualDirectIPs" = "List of Direct IPs" +"manualDirectDomains" = "List of Direct Domains" [pages.settings.toasts] -"modifySetting" = "Modify setting" -"getSetting" = "Get setting" -"modifyUser" = "Modify user" -"originalUserPassIncorrect" = "The original user name or original password is incorrect" -"userPassMustBeNotEmpty" = "New username and new password cannot be empty" \ No newline at end of file +"modifySettings" = "Modify Settings " +"getSettings" = "Get Settings " +"modifyUser" = "Modify User " +"originalUserPassIncorrect" = "Incorrect original username or password" +"userPassMustBeNotEmpty" = "New username and new password cannot be empty" diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index 392da5ab..68a79b74 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -140,7 +140,7 @@ "clickOnQRcode" = "برای کپی بر روی کد تصویری کلیک کنید" "client" = "کاربر" "export" = "استخراج لینک‌ها" -"Clone" = "شبیه سازی" +"clone" = "شبیه سازی" "cloneInbound" = "ایجاد" "cloneInboundContent" = "همه موارد این ورودی بجز پورت ، ای پی و کلاینت ها شبیه سازی خواهند شد" "resetAllTraffic" = "ریست ترافیک کل سرویس ها" @@ -205,9 +205,9 @@ "restartPanelDesc" = "آیا مطمئن هستید که می خواهید پنل را دوباره راه اندازی کنید؟ برای راه اندازی مجدد روی OK کلیک کنید. اگر بعد از 3 ثانیه نمی توانید به پنل دسترسی پیدا کنید، لطفاً برای مشاهده اطلاعات گزارش پانل به سرور برگردید" "resetDefaultConfig" = "برگشت به تنظیمات پیشفرض" "panelConfig" = "تنظیمات پنل" -"userSetting" = "تنظیمات مدیر" +"userSettings" = "تنظیمات مدیر" "xrayConfiguration" = "تنظیمات Xray" -"TGReminder" = "تنظیمات ربات تلگرام" +"TGBotSettings" = "تنظیمات ربات تلگرام" "panelListeningIP" = "محدودیت آی پی پنل" "panelListeningIPDesc" = "برای استفاده از تمام آی‌پیها به طور پیش فرض خالی بگذارید" "panelPort" = "پورت پنل" @@ -312,8 +312,8 @@ "manualDirectDomains" = "لیست دامنه های مستقیم" [pages.settings.toasts] -"modifySetting" = "ویرایش تنظیمات" -"getSetting" = "دریافت تنظیمات" +"modifySettings" = "ویرایش تنظیمات" +"getSettings" = "دریافت تنظیمات" "modifyUser" = "ویرایش کاربر" "originalUserPassIncorrect" = "نام کاربری و رمز عبور فعلی اشتباه می باشد " "userPassMustBeNotEmpty" = "نام کاربری و رمز عبور جدید نمیتواند خالی باشد " \ No newline at end of file diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index f4d8548c..ba6d3058 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -205,9 +205,9 @@ "restartPanelDesc" = "Подтвердите рестарт панели? ОК для рестарта панели через 3 сек. Если вы не можете пользоваться панелью после рестарта, пожалуйста, посмотрите лог панели на сервере" "resetDefaultConfig" = "Сбросить всё по-умолчанию" "panelConfig" = "Настройки панели" -"userSetting" = "Настройки безопасности" +"userSettings" = "Настройки безопасности" "xrayConfiguration" = "Конфигурация Xray" -"TGReminder" = "Настройки Телеграм-бота" +"TGBotSettings" = "Настройки Телеграм-бота" "panelListeningIP" = "IP-порт панели" "panelListeningIPDesc" = "Оставьте пустым для работы с любого IP. Перезагрузите панель для применения настроек" "panelPort" = "Порт панели" diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index 7c48c34e..4e14ec08 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -140,7 +140,7 @@ "clickOnQRcode" = "点击二维码复制" "client" = "客户" "export" = "导出链接" -"Clone" = "克隆" +"clone" = "克隆" "cloneInbound" = "创造" "cloneInboundContent" = "此入站的所有项目除 Port、Listening IP、Clients 将应用于克隆" "resetAllTraffic" = "重置所有入站流量" @@ -205,9 +205,9 @@ "restartPanelDesc" = "确定要重启面板吗?点击确定将于 3 秒后重启,若重启后无法访问面板,请前往服务器查看面板日志信息" "resetDefaultConfig" = "重置为默认配置" "panelConfig" = "面板配置" -"userSetting" = "用户设置" +"userSettings" = "用户设置" "xrayConfiguration" = "xray 相关设置" -"TGReminder" = "TG提醒相关设置" +"TGBotSettings" = "TG提醒相关设置" "panelListeningIP" = "面板监听 IP" "panelListeningIPDesc" = "默认留空监听所有 IP" "panelPort" = "面板监听端口" @@ -314,8 +314,8 @@ "manualDirectDomains" = "直接域列表" [pages.settings.toasts] -"modifySetting" = "修改设置" -"getSetting" = "获取设置" +"modifySettings" = "修改设置" +"getSettings" = "获取设置" "modifyUser" = "修改用户" "originalUserPassIncorrect" = "原用户名或原密码错误" "userPassMustBeNotEmpty" = "新用户名和新密码不能为空" \ No newline at end of file From e01a3ac89358a2eaf61acda7f887552f62977083 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Tue, 16 May 2023 02:35:24 +0430 Subject: [PATCH 17/23] FIX settings.html --- web/html/xui/settings.html | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index 2bf40c0f..c66bf56b 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -598,7 +598,7 @@ }, torrentSettings: { get: function () { - return doAllItemsExist(this.settingsData.protocols.bittorrent, this.blockedProtocols); + return this.doAllItemsExist(this.settingsData.protocols.bittorrent, this.blockedProtocols); }, set: function (newValue) { if (newValue) { @@ -610,7 +610,7 @@ }, privateIpSettings: { get: function () { - return doAllItemsExist(this.settingsData.ips.local, this.blockedIPs); + return this.doAllItemsExist(this.settingsData.ips.local, this.blockedIPs); }, set: function (newValue) { if (newValue) { @@ -622,7 +622,7 @@ }, AdsSettings: { get: function () { - return doAllItemsExist(this.settingsData.domains.ads, this.blockedDomains); + return this.doAllItemsExist(this.settingsData.domains.ads, this.blockedDomains); }, set: function (newValue) { if (newValue) { @@ -635,7 +635,7 @@ familyProtectSettings: { get: function () { if (!this.templateSettings || !this.templateSettings.dns || !this.templateSettings.dns.servers) return false; - return doAllItemsExist(this.templateSettings.dns.servers, this.settingsData.familyProtectDNS.servers); + return this.doAllItemsExist(this.templateSettings.dns.servers, this.settingsData.familyProtectDNS.servers); }, set: function (newValue) { newTemplateSettings = this.templateSettings; @@ -649,7 +649,7 @@ }, GoogleIPv4Settings: { get: function () { - return doAllItemsExist(this.settingsData.domains.google, this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" })); + return this.doAllItemsExist(this.settingsData.domains.google, this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" })); }, set: function (newValue) { oldData = this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" }); @@ -668,7 +668,7 @@ }, NetflixIPv4Settings: { get: function () { - return doAllItemsExist(this.settingsData.domains.netflix, this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" })); + return this.doAllItemsExist(this.settingsData.domains.netflix, this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" })); }, set: function (newValue) { oldData = this.templateRuleGetter({ outboundTag: "IPv4", property: "domain" }); @@ -687,7 +687,7 @@ }, IRIpSettings: { get: function () { - return doAllItemsExist(this.settingsData.ips.ir, this.blockedIPs); + return this.doAllItemsExist(this.settingsData.ips.ir, this.blockedIPs); }, set: function (newValue) { if (newValue) { @@ -699,7 +699,7 @@ }, IRDomainSettings: { get: function () { - return doAllItemsExist(this.settingsData.domains.ir, this.blockedDomains); + return this.doAllItemsExist(this.settingsData.domains.ir, this.blockedDomains); }, set: function (newValue) { if (newValue) { @@ -711,7 +711,7 @@ }, ChinaIpSettings: { get: function () { - return doAllItemsExist(this.settingsData.ips.cn, this.blockedIPs); + return this.doAllItemsExist(this.settingsData.ips.cn, this.blockedIPs); }, set: function (newValue) { if (newValue) { @@ -723,7 +723,7 @@ }, ChinaDomainSettings: { get: function () { - return doAllItemsExist(this.settingsData.domains.cn, this.blockedDomains); + return this.doAllItemsExist(this.settingsData.domains.cn, this.blockedDomains); }, set: function (newValue) { if (newValue) { @@ -735,7 +735,7 @@ }, RussiaIpSettings: { get: function () { - return doAllItemsExist(this.settingsData.ips.ru, this.blockedIPs); + return this.doAllItemsExist(this.settingsData.ips.ru, this.blockedIPs); }, set: function (newValue) { if (newValue) { @@ -747,7 +747,7 @@ }, RussiaDomainSettings: { get: function () { - return doAllItemsExist(this.settingsData.domains.ru, this.blockedDomains); + return this.doAllItemsExist(this.settingsData.domains.ru, this.blockedDomains); }, set: function (newValue) { if (newValue) { @@ -759,7 +759,7 @@ }, IRIpDirectSettings: { get: function () { - return doAllItemsExist(this.settingsData.ips.ir, this.directIPs); + return this.doAllItemsExist(this.settingsData.ips.ir, this.directIPs); }, set: function (newValue) { if (newValue) { @@ -771,7 +771,7 @@ }, IRDomainDirectSettings: { get: function () { - return doAllItemsExist(this.settingsData.domains.ir, this.directDomains); + return this.doAllItemsExist(this.settingsData.domains.ir, this.directDomains); }, set: function (newValue) { if (newValue) { @@ -783,7 +783,7 @@ }, ChinaIpDirectSettings: { get: function () { - return doAllItemsExist(this.settingsData.ips.cn, this.directIPs); + return this.doAllItemsExist(this.settingsData.ips.cn, this.directIPs); }, set: function (newValue) { if (newValue) { @@ -795,7 +795,7 @@ }, ChinaDomainDirectSettings: { get: function () { - return doAllItemsExist(this.settingsData.domains.cn, this.directDomains); + return this.doAllItemsExist(this.settingsData.domains.cn, this.directDomains); }, set: function (newValue) { if (newValue) { @@ -807,7 +807,7 @@ }, RussiaIpDirectSettings: { get: function () { - return doAllItemsExist(this.settingsData.ips.ru, this.directIPs); + return this.doAllItemsExist(this.settingsData.ips.ru, this.directIPs); }, set: function (newValue) { if (newValue) { @@ -819,7 +819,7 @@ }, RussiaDomainDirectSettings: { get: function () { - return doAllItemsExist(this.settingsData.domains.ru, this.directDomains); + return this.doAllItemsExist(this.settingsData.domains.ru, this.directDomains); }, set: function (newValue) { if (newValue) { From a118bae9745717380695dcc2868d0115f7559faa Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Tue, 16 May 2023 02:49:09 +0430 Subject: [PATCH 18/23] Update translations --- web/translation/translate.en_US.toml | 2 +- web/translation/translate.fa_IR.toml | 2 +- web/translation/translate.ru_RU.toml | 9 ++++++--- web/translation/translate.zh_Hans.toml | 21 ++++++++++----------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml index 639a556e..34fd9d94 100644 --- a/web/translation/translate.en_US.toml +++ b/web/translation/translate.en_US.toml @@ -207,7 +207,7 @@ "resetDefaultConfig" = "Reset to default config" "panelConfig" = "Panel Configurations" "userSettings" = "User Settings" -"xrayConfiguration" = "xray Configurations" +"xrayConfiguration" = "Xray Configurations" "TGBotSettings" = "Telegram Bot Settings" "panelListeningIP" = "Panel Listening IP" "panelListeningIPDesc" = "Leave blank by default to monitor all IPs." diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml index 68a79b74..c6d9c6c2 100644 --- a/web/translation/translate.fa_IR.toml +++ b/web/translation/translate.fa_IR.toml @@ -316,4 +316,4 @@ "getSettings" = "دریافت تنظیمات" "modifyUser" = "ویرایش کاربر" "originalUserPassIncorrect" = "نام کاربری و رمز عبور فعلی اشتباه می باشد " -"userPassMustBeNotEmpty" = "نام کاربری و رمز عبور جدید نمیتواند خالی باشد " \ No newline at end of file +"userPassMustBeNotEmpty" = "نام کاربری و رمز عبور جدید نمیتواند خالی باشد " diff --git a/web/translation/translate.ru_RU.toml b/web/translation/translate.ru_RU.toml index ba6d3058..b7f530b7 100644 --- a/web/translation/translate.ru_RU.toml +++ b/web/translation/translate.ru_RU.toml @@ -129,7 +129,7 @@ "monitorDesc" = "Оставьте пустым по умолчанию" "meansNoLimit" = "Значит без ограничений" "totalFlow" = "Общий расход" -"leaveBlankToNeverExpire" = "Оставьте пустым = бессрочно" +"leaveBlankToNeverExpire" = "Оставьте пустым, чтобы никогда не истекать" "noRecommendKeepDefault" = "Нет требований для сохранения настроек по умолчанию" "certificatePath" = "Путь файла сертификата" "certificateContent" = "Содержимое файла сертификата" @@ -143,6 +143,7 @@ "clone" = "Клонировать" "cloneInbound" = "Клонировать пользователя" "cloneInboundContent" = "Все настройки этого пользователя, кроме порта, порт прослушки и клиентов, будут клонированы" +"cloneInboundOk" = "Клонировать" "resetAllTraffic" = "Обнулить весь траффик" "resetAllTrafficTitle" = "Обнуление всего траффика" "resetAllTrafficContent" = "Подтверждаете обнуление всего траффика пользователей?" @@ -250,6 +251,8 @@ "completeTemplate" = "Конфигурация шаблона" "generalConfigs" = "Основные настройки" "generalConfigsDesc" = "Эти параметры не позволят пользователям подключаться к определенным протоколам и веб-сайтам" +"blockConfigs" = "Блокировка конфигураций" +"blockConfigsDesc" = "Эти параметры не позволят пользователям подключаться к определенным протоколам и веб-сайтам." "countryConfigs" = "Настройки по гео" "countryConfigsDesc" = "Эти параметры не позволят пользователям подключаться к доменам определенной страны" "ipv4Configs" = "Настройки IPv4 " @@ -280,7 +283,7 @@ "xrayConfigRussiaIpDesc" = "Измените конфигурацию, чтобы отключить соединения с диапазонами IP-адресов России. Перезагрузите панель для применения настроек" "xrayConfigRussiaDomain" = "Отключить подключение к доменам России" "xrayConfigRussiaDomainDesc" = "Измените конфигурацию, чтобы избежать подключения к доменам России. Перезагрузите панель для применения настроек" -"xrayConfigDirectIRIP" = "Прямое подключение к диапазонам IP-адресов Ирана" +"xrayConfigDirectIRIp" = "Прямое подключение к диапазонам IP-адресов Ирана" "xrayConfigDirectIRIpDesc" = "Измените шаблон конфигурации для прямого подключения к диапазонам IP-адресов Ирана" "xrayConfigDirectIRDomain" = "Прямое подключение к доменам Ирана" "xrayConfigDirectIRDomainDesc" = "Измените шаблон конфигурации для прямого подключения к доменам Ирана" @@ -314,4 +317,4 @@ "getSettings" = "Просмотр настроек" "modifyUser" = "Изменение пользователя " "originalUserPassIncorrect" = "Неверное имя пользователя или пароль" -"userPassMustBeNotEmpty" = "Новое имя пользователя и новый пароль должны быть заполнены" \ No newline at end of file +"userPassMustBeNotEmpty" = "Новое имя пользователя и новый пароль должны быть заполнены" diff --git a/web/translation/translate.zh_Hans.toml b/web/translation/translate.zh_Hans.toml index 4e14ec08..2a903722 100644 --- a/web/translation/translate.zh_Hans.toml +++ b/web/translation/translate.zh_Hans.toml @@ -71,7 +71,7 @@ "title" = "系统状态" "memory" = "内存" "hard" = "硬盘" -"xrayStatus" = "xray 状态" +"xrayStatus" = "Xray 状态" "stopXray" = "停止" "restartXray" = "重启" "xraySwitch" = "切换版本" @@ -86,8 +86,8 @@ "downSpeed" = "所有网卡的总下载速度" "totalSent" = "系统启动以来所有网卡的总上传流量" "totalReceive" = "系统启动以来所有网卡的总下载流量" -"xraySwitchVersionDialog" = "切换 xray 版本" -"xraySwitchVersionDialogDesc" = "是否切换 xray 版本至" +"xraySwitchVersionDialog" = "切换 Xray 版本" +"xraySwitchVersionDialogDesc" = "是否切换 Xray 版本至" "dontRefresh" = "安装中,请不要刷新此页面" "logs" = "日志" "config" = "配置" @@ -143,6 +143,7 @@ "clone" = "克隆" "cloneInbound" = "创造" "cloneInboundContent" = "此入站的所有项目除 Port、Listening IP、Clients 将应用于克隆" +"cloneInboundOk" = "创造" "resetAllTraffic" = "重置所有入站流量" "resetAllTrafficTitle" = "重置所有入站流量" "resetAllTrafficContent" = "您确定要重置所有入站流量吗?" @@ -206,7 +207,7 @@ "resetDefaultConfig" = "重置为默认配置" "panelConfig" = "面板配置" "userSettings" = "用户设置" -"xrayConfiguration" = "xray 相关设置" +"xrayConfiguration" = "Xray 相关设置" "TGBotSettings" = "TG提醒相关设置" "panelListeningIP" = "面板监听 IP" "panelListeningIPDesc" = "默认留空监听所有 IP" @@ -252,14 +253,12 @@ "generalConfigsDesc" = "这些选项将提供一般调整" "blockConfigs" = "阻塞配置" "blockConfigsDesc" = "这些选项将阻止用户连接到特定协议和网站" -"directConfigs" = "直接配置" -"directConfigsDesc" = "这些选项将使用直接输出到特定的协议和网站" "countryConfigs" = "国家配置" "countryConfigsDesc" = "此选项将阻止用户连接到特定国家/地区的域" "ipv4Configs" = "IPv4 配置" "ipv4ConfigsDesc" = "此选项将仅通过 IPv4 路由到目标域" -"xrayConfigTemplate" = "xray 配置模板" -"xrayConfigTemplateDesc" = "以该模型为基础生成最终的xray配置文件,重新启动面板生成效率" +"xrayConfigTemplate" = "Xray 配置模板" +"xrayConfigTemplateDesc" = "以该模型为基础生成最终的Xray配置文件,重新启动面板生成效率" "xrayConfigFreedomStrategy" = "配置自由协议的策略" "xrayConfigFreedomStrategyDesc" = "在自由协议中设置网络输出策略" "xrayConfigRoutingStrategy" = "配置路由域策略" @@ -284,8 +283,8 @@ "xrayConfigRussiaIpDesc" = "修改配置模板避免连接俄罗斯IP范围" "xrayConfigRussiaDomain" = "禁止俄罗斯域连接" "xrayConfigRussiaDomainDesc" = "更改配置模板避免连接俄罗斯域" -"xrayConfigDirectIRIP" = "直接连接到伊朗 IP 范围" -"xrayConfigDirectIRIPDesc" = "更改直接连接到伊朗 IP 范围的配置模板" +"xrayConfigDirectIRIp" = "直接连接到伊朗 IP 范围" +"xrayConfigDirectIRIpDesc" = "更改直接连接到伊朗 IP 范围的配置模板" "xrayConfigDirectIRDomain" = "直接连接到伊朗域" "xrayConfigDirectIRDomainDesc" = "更改直接连接到伊朗域的配置模板" "xrayConfigDirectChinaIp" = "直连中国IP范围" @@ -318,4 +317,4 @@ "getSettings" = "获取设置" "modifyUser" = "修改用户" "originalUserPassIncorrect" = "原用户名或原密码错误" -"userPassMustBeNotEmpty" = "新用户名和新密码不能为空" \ No newline at end of file +"userPassMustBeNotEmpty" = "新用户名和新密码不能为空" From f3cdc35452dcbf0f5cad25c58aa3097e2351cc76 Mon Sep 17 00:00:00 2001 From: Hamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com> Date: Tue, 16 May 2023 03:39:35 +0430 Subject: [PATCH 19/23] fix inbounds.html --- web/html/xui/inbounds.html | 1707 ++++++++++++++++++------------------ 1 file changed, 840 insertions(+), 867 deletions(-) diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index c358fb09..e946a26a 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -14,904 +14,877 @@ - - {{ template "commonSider" . }} - - - - - - Please go to the panel settings as soon as possible to modify the username and password, - otherwise there may be a risk of leaking account information - - - - + + {{ template "commonSider" . }} + + + + + + Please go to the panel settings as soon as possible to modify the username and password, otherwise there may be a risk of leaking account information + + + + + + + {{ i18n "pages.inbounds.totalDownUp" }}: + [[ sizeFormat(total.up) ]] / [[ sizeFormat(total.down) ]] + + + {{ i18n "pages.inbounds.totalUsage" }}: + [[ sizeFormat(total.up + total.down) ]] + + + {{ i18n "pages.inbounds.inboundCount" }}: + [[ dbInbounds.length ]] + + + {{ i18n "clients" }}: + [[ total.clients ]] + + + [[ total.deactive.length ]] + + + + [[ total.depleted.length ]] + + + + [[ total.expiring.length ]] + + + + + + + +
- {{ i18n "pages.inbounds.totalDownUp" }}: - [[ sizeFormat(total.up) ]] / [[ sizeFormat(total.down) - ]] - - - {{ i18n "pages.inbounds.totalUsage" }}: - [[ sizeFormat(total.up + total.down) ]] - - - {{ i18n "pages.inbounds.inboundCount" }}: - [[ dbInbounds.length ]] - - - {{ i18n "clients" }}: - [[ total.clients ]] - - - [[ total.deactive.length ]] - - - - [[ total.depleted.length - ]] - - - - [[ total.expiring.length - ]] - - - - - - - -
- - - {{ i18n - "pages.inbounds.addInbound" }} - - {{ i18n "pages.inbounds.generalActions" - }} - - - - {{ i18n "pages.inbounds.export" }} - - - - {{ i18n "pages.inbounds.resetAllTraffic" }} - - - - {{ i18n "pages.inbounds.resetAllClientTraffics" }} - - - - {{ i18n "pages.inbounds.delDepletedClients" }} - - - - - - - [[ key - ]]s - - - - - -
- - -