Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei authored and alireza0 committed Dec 11, 2023
1 parent 24ef749 commit a2343d2
Show file tree
Hide file tree
Showing 13 changed files with 393 additions and 422 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS builder
WORKDIR /app
ARG TARGETARCH
ENV CGO_ENABLED=1
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"

RUN apk --no-cache --update add \
build-base \
Expand Down
2 changes: 1 addition & 1 deletion sub/subService.go
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ func (s *SubService) genRemark(inbound *model.Inbound, email string, extra strin
orders['i'] = inbound.Remark
}
if len(extra) > 0 {
orders['e'] = extra
orders['o'] = extra
}

var remark []string
Expand Down
4 changes: 0 additions & 4 deletions web/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ style attribute {
overflow-x: auto !important;
}

tr.ant-table-expanded-row td>.ant-table-wrapper {
margin: -12px -16px -13px;
}

.ant-card-hoverable {
cursor: auto;
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion web/assets/js/model/dbinbound.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class DBInbound {
}
}

genInboundLinks() {
genInboundLinks(remarkModel) {
const inbound = this.toInbound();
return inbound.genInboundLinks(this.remark,remarkModel);
}
Expand Down
28 changes: 13 additions & 15 deletions web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ class TlsStreamSettings extends XrayCommonClass {
alpn=[ALPN_OPTION.HTTP1,ALPN_OPTION.H2],
settings=new TlsStreamSettings.Settings()) {
super();
this.server = serverName;
this.sni = serverName;
this.minVersion = minVersion;
this.maxVersion = maxVersion;
this.cipherSuites = cipherSuites;
Expand Down Expand Up @@ -519,7 +519,7 @@ class TlsStreamSettings extends XrayCommonClass {

toJson() {
return {
serverName: this.server,
serverName: this.sni,
minVersion: this.minVersion,
maxVersion: this.maxVersion,
cipherSuites: this.cipherSuites,
Expand Down Expand Up @@ -1080,7 +1080,7 @@ class Inbound extends XrayCommonClass {
}

get serverName() {
if (this.stream.isTls) return this.stream.tls.server;
if (this.stream.isTls) return this.stream.tls.sni;
if (this.stream.isXtls) return this.stream.xtls.server;
if (this.stream.isReality) return this.stream.reality.serverNames;
return "";
Expand Down Expand Up @@ -1233,7 +1233,7 @@ class Inbound extends XrayCommonClass {

if (security === 'tls') {
if (!ObjectUtil.isEmpty(this.stream.tls.sni)){
obj.sni = this.stream.tls.server;
obj.sni = this.stream.tls.sni;
}
if (!ObjectUtil.isEmpty(this.stream.tls.settings.fingerprint)){
obj.fp = this.stream.tls.settings.fingerprint;
Expand Down Expand Up @@ -1311,8 +1311,8 @@ class Inbound extends XrayCommonClass {
if(this.stream.tls.settings.allowInsecure){
params.set("allowInsecure", "1");
}
if (!ObjectUtil.isEmpty(this.stream.tls.server)){
params.set("sni", this.stream.tls.server);
if (!ObjectUtil.isEmpty(this.stream.tls.sni)){
params.set("sni", this.stream.tls.sni);
}
if (type == "tcp" && !ObjectUtil.isEmpty(flow)) {
params.set("flow", flow);
Expand Down Expand Up @@ -1425,8 +1425,8 @@ class Inbound extends XrayCommonClass {
if(this.stream.tls.settings.allowInsecure){
params.set("allowInsecure", "1");
}
if (!ObjectUtil.isEmpty(this.stream.tls.server)){
params.set("sni", this.stream.tls.server);
if (!ObjectUtil.isEmpty(this.stream.tls.sni)){
params.set("sni", this.stream.tls.sni);
}
}
}
Expand Down Expand Up @@ -1506,8 +1506,8 @@ class Inbound extends XrayCommonClass {
if(this.stream.tls.settings.allowInsecure){
params.set("allowInsecure", "1");
}
if (!ObjectUtil.isEmpty(this.stream.tls.server)){
params.set("sni", this.stream.tls.server);
if (!ObjectUtil.isEmpty(this.stream.tls.sni)){
params.set("sni", this.stream.tls.sni);
}
}
}
Expand Down Expand Up @@ -1601,7 +1601,7 @@ class Inbound extends XrayCommonClass {
if(this.clients){
let links = [];
this.clients.forEach((client) => {
genAllLinks(remark,remarkModel,client).forEach(l => {
this.genAllLinks(remark,remarkModel,client).forEach(l => {
links.push(l.link);
})
});
Expand Down Expand Up @@ -1797,8 +1797,7 @@ Inbound.VLESSSettings = class extends Inbound.Settings {
Protocols.VLESS,
json.clients.map(client => Inbound.VLESSSettings.VLESS.fromJson(client)),
json.decryption || 'none',
json.fallbacks.map(fallback => Inbound.VLESSSettings.Fallback.fromJson(fallback)),
);
Inbound.VLESSSettings.Fallback.fromJson(json.fallbacks),);
}

toJson() {
Expand Down Expand Up @@ -1925,8 +1924,7 @@ Inbound.TrojanSettings = class extends Inbound.Settings {
return new Inbound.TrojanSettings(
Protocols.TROJAN,
json.clients.map(client => Inbound.TrojanSettings.Trojan.fromJson(client)),
json.fallbacks.map(fallback => Inbound.TrojanSettings.Fallback.fromJson(fallback))
);
Inbound.TrojanSettings.Fallback.fromJson(json.fallbacks),);
}

toJson() {
Expand Down
12 changes: 6 additions & 6 deletions web/html/xui/inbounds.html
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,11 @@
</template>
<template slot="expandedRowRender" slot-scope="record">
<a-table
:row-key="client => client.id"
:columns="isMobile ? innerMobileColumns : innerColumns"
:data-source="getInboundClients(record)"
:pagination=pagination(getInboundClients(record))
:style="isMobile ? 'margin: -12px -5px -13px;' : 'margin-left: 10px;'">
:row-key="client => client.id"
:columns="isMobile ? innerMobileColumns : innerColumns"
:data-source="getInboundClients(record)"
:pagination=pagination(getInboundClients(record))
style="margin: -12px -6px -13px;">
{{template "client_table"}}
</a-table>
</template>
Expand Down Expand Up @@ -1175,7 +1175,7 @@
inboundLinks(dbInboundId) {
dbInbound = this.dbInbounds.find(row => row.id === dbInboundId);
newDbInbound = this.checkFallback(dbInbound);
txtModal.show('{{ i18n "pages.inbounds.export"}}', newDbInbound.genInboundLinks, newDbInbound.remark);
txtModal.show('{{ i18n "pages.inbounds.export"}}', newDbInbound.genInboundLinks(), newDbInbound.remark);
},
importInbound() {
promptModal.open({
Expand Down
Loading

0 comments on commit a2343d2

Please sign in to comment.