From fbb6d6e364514638d0c4ca695e17da50694dc484 Mon Sep 17 00:00:00 2001 From: EtoneYang Date: Thu, 18 Apr 2024 23:22:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=AF=E5=8F=A3=E9=85=8D=E7=BD=AE=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=BC=80=E5=A7=8B=E4=BF=AE=E6=94=B9=E4=B8=BA10000?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + CoCoding.md | 4 ++++ web/assets/js/model/models.js | 2 +- web/assets/js/model/xray.js | 2 +- web/html/xui/inbound_modal.html | 2 +- web/html/xui/inbounds.html | 2 +- web/html/xui/setting.html | 2 +- web/service/setting.go | 10 +++++----- 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 1b5f0069ca..db2f7a901b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ x-ui-*.tar.gz /release.sh .sync* main +.DS_Store diff --git a/CoCoding.md b/CoCoding.md index 0802acae11..2c9e226836 100644 --- a/CoCoding.md +++ b/CoCoding.md @@ -25,3 +25,7 @@ - 节点复制 > 入站节点操作增加复制功能,可以快速复制节点信息,端口和ID会重新生成,主要复制TLS证书信息。 + +- 订阅功能 + + > 添加订阅,订阅包括多个节点,可设置自动更新,防止端口被墙,可生成订阅链接,可设置有效日期 \ No newline at end of file diff --git a/web/assets/js/model/models.js b/web/assets/js/model/models.js index 6ec1f8c577..656cd06c40 100644 --- a/web/assets/js/model/models.js +++ b/web/assets/js/model/models.js @@ -159,7 +159,7 @@ class DBInbound { class AllSetting { constructor(data) { - this.configPortStart = 50000; + this.configPortStart = 10000; this.configPortEnd = 60000; this.configCertDomain = ""; this.configCertFile = ""; diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index ecb9ce28ef..4654ab77fc 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -601,7 +601,7 @@ class Sniffing extends XrayCommonClass { } class Inbound extends XrayCommonClass { - constructor(port=RandomUtil.randomIntRange(50000, 60000), + constructor(port=RandomUtil.randomIntRange(10000, 60000), listen='', protocol=Protocols.VMESS, settings=null, diff --git a/web/html/xui/inbound_modal.html b/web/html/xui/inbound_modal.html index b87c5d44c3..22393625cb 100644 --- a/web/html/xui/inbound_modal.html +++ b/web/html/xui/inbound_modal.html @@ -24,7 +24,7 @@ this.inbound = Inbound.fromJson(inbound.toJson()); } else { this.inbound = new Inbound(); - this.inbound.settings.port=RandomUtil.randomIntRange(allSettings.configPortStart||50000, + this.inbound.settings.port=RandomUtil.randomIntRange(allSettings.configPortStart||10000, allSettings.configPortEnd||60000) this.inbound.stream.tls.server = allSettings.configCertDomain||'' this.inbound.stream.tls.certs[0].certFile = allSettings.configCertFile||'' diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 4c8fccea91..4954a987d6 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -277,7 +277,7 @@ inbound.id = null inbound.remark = `${inbound.remark}-copy`; const id = RandomUtil.randomUUID() - inbound.port = RandomUtil.randomIntRange(this.allSettings.configPortStart||50000, this.allSettings.configPortEnd||60000) + inbound.port = RandomUtil.randomIntRange(this.allSettings.configPortStart||10000, this.allSettings.configPortEnd||60000) inbound.settings[inbound.settings.protocol+'es'][0].id = id inbound.settings.id = id console.log("inbound", inbound) diff --git a/web/html/xui/setting.html b/web/html/xui/setting.html index 7642359cc4..a6a1c6e57a 100644 --- a/web/html/xui/setting.html +++ b/web/html/xui/setting.html @@ -38,7 +38,7 @@ - + diff --git a/web/service/setting.go b/web/service/setting.go index 4191acb4a0..34dfd3c13f 100644 --- a/web/service/setting.go +++ b/web/service/setting.go @@ -22,11 +22,11 @@ var xrayTemplateConfig string var defaultValueMap = map[string]string{ - "configPortStart": "50000", - "configPortEnd": "60000", - "configCertDomain": "", - "configCertFile": "", - "configKeyFile": "", + "configPortStart": "10000", + "configPortEnd": "60000", + "configCertDomain": "", + "configCertFile": "", + "configKeyFile": "", "xrayTemplateConfig": xrayTemplateConfig, "webListen": "", "webPort": "54321",