mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-15 05:36:09 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7225f00c2b | ||
|
|
85db586d95 | ||
|
|
2d7663f971 | ||
|
|
c935014ba9 | ||
|
|
2c61b5a426 | ||
|
|
a5cfe4fc1e | ||
|
|
3cc3b3b04d | ||
|
|
8e550bc308 |
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -4,9 +4,10 @@ on:
|
||||
tags:
|
||||
- "*"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-18.04
|
||||
outputs:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
steps:
|
||||
@@ -23,7 +24,7 @@ jobs:
|
||||
linuxamd64build:
|
||||
name: build x-ui amd64 version
|
||||
needs: release
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Go
|
||||
@@ -63,7 +64,7 @@ jobs:
|
||||
linuxarm64build:
|
||||
name: build x-ui arm64 version
|
||||
needs: release
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Go
|
||||
@@ -105,7 +106,7 @@ jobs:
|
||||
linuxs390xbuild:
|
||||
name: build x-ui s390x version
|
||||
needs: release
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Go
|
||||
|
||||
@@ -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" ]
|
||||
@@ -1 +1 @@
|
||||
0.2.0
|
||||
0.2.1
|
||||
|
||||
@@ -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 '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<a-menu>
|
||||
<a-menu-item v-if="record.hasLink()" @click="showQrcode(record,index);"><a-icon type="qrcode"></a-icon>{{ i18n "qrCode" }}</a-menu-item>
|
||||
<a-menu-item @click="showInfo(record,index);"><a-icon type="info-circle"></a-icon>{{ i18n "info" }}</a-menu-item>
|
||||
<a-menu-item @click="resetClientTraffic(client,record,$event)"><a-icon type="retweet"></a-icon>{{ i18n "pages.inbounds.resetTraffic" }}</a-menu-item>
|
||||
<a-menu-item @click="resetClientTraffic(client,record,$event)" v-if="client.email != ''"><a-icon type="retweet"></a-icon>{{ i18n "pages.inbounds.resetTraffic" }}</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<template slot="client" slot-scope="text, client">
|
||||
[[ client.email ]]
|
||||
<a-tag v-if="!isClientEnabled(record, client.email)" color="red"> expired</a-tag>
|
||||
<a-tag v-if="!isClientEnabled(record, client.email)" color="red">{{ i18n "disabled" }}</a-tag>
|
||||
</template>
|
||||
<template slot="traffic" slot-scope="text, client">
|
||||
<a-tag v-if="client._totalGB === 0" color="blue">{{ i18n "usage" }}: [[ sizeFormat(getUpStats(record, client.email) + getDownStats(record, client.email)) ]]</a-tag>
|
||||
|
||||
@@ -475,6 +475,9 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
return true
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -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"
|
||||
@@ -34,7 +34,7 @@
|
||||
"path" = "مسیر"
|
||||
"camouflage" = "استتار"
|
||||
"enabled" = "فعال"
|
||||
"disabled" = "disabled"
|
||||
"disabled" = "غیرفعال"
|
||||
"domainName" = "آدرس دامنه"
|
||||
"additional" = "آی دی جایگزین"
|
||||
"monitor" = "آی پی اتصال"
|
||||
|
||||
Reference in New Issue
Block a user