diff --git a/Dockerfile b/Dockerfile
index 061c4323..3d826a01 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,10 +7,10 @@ RUN go build main.go
FROM alpine
LABEL org.opencontainers.image.authors="alireza7@gmail.com"
-RUN apk add ca-certificates tzdata
ENV TZ=Asia/Tehran
WORKDIR /app
+
+RUN apk add ca-certificates tzdata && mkdir bin
COPY --from=builder /app/main /app/x-ui
-COPY ./bin/. /app/bin/.
VOLUME [ "/etc/x-ui" ]
CMD [ "./x-ui" ]
\ No newline at end of file
diff --git a/config/version b/config/version
index 0ea3a944..0c62199f 100644
--- a/config/version
+++ b/config/version
@@ -1 +1 @@
-0.2.0
+0.2.1
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index b18914b1..2304bb97 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -952,8 +952,7 @@ class Inbound extends XrayCommonClass {
address = this.stream.tls.server;
}
}
-
- remark = this.settings.vmesses[clientIndex].email ?? remark;
+
let obj = {
v: '2',
ps: remark,
@@ -976,7 +975,6 @@ class Inbound extends XrayCommonClass {
const port = this.port;
const type = this.stream.network;
const params = new Map();
- remark = settings.vlesses[clientIndex].email ?? remark;
params.set("type", this.stream.network);
if (this.xtls) {
params.set("security", "xtls");
@@ -1061,16 +1059,27 @@ class Inbound extends XrayCommonClass {
genTrojanLink(address='', remark='', clientIndex=0) {
let settings = this.settings;
- remark = settings.trojans[clientIndex].email ?? remark;
return `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}#${encodeURIComponent(remark)}`;
}
genLink(address='', remark='', clientIndex=0) {
switch (this.protocol) {
- case Protocols.VMESS: return this.genVmessLink(address, remark, clientIndex);
- case Protocols.VLESS: return this.genVLESSLink(address, remark, clientIndex);
+ case Protocols.VMESS:
+ if (this.settings.vmesses[clientIndex].email != ""){
+ remark += '-' + this.settings.vmesses[clientIndex].email
+ }
+ return this.genVmessLink(address, remark, clientIndex);
+ case Protocols.VLESS:
+ if (this.settings.vlesses[clientIndex].email != ""){
+ remark += '-' + this.settings.vlesses[clientIndex].email
+ }
+ return this.genVLESSLink(address, remark, clientIndex);
case Protocols.SHADOWSOCKS: return this.genSSLink(address, remark);
- case Protocols.TROJAN: return this.genTrojanLink(address, remark, clientIndex);
+ case Protocols.TROJAN:
+ if (this.settings.trojans[clientIndex].email != ""){
+ remark += '-' + this.settings.trojans[clientIndex].email
+ }
+ return this.genTrojanLink(address, remark, clientIndex);
default: return '';
}
}
diff --git a/web/html/xui/inbound_client_table.html b/web/html/xui/inbound_client_table.html
index 5eed94bb..d17a2692 100644
--- a/web/html/xui/inbound_client_table.html
+++ b/web/html/xui/inbound_client_table.html
@@ -6,14 +6,14 @@
{{ i18n "qrCode" }}
{{ i18n "info" }}
- {{ i18n "pages.inbounds.resetTraffic" }}
+ {{ i18n "pages.inbounds.resetTraffic" }}
[[ client.email ]]
- expired
+ {{ i18n "disabled" }}
{{ i18n "usage" }}: [[ sizeFormat(getUpStats(record, client.email) + getDownStats(record, client.email)) ]]
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index c941e31d..2b93e5c0 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -475,6 +475,9 @@
}
}
}
+ else{
+ return true
+ }
},
},
watch: {
diff --git a/web/translation/translate.en_US.toml b/web/translation/translate.en_US.toml
index 8206ff81..4642910a 100644
--- a/web/translation/translate.en_US.toml
+++ b/web/translation/translate.en_US.toml
@@ -1,48 +1,48 @@
-"username" = "username"
-"password" = "password"
-"login" = "login"
-"confirm" = "confirm"
-"cancel" = "cancel"
-"close" = "close"
-"copy" = "copy"
-"copied" = "copied"
-"download" = "download"
-"remark" = "remark"
-"enable" = "enable"
-"protocol" = "protocol"
-"search" = "search"
+"username" = "Username"
+"password" = "Password"
+"login" = "Login"
+"confirm" = "Confirm"
+"cancel" = "Cancel"
+"close" = "Close"
+"copy" = "Copy"
+"copied" = "Copied"
+"download" = "Download"
+"remark" = "Remark"
+"enable" = "Enable"
+"protocol" = "Protocol"
+"search" = "Search"
"loading" = "Loading"
-"second" = "second"
-"minute" = "minute"
-"hour" = "hour"
-"day" = "day"
-"check" = "check"
-"indefinite" = "indefinite"
-"unlimited" = "unlimited"
-"none" = "none"
+"second" = "Second"
+"minute" = "Minute"
+"hour" = "Hour"
+"day" = "Day"
+"check" = "Check"
+"indefinite" = "Indefinite"
+"unlimited" = "Unlimited"
+"none" = "None"
"qrCode" = "QR Code"
"info" = "More information"
-"edit" = "edit"
-"delete" = "delete"
-"reset" = "reset"
+"edit" = "Edit"
+"delete" = "Delete"
+"reset" = "Reset"
"copySuccess" = "Copy successfully"
"sure" = "Sure"
-"encryption" = "encryption"
-"transmission" = "transmission"
-"host" = "host"
-"path" = "path"
-"camouflage" = "camouflage"
-"enabled" = "enabled"
-"disabled" = "disabled"
-"domainName" = "domain name"
-"additional" = "alter"
+"encryption" = "Encryption"
+"transmission" = "Transmission"
+"host" = "Host"
+"path" = "Path"
+"camouflage" = "Camouflage"
+"enabled" = "Enabled"
+"disabled" = "Disabled"
+"domainName" = "Domain name"
+"additional" = "Alter"
"monitor" = "Listen IP"
-"certificate" = "certificat"
-"fail" = "fail"
-"success" = " success"
-"getVersion" = "get version"
-"install" = "install"
+"certificate" = "Certificat"
+"fail" = "Fail"
+"success" = " Success"
+"getVersion" = "Get version"
+"install" = "Install"
"clients" = "Clients"
"usage" = "Usage"
@@ -66,9 +66,9 @@
[pages.index]
-"title" = "system status"
-"memory" = "memory"
-"hard" = "hard disk"
+"title" = "System status"
+"memory" = "Memory"
+"hard" = "Hard disk"
"xrayStatus" = "xray Status"
"xraySwitch" = "Switch Version"
"xraySwitchClick" = "Click on the version you want to switch"
@@ -82,8 +82,8 @@
"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"
+"xraySwitchVersionDialog" = "Switch xray version"
+"xraySwitchVersionDialogDesc" = "Whether to switch the xray version to"
"dontRefreshh" = "Installation is in progress, please do not refresh this page"
@@ -92,17 +92,17 @@
"totalDownUp" = "Total uploads/downloads"
"totalUsage" = "Total usage"
"inboundCount" = "Number of inbound"
-"operate" = "operate"
-"enable" = "enable"
-"remark" = "remark"
-"protocol" = "protocol"
-"port" = "port"
-"traffic" = "traffic"
-"details" = "details"
-"transportConfig" = "transport config"
-"expireDate" = "expire date"
-"resetTraffic" = "reset traffic"
-"addInbound" = "addInbound"
+"operate" = "Operate"
+"enable" = "Enable"
+"remark" = "Remark"
+"protocol" = "Protocol"
+"port" = "Port"
+"traffic" = "Traffic"
+"details" = "Details"
+"transportConfig" = "Transport config"
+"expireDate" = "Expire date"
+"resetTraffic" = "Reset traffic"
+"addInbound" = "Add Inbound"
"addTo" = "Add To"
"revise" = "Revise"
"modifyInbound" = "Modify InBound"
@@ -110,44 +110,44 @@
"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"
+"address" = "Address"
+"network" = "Network"
+"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"
-"clickOnQRcode" = "click on QR Code to Copy"
+"certificatePath" = "Certificate file path"
+"certificateContent" = "Certificate file content"
+"publicKeyPath" = "Public key file path"
+"publicKeyContent" = "Public key content"
+"keyPath" = "Key file path"
+"keyContent" = "Key content"
+"clickOnQRcode" = "Click on QR Code to Copy"
"client" = "Client"
[pages.inbounds.toasts]
"obtain" = "Obtain"
[pages.inbounds.stream.general]
-"requestHeader" = "request header"
-"name" = "name"
-"value" = "value"
+"requestHeader" = "Request header"
+"name" = "Name"
+"value" = "Value"
[pages.inbounds.stream.tcp]
-"requestVersion" = "request version"
-"requestMethod" = "request method"
-"requestPath" = "request path"
-"responseVersion" = "response version"
-"responseStatus" = "response status"
-"responseStatusDescription" = "response status description"
-"responseHeader" = "response header"
+"requestVersion" = "Request version"
+"requestMethod" = "Request method"
+"requestPath" = "Request path"
+"responseVersion" = "Response version"
+"responseStatus" = "Response status"
+"responseStatusDescription" = "Response status description"
+"responseHeader" = "Response header"
[pages.inbounds.stream.quic]
-"encryption" = "encryption"
+"encryption" = "Encryption"
[pages.setting]
@@ -188,8 +188,8 @@
"timeZoneDesc" = "The scheduled task runs according to the time in the time zone, and restarts the panel to take effect"
[pages.setting.toasts]
-"modifySetting" = "modify setting"
-"getSetting" = "get setting"
-"modifyUser" = "modify user"
+"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
diff --git a/web/translation/translate.fa_IR.toml b/web/translation/translate.fa_IR.toml
index d1184ba7..3085bc8f 100644
--- a/web/translation/translate.fa_IR.toml
+++ b/web/translation/translate.fa_IR.toml
@@ -34,7 +34,7 @@
"path" = "مسیر"
"camouflage" = "استتار"
"enabled" = "فعال"
-"disabled" = "disabled"
+"disabled" = "غیرفعال"
"domainName" = "آدرس دامنه"
"additional" = "آی دی جایگزین"
"monitor" = "آی پی اتصال"