Skip to content

Commit

Permalink
v1.5.4
Browse files Browse the repository at this point in the history
Plus some fixes and decoration
  • Loading branch information
alireza0 committed Aug 26, 2023
1 parent da5253d commit a619952
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
go-version: '1.20'
- name: build linux amd64 version
run: |
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o xui-release -v main.go
Expand Down
2 changes: 1 addition & 1 deletion config/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.3
1.5.4
5 changes: 3 additions & 2 deletions web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ class SockoptStreamSettings extends XrayCommonClass {
}

static fromJson(json = {}) {
if (Object.keys(json).length === 0) return undefined;
return new SockoptStreamSettings(
json.acceptProxyProtocol,
json.tcpFastOpen,
Expand Down Expand Up @@ -1458,10 +1459,10 @@ class Inbound extends XrayCommonClass {
JSON.parse(this.settings).clients.forEach((client,index) => {
if(this.tls && !ObjectUtil.isArrEmpty(this.stream.tls.settings.domains)){
this.stream.tls.settings.domains.forEach((domain) => {
link += this.genLink(domain.domain, remark + '-' + client.email + '-' + domain.remark, index) + '\r\n';
link += this.genLink(domain.domain, [remark, client.email, domain.remark].filter(x => x.length > 0).join('-'), index) + '\r\n';
});
} else {
link += this.genLink(address, remark + '-' + client.email, index) + '\r\n';
link += this.genLink(address, [remark, client.email].filter(x => x.length > 0).join('-'), index) + '\r\n';
}
});
return link;
Expand Down
7 changes: 4 additions & 3 deletions web/html/common/qrcode_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@
this.inbound = dbInbound.toInbound();
settings = JSON.parse(this.inbound.settings);
this.client = settings.clients[clientIndex];
remark = this.dbInbound.remark + ( this.client ? "-" + this.client.email : '');
remark = [this.dbInbound.remark, ( this.client ? this.client.email : '')].filter(Boolean).join('-');
address = this.dbInbound.address;
this.subId = '';
this.qrcodes = [];
if (this.inbound.tls && !ObjectUtil.isArrEmpty(this.inbound.stream.tls.settings.domains)) {
this.inbound.stream.tls.settings.domains.forEach((domain) => {
remarkText = [remark, domain.remark].filter(Boolean).join('-');
this.qrcodes.push({
remark: remark + "-" + domain.remark,
link: this.inbound.genLink(domain.domain, remark + "-" + domain.remark, clientIndex)
remark: remarkText,
link: this.inbound.genLink(domain.domain, remarkText, clientIndex)
});
});
} else {
Expand Down
2 changes: 2 additions & 0 deletions web/html/xui/form/sniffing.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{define "form/sniffing"}}
<a-form layout="inline">
<a-divider dashed style="margin:0;">
<a-form-item>
<span slot="label">
sniffing
Expand All @@ -12,6 +13,7 @@
</span>
<a-switch v-model="inbound.sniffing.enabled"></a-switch>
</a-form-item>
</a-divider>
<a-form-item>
<a-checkbox-group v-model="inbound.sniffing.destOverride" v-if="inbound.sniffing.enabled">
<a-checkbox v-for="key,value in SNIFFING_OPTION" :value="key">[[ value ]]</a-checkbox>
Expand Down
2 changes: 2 additions & 0 deletions web/html/xui/form/stream/stream_settings.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{define "form/streamSettings"}}
<!-- select stream network -->
<a-form layout="inline">
<a-divider dashed style="margin:0;">
<a-form-item label="{{ i18n "transmission" }}">
<a-select v-model="inbound.stream.network" @change="streamNetworkChange"
:dropdown-class-name="themeSwitcher.darkCardClass">
Expand All @@ -12,6 +13,7 @@
<a-select-option value="grpc">grpc</a-select-option>
</a-select>
</a-form-item>
</a-divider>
</a-form>

<!-- tcp -->
Expand Down
2 changes: 2 additions & 0 deletions web/html/xui/form/stream/stream_sockopt.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{define "form/streamSockopt"}}
<a-form layout="inline">
<a-divider dashed style="margin:0;">
<a-form-item label="Transparent Proxy">
<a-switch v-model="inbound.stream.sockoptSwitch"></a-switch>
</a-form-item>
</a-divider>
<table width="100%" class="ant-table-tbody" v-if="inbound.stream.sockoptSwitch">
<tr>
<td>Accept Proxy Protocol</td>
Expand Down
2 changes: 2 additions & 0 deletions web/html/xui/form/tls_settings.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{{define "form/tlsSettings"}}
<!-- tls enable -->
<a-form v-if="inbound.canSetTls()" layout="inline">
<a-divider dashed style="margin:0;">
<a-form-item label="TLS">
<a-switch v-model="inbound.tls">
</a-switch>
</a-form-item>
<a-form-item v-if="inbound.canEnableReality()" label="Reality">
<a-switch v-model="inbound.reality"></a-switch>
</a-form-item>
</a-divider>
</a-form>

<!-- tls settings -->
Expand Down
7 changes: 4 additions & 3 deletions web/html/xui/inbound_info_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,15 @@
this.clientSettings = this.settings.clients ? Object.values(this.settings.clients)[index] : null;
this.isExpired = this.inbound.isExpiry(index);
this.clientStats = this.settings.clients ? this.dbInbound.clientStats.find(row => row.email === this.clientSettings.email) : [];
remark = this.dbInbound.remark + ( this.clientSettings ? "-" + this.clientSettings.email : '');
remark = [this.dbInbound.remark, ( this.clientSettings ? this.clientSettings.email : '')].filter(Boolean).join('-');
address = this.dbInbound.address;
this.links = [];
if (this.inbound.tls && !ObjectUtil.isArrEmpty(this.inbound.stream.tls.settings.domains)) {
this.inbound.stream.tls.settings.domains.forEach((domain) => {
remarkText = [remark, domain.remark].filter(Boolean).join('-');
this.links.push({
remark: remark + "-" + domain.remark,
link: this.inbound.genLink(domain.domain, remark + "-" + domain.remark, index)
remark: remarkText,
link: this.inbound.genLink(domain.domain, remarkText, index)
});
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion web/html/xui/inbound_modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
if (this.inModal.inbound.settings.shadowsockses.length ==0){
this.inModal.inbound.settings.shadowsockses = [new Inbound.ShadowsocksSettings.Shadowsocks()];
}
if (["aes-128-gcm", "aes-256-gcm", "chacha20-poly1305", "xchacha20-poly1305"].includes(this.inModal.inbound.settings.method)) {
if (!this.inModal.inbound.isSS2022) {
this.inModal.inbound.settings.shadowsockses.forEach(client => {
client.method = this.inModal.inbound.settings.method;
})
Expand Down

0 comments on commit a619952

Please sign in to comment.