Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-04-24 15:01:25 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-04-24 15:01:25 +0300
commitbf248389399fc6f82855f788cfae2be882407a0a (patch)
tree2353d352cff63344ac35592c0436ea3492003b78 /web
parent16e3107d23b4bc536d509c2dd832d10366fb895e (diff)
remove useless
Diffstat (limited to 'web')
-rw-r--r--web/assets/js/model/xray.js13
-rw-r--r--web/service/sub.go6
2 files changed, 3 insertions, 16 deletions
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index 8614e588..b66020f9 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -1409,6 +1409,7 @@ class Inbound extends XrayCommonClass {
if (this.reality) {
params.set("security", "reality");
+ params.set("fp", this.stream.reality.settings.fingerprint);
params.set("pbk", this.stream.reality.settings.publicKey);
if (!ObjectUtil.isArrEmpty(this.stream.reality.serverNames)) {
params.set("sni", this.stream.reality.serverNames.split(",")[0]);
@@ -1419,9 +1420,6 @@ class Inbound extends XrayCommonClass {
if (this.stream.reality.shortIds.length > 0) {
params.set("sid", this.stream.reality.shortIds.split(",")[0]);
}
- if (!ObjectUtil.isEmpty(this.stream.reality.settings.fingerprint)) {
- params.set("fp", this.stream.reality.settings.fingerprint);
- }
if (!ObjectUtil.isEmpty(this.stream.reality.settings.serverName)) {
address = this.stream.reality.settings.serverName;
}
@@ -1513,19 +1511,14 @@ class Inbound extends XrayCommonClass {
if (this.reality) {
params.set("security", "reality");
+ params.set("fp", this.stream.reality.settings.fingerprint);
params.set("pbk", this.stream.reality.settings.publicKey);
if (!ObjectUtil.isArrEmpty(this.stream.reality.serverNames)) {
params.set("sni", this.stream.reality.serverNames.split(",")[0]);
}
- if (!ObjectUtil.isEmpty(this.stream.reality.settings.serverName)) {
- address = this.stream.reality.settings.serverName;
- }
if (this.stream.reality.shortIds.length > 0) {
params.set("sid", this.stream.reality.shortIds.split(",")[0]);
}
- if (!ObjectUtil.isEmpty(this.stream.reality.settings.fingerprint)) {
- params.set("fp", this.stream.reality.settings.fingerprint);
- }
if (!ObjectUtil.isEmpty(this.stream.reality.settings.serverName)) {
address = this.stream.reality.settings.serverName;
}
@@ -1537,7 +1530,7 @@ class Inbound extends XrayCommonClass {
if(this.stream.xtls.settings.allowInsecure){
params.set("allowInsecure", "1");
}
- if (!ObjectUtil.isEmpty(this.stream.tls.server)) {
+ if (!ObjectUtil.isEmpty(this.stream.xtls.server)) {
address = this.stream.xtls.server;
}
params.set("flow", this.settings.trojans[clientIndex].flow);
diff --git a/web/service/sub.go b/web/service/sub.go
index 5a0cfff6..263b15c3 100644
--- a/web/service/sub.go
+++ b/web/service/sub.go
@@ -352,9 +352,6 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
xtlsSettings, _ := searchKey(xtlsSetting, "settings")
if xtlsSetting != nil {
- if sniValue, ok := searchKey(xtlsSettings, "serverName"); ok {
- params["sni"], _ = sniValue.(string)
- }
if fpValue, ok := searchKey(xtlsSettings, "fingerprint"); ok {
params["fp"], _ = fpValue.(string)
}
@@ -529,9 +526,6 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string
xtlsSettings, _ := searchKey(xtlsSetting, "settings")
if xtlsSetting != nil {
- if sniValue, ok := searchKey(xtlsSettings, "serverName"); ok {
- params["sni"], _ = sniValue.(string)
- }
if fpValue, ok := searchKey(xtlsSettings, "fingerprint"); ok {
params["fp"], _ = fpValue.(string)
}