diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index efd059f9..b4be3410 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -725,7 +725,7 @@ class RealityStreamSettings extends XrayCommonClass {
static fromJson(json = {}) {
let settings;
if (!ObjectUtil.isEmpty(json.settings)) {
- settings = new RealityStreamSettings.Settings(json.settings.publicKey , json.settings.fingerprint, json.settings.serverName);
+ settings = new RealityStreamSettings.Settings(json.settings.publicKey , json.settings.fingerprint, json.settings.serverName, json.settings.spiderX);
}
return new RealityStreamSettings(
json.show,
@@ -758,17 +758,19 @@ class RealityStreamSettings extends XrayCommonClass {
}
RealityStreamSettings.Settings = class extends XrayCommonClass {
- constructor(publicKey = '', fingerprint = UTLS_FINGERPRINT.UTLS_FIREFOX, serverName = '') {
+ constructor(publicKey = '', fingerprint = UTLS_FINGERPRINT.UTLS_FIREFOX, serverName = '', spiderX= '/') {
super();
this.publicKey = publicKey;
this.fingerprint = fingerprint;
this.serverName = serverName;
+ this.spiderX = spiderX;
}
static fromJson(json = {}) {
return new RealityStreamSettings.Settings(
json.publicKey,
json.fingerprint,
json.serverName,
+ json.spiderX,
);
}
toJson() {
@@ -776,6 +778,7 @@ RealityStreamSettings.Settings = class extends XrayCommonClass {
publicKey: this.publicKey,
fingerprint: this.fingerprint,
serverName: this.serverName,
+ spiderX: this.spiderX,
};
}
};
@@ -1370,6 +1373,9 @@ class Inbound extends XrayCommonClass {
if (!ObjectUtil.isEmpty(this.stream.reality.settings.serverName)) {
address = this.stream.reality.settings.serverName;
}
+ if (!ObjectUtil.isEmpty(this.stream.reality.settings.spiderX)) {
+ params.set("spx", this.stream.reality.settings.spiderX);
+ }
}
const link = `vless://${uuid}@${address}:${port}`;
@@ -1470,6 +1476,9 @@ class Inbound extends XrayCommonClass {
if (!ObjectUtil.isEmpty(this.stream.reality.settings.serverName)) {
address = this.stream.reality.settings.serverName;
}
+ if (!ObjectUtil.isEmpty(this.stream.reality.settings.spiderX)) {
+ params.set("spx", this.stream.reality.settings.spiderX);
+ }
}
if (this.xtls) {
diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html
index b6316602..19e44d49 100644
--- a/web/html/xui/form/tls_settings.html
+++ b/web/html/xui/form/tls_settings.html
@@ -162,7 +162,7 @@
-
+
@@ -171,6 +171,9 @@
+
+
+
diff --git a/web/service/sub.go b/web/service/sub.go
index 01cd29dd..f39fdb1e 100644
--- a/web/service/sub.go
+++ b/web/service/sub.go
@@ -327,6 +327,11 @@ func (s *SubService) genVlessLink(inbound *model.Inbound, email string) string {
params["fp"] = fp
}
}
+ if spxValue, ok := searchKey(realitySettings, "spiderX"); ok {
+ if spx, ok := spxValue.(string); ok && len(spx) > 0 {
+ params["spx"] = spx
+ }
+ }
if serverName, ok := searchKey(realitySettings, "serverName"); ok {
if sname, ok := serverName.(string); ok && len(sname) > 0 {
address = sname
@@ -508,6 +513,11 @@ func (s *SubService) genTrojanLink(inbound *model.Inbound, email string) string
params["fp"] = fp
}
}
+ if spxValue, ok := searchKey(realitySettings, "spiderX"); ok {
+ if spx, ok := spxValue.(string); ok && len(spx) > 0 {
+ params["spx"] = spx
+ }
+ }
if serverName, ok := searchKey(realitySettings, "serverName"); ok {
if sname, ok := serverName.(string); ok && len(sname) > 0 {
address = sname