mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-19 07:15:48 +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:
|
tags:
|
||||||
- "*"
|
- "*"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-18.04
|
||||||
outputs:
|
outputs:
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
steps:
|
steps:
|
||||||
@@ -23,7 +24,7 @@ jobs:
|
|||||||
linuxamd64build:
|
linuxamd64build:
|
||||||
name: build x-ui amd64 version
|
name: build x-ui amd64 version
|
||||||
needs: release
|
needs: release
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
@@ -63,7 +64,7 @@ jobs:
|
|||||||
linuxarm64build:
|
linuxarm64build:
|
||||||
name: build x-ui arm64 version
|
name: build x-ui arm64 version
|
||||||
needs: release
|
needs: release
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
@@ -105,7 +106,7 @@ jobs:
|
|||||||
linuxs390xbuild:
|
linuxs390xbuild:
|
||||||
name: build x-ui s390x version
|
name: build x-ui s390x version
|
||||||
needs: release
|
needs: release
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ RUN go build main.go
|
|||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
LABEL org.opencontainers.image.authors="alireza7@gmail.com"
|
LABEL org.opencontainers.image.authors="alireza7@gmail.com"
|
||||||
RUN apk add ca-certificates tzdata
|
|
||||||
ENV TZ=Asia/Tehran
|
ENV TZ=Asia/Tehran
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apk add ca-certificates tzdata && mkdir bin
|
||||||
COPY --from=builder /app/main /app/x-ui
|
COPY --from=builder /app/main /app/x-ui
|
||||||
COPY ./bin/. /app/bin/.
|
|
||||||
VOLUME [ "/etc/x-ui" ]
|
VOLUME [ "/etc/x-ui" ]
|
||||||
CMD [ "./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;
|
address = this.stream.tls.server;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
remark = this.settings.vmesses[clientIndex].email ?? remark;
|
|
||||||
let obj = {
|
let obj = {
|
||||||
v: '2',
|
v: '2',
|
||||||
ps: remark,
|
ps: remark,
|
||||||
@@ -976,7 +975,6 @@ class Inbound extends XrayCommonClass {
|
|||||||
const port = this.port;
|
const port = this.port;
|
||||||
const type = this.stream.network;
|
const type = this.stream.network;
|
||||||
const params = new Map();
|
const params = new Map();
|
||||||
remark = settings.vlesses[clientIndex].email ?? remark;
|
|
||||||
params.set("type", this.stream.network);
|
params.set("type", this.stream.network);
|
||||||
if (this.xtls) {
|
if (this.xtls) {
|
||||||
params.set("security", "xtls");
|
params.set("security", "xtls");
|
||||||
@@ -1061,16 +1059,27 @@ class Inbound extends XrayCommonClass {
|
|||||||
|
|
||||||
genTrojanLink(address='', remark='', clientIndex=0) {
|
genTrojanLink(address='', remark='', clientIndex=0) {
|
||||||
let settings = this.settings;
|
let settings = this.settings;
|
||||||
remark = settings.trojans[clientIndex].email ?? remark;
|
|
||||||
return `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}#${encodeURIComponent(remark)}`;
|
return `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}#${encodeURIComponent(remark)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
genLink(address='', remark='', clientIndex=0) {
|
genLink(address='', remark='', clientIndex=0) {
|
||||||
switch (this.protocol) {
|
switch (this.protocol) {
|
||||||
case Protocols.VMESS: return this.genVmessLink(address, remark, clientIndex);
|
case Protocols.VMESS:
|
||||||
case Protocols.VLESS: return this.genVLESSLink(address, remark, clientIndex);
|
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.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 '';
|
default: return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
<a-menu>
|
<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 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="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>
|
</a-menu>
|
||||||
</template>
|
</template>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</template>
|
</template>
|
||||||
<template slot="client" slot-scope="text, client">
|
<template slot="client" slot-scope="text, client">
|
||||||
[[ client.email ]]
|
[[ 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>
|
||||||
<template slot="traffic" slot-scope="text, client">
|
<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>
|
<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: {
|
watch: {
|
||||||
|
|||||||
@@ -1,48 +1,48 @@
|
|||||||
"username" = "username"
|
"username" = "Username"
|
||||||
"password" = "password"
|
"password" = "Password"
|
||||||
"login" = "login"
|
"login" = "Login"
|
||||||
"confirm" = "confirm"
|
"confirm" = "Confirm"
|
||||||
"cancel" = "cancel"
|
"cancel" = "Cancel"
|
||||||
"close" = "close"
|
"close" = "Close"
|
||||||
"copy" = "copy"
|
"copy" = "Copy"
|
||||||
"copied" = "copied"
|
"copied" = "Copied"
|
||||||
"download" = "download"
|
"download" = "Download"
|
||||||
"remark" = "remark"
|
"remark" = "Remark"
|
||||||
"enable" = "enable"
|
"enable" = "Enable"
|
||||||
"protocol" = "protocol"
|
"protocol" = "Protocol"
|
||||||
"search" = "search"
|
"search" = "Search"
|
||||||
|
|
||||||
"loading" = "Loading"
|
"loading" = "Loading"
|
||||||
"second" = "second"
|
"second" = "Second"
|
||||||
"minute" = "minute"
|
"minute" = "Minute"
|
||||||
"hour" = "hour"
|
"hour" = "Hour"
|
||||||
"day" = "day"
|
"day" = "Day"
|
||||||
"check" = "check"
|
"check" = "Check"
|
||||||
"indefinite" = "indefinite"
|
"indefinite" = "Indefinite"
|
||||||
"unlimited" = "unlimited"
|
"unlimited" = "Unlimited"
|
||||||
"none" = "none"
|
"none" = "None"
|
||||||
"qrCode" = "QR Code"
|
"qrCode" = "QR Code"
|
||||||
"info" = "More information"
|
"info" = "More information"
|
||||||
"edit" = "edit"
|
"edit" = "Edit"
|
||||||
"delete" = "delete"
|
"delete" = "Delete"
|
||||||
"reset" = "reset"
|
"reset" = "Reset"
|
||||||
"copySuccess" = "Copy successfully"
|
"copySuccess" = "Copy successfully"
|
||||||
"sure" = "Sure"
|
"sure" = "Sure"
|
||||||
"encryption" = "encryption"
|
"encryption" = "Encryption"
|
||||||
"transmission" = "transmission"
|
"transmission" = "Transmission"
|
||||||
"host" = "host"
|
"host" = "Host"
|
||||||
"path" = "path"
|
"path" = "Path"
|
||||||
"camouflage" = "camouflage"
|
"camouflage" = "Camouflage"
|
||||||
"enabled" = "enabled"
|
"enabled" = "Enabled"
|
||||||
"disabled" = "disabled"
|
"disabled" = "Disabled"
|
||||||
"domainName" = "domain name"
|
"domainName" = "Domain name"
|
||||||
"additional" = "alter"
|
"additional" = "Alter"
|
||||||
"monitor" = "Listen IP"
|
"monitor" = "Listen IP"
|
||||||
"certificate" = "certificat"
|
"certificate" = "Certificat"
|
||||||
"fail" = "fail"
|
"fail" = "Fail"
|
||||||
"success" = " success"
|
"success" = " Success"
|
||||||
"getVersion" = "get version"
|
"getVersion" = "Get version"
|
||||||
"install" = "install"
|
"install" = "Install"
|
||||||
"clients" = "Clients"
|
"clients" = "Clients"
|
||||||
"usage" = "Usage"
|
"usage" = "Usage"
|
||||||
|
|
||||||
@@ -66,9 +66,9 @@
|
|||||||
|
|
||||||
|
|
||||||
[pages.index]
|
[pages.index]
|
||||||
"title" = "system status"
|
"title" = "System status"
|
||||||
"memory" = "memory"
|
"memory" = "Memory"
|
||||||
"hard" = "hard disk"
|
"hard" = "Hard disk"
|
||||||
"xrayStatus" = "xray Status"
|
"xrayStatus" = "xray Status"
|
||||||
"xraySwitch" = "Switch Version"
|
"xraySwitch" = "Switch Version"
|
||||||
"xraySwitchClick" = "Click on the version you want to switch"
|
"xraySwitchClick" = "Click on the version you want to switch"
|
||||||
@@ -82,8 +82,8 @@
|
|||||||
"downSpeed" = "Total download speed for all network cards"
|
"downSpeed" = "Total download speed for all network cards"
|
||||||
"totalSent" = "Total upload traffic of all network cards since system startup"
|
"totalSent" = "Total upload traffic of all network cards since system startup"
|
||||||
"totalReceive" = "Total download traffic of all network cards since system startup"
|
"totalReceive" = "Total download traffic of all network cards since system startup"
|
||||||
"xraySwitchVersionDialog" = "switch xray version"
|
"xraySwitchVersionDialog" = "Switch xray version"
|
||||||
"xraySwitchVersionDialogDesc" = "whether to switch the xray version to"
|
"xraySwitchVersionDialogDesc" = "Whether to switch the xray version to"
|
||||||
"dontRefreshh" = "Installation is in progress, please do not refresh this page"
|
"dontRefreshh" = "Installation is in progress, please do not refresh this page"
|
||||||
|
|
||||||
|
|
||||||
@@ -92,17 +92,17 @@
|
|||||||
"totalDownUp" = "Total uploads/downloads"
|
"totalDownUp" = "Total uploads/downloads"
|
||||||
"totalUsage" = "Total usage"
|
"totalUsage" = "Total usage"
|
||||||
"inboundCount" = "Number of inbound"
|
"inboundCount" = "Number of inbound"
|
||||||
"operate" = "operate"
|
"operate" = "Operate"
|
||||||
"enable" = "enable"
|
"enable" = "Enable"
|
||||||
"remark" = "remark"
|
"remark" = "Remark"
|
||||||
"protocol" = "protocol"
|
"protocol" = "Protocol"
|
||||||
"port" = "port"
|
"port" = "Port"
|
||||||
"traffic" = "traffic"
|
"traffic" = "Traffic"
|
||||||
"details" = "details"
|
"details" = "Details"
|
||||||
"transportConfig" = "transport config"
|
"transportConfig" = "Transport config"
|
||||||
"expireDate" = "expire date"
|
"expireDate" = "Expire date"
|
||||||
"resetTraffic" = "reset traffic"
|
"resetTraffic" = "Reset traffic"
|
||||||
"addInbound" = "addInbound"
|
"addInbound" = "Add Inbound"
|
||||||
"addTo" = "Add To"
|
"addTo" = "Add To"
|
||||||
"revise" = "Revise"
|
"revise" = "Revise"
|
||||||
"modifyInbound" = "Modify InBound"
|
"modifyInbound" = "Modify InBound"
|
||||||
@@ -110,44 +110,44 @@
|
|||||||
"deleteInboundContent" = "Are you sure you want to delete inbound?"
|
"deleteInboundContent" = "Are you sure you want to delete inbound?"
|
||||||
"resetTrafficContent" = "Are you sure you want to reset traffic?"
|
"resetTrafficContent" = "Are you sure you want to reset traffic?"
|
||||||
"copyLink" = "Copy Link"
|
"copyLink" = "Copy Link"
|
||||||
"address" = "address"
|
"address" = "Address"
|
||||||
"network" = "network"
|
"network" = "Network"
|
||||||
"destinationPort" = "destination port"
|
"destinationPort" = "Destination port"
|
||||||
"targetAddress" = "target address"
|
"targetAddress" = "Target address"
|
||||||
"disableInsecureEncryption" = "Disable insecure encryption"
|
"disableInsecureEncryption" = "Disable insecure encryption"
|
||||||
"monitorDesc" = "Leave blank by default"
|
"monitorDesc" = "Leave blank by default"
|
||||||
"meansNoLimit" = "means no limit"
|
"meansNoLimit" = "Means no limit"
|
||||||
"totalFlow" = "total flow"
|
"totalFlow" = "Total flow"
|
||||||
"leaveBlankToNeverExpire" = "Leave blank to never expire"
|
"leaveBlankToNeverExpire" = "Leave blank to never expire"
|
||||||
"noRecommendKeepDefault" = "There are no special requirements to keep the default"
|
"noRecommendKeepDefault" = "There are no special requirements to keep the default"
|
||||||
"certificatePath" = "certificate file path"
|
"certificatePath" = "Certificate file path"
|
||||||
"certificateContent" = "certificate file content"
|
"certificateContent" = "Certificate file content"
|
||||||
"publicKeyPath" = "public key file path"
|
"publicKeyPath" = "Public key file path"
|
||||||
"publicKeyContent" = "public key content"
|
"publicKeyContent" = "Public key content"
|
||||||
"keyPath" = "key file path"
|
"keyPath" = "Key file path"
|
||||||
"keyContent" = "key content"
|
"keyContent" = "Key content"
|
||||||
"clickOnQRcode" = "click on QR Code to Copy"
|
"clickOnQRcode" = "Click on QR Code to Copy"
|
||||||
"client" = "Client"
|
"client" = "Client"
|
||||||
|
|
||||||
[pages.inbounds.toasts]
|
[pages.inbounds.toasts]
|
||||||
"obtain" = "Obtain"
|
"obtain" = "Obtain"
|
||||||
|
|
||||||
[pages.inbounds.stream.general]
|
[pages.inbounds.stream.general]
|
||||||
"requestHeader" = "request header"
|
"requestHeader" = "Request header"
|
||||||
"name" = "name"
|
"name" = "Name"
|
||||||
"value" = "value"
|
"value" = "Value"
|
||||||
|
|
||||||
[pages.inbounds.stream.tcp]
|
[pages.inbounds.stream.tcp]
|
||||||
"requestVersion" = "request version"
|
"requestVersion" = "Request version"
|
||||||
"requestMethod" = "request method"
|
"requestMethod" = "Request method"
|
||||||
"requestPath" = "request path"
|
"requestPath" = "Request path"
|
||||||
"responseVersion" = "response version"
|
"responseVersion" = "Response version"
|
||||||
"responseStatus" = "response status"
|
"responseStatus" = "Response status"
|
||||||
"responseStatusDescription" = "response status description"
|
"responseStatusDescription" = "Response status description"
|
||||||
"responseHeader" = "response header"
|
"responseHeader" = "Response header"
|
||||||
|
|
||||||
[pages.inbounds.stream.quic]
|
[pages.inbounds.stream.quic]
|
||||||
"encryption" = "encryption"
|
"encryption" = "Encryption"
|
||||||
|
|
||||||
|
|
||||||
[pages.setting]
|
[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"
|
"timeZoneDesc" = "The scheduled task runs according to the time in the time zone, and restarts the panel to take effect"
|
||||||
|
|
||||||
[pages.setting.toasts]
|
[pages.setting.toasts]
|
||||||
"modifySetting" = "modify setting"
|
"modifySetting" = "Modify setting"
|
||||||
"getSetting" = "get setting"
|
"getSetting" = "Get setting"
|
||||||
"modifyUser" = "modify user"
|
"modifyUser" = "Modify user"
|
||||||
"originalUserPassIncorrect" = "The original user name or original password is incorrect"
|
"originalUserPassIncorrect" = "The original user name or original password is incorrect"
|
||||||
"userPassMustBeNotEmpty" = "New username and new password cannot be empty"
|
"userPassMustBeNotEmpty" = "New username and new password cannot be empty"
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
"path" = "مسیر"
|
"path" = "مسیر"
|
||||||
"camouflage" = "استتار"
|
"camouflage" = "استتار"
|
||||||
"enabled" = "فعال"
|
"enabled" = "فعال"
|
||||||
"disabled" = "disabled"
|
"disabled" = "غیرفعال"
|
||||||
"domainName" = "آدرس دامنه"
|
"domainName" = "آدرس دامنه"
|
||||||
"additional" = "آی دی جایگزین"
|
"additional" = "آی دی جایگزین"
|
||||||
"monitor" = "آی پی اتصال"
|
"monitor" = "آی پی اتصال"
|
||||||
|
|||||||
Reference in New Issue
Block a user