diff --git a/config/version b/config/version
index cef29980..dade7442 100644
--- a/config/version
+++ b/config/version
@@ -1 +1 @@
-1.8.21
\ No newline at end of file
+1.8.22
\ No newline at end of file
diff --git a/go.mod b/go.mod
index 1b1f9823..ed297780 100644
--- a/go.mod
+++ b/go.mod
@@ -12,7 +12,7 @@ require (
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil/v3 v3.24.2
- github.com/xtls/xray-core v1.8.9
+ github.com/xtls/xray-core v1.8.10
go.uber.org/atomic v1.11.0
golang.org/x/crypto v0.21.0
golang.org/x/text v0.14.0
@@ -49,7 +49,7 @@ require (
github.com/pelletier/go-toml/v2 v2.2.0 // indirect
github.com/pires/go-proxyproto v0.7.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
- github.com/sagernet/sing v0.3.6 // indirect
+ github.com/sagernet/sing v0.3.8 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
diff --git a/go.sum b/go.sum
index 5e8a666f..43d77747 100644
--- a/go.sum
+++ b/go.sum
@@ -125,6 +125,8 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/sagernet/sing v0.3.6 h1:dsEdYLKBQlrxUfw1a92x0VdPvR1/BOxQ+HIMyaoEJsQ=
github.com/sagernet/sing v0.3.6/go.mod h1:+60H3Cm91RnL9dpVGWDPHt0zTQImO9Vfqt9a4rSambI=
+github.com/sagernet/sing v0.3.8 h1:gm4JKalPhydMYX2zFOTnnd4TXtM/16WFRqSjMepYQQk=
+github.com/sagernet/sing v0.3.8/go.mod h1:+60H3Cm91RnL9dpVGWDPHt0zTQImO9Vfqt9a4rSambI=
github.com/sagernet/sing-shadowsocks v0.2.6 h1:xr7ylAS/q1cQYS8oxKKajhuQcchd5VJJ4K4UZrrpp0s=
github.com/sagernet/sing-shadowsocks v0.2.6/go.mod h1:j2YZBIpWIuElPFL/5sJAj470bcn/3QQ5lxZUNKLDNAM=
github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb h1:XfLJSPIOUX+osiMraVgIrMR27uMXnRJWGm1+GL8/63U=
@@ -167,6 +169,8 @@ github.com/xtls/reality v0.0.0-20231112171332-de1173cf2b19 h1:capMfFYRgH9BCLd6A3
github.com/xtls/reality v0.0.0-20231112171332-de1173cf2b19/go.mod h1:dm4y/1QwzjGaK17ofi0Vs6NpKAHegZky8qk6J2JJZAE=
github.com/xtls/xray-core v1.8.9 h1:wefcON0behu4DoQvCKJYZKsJlSvNhyq2I7vC2fxLFcY=
github.com/xtls/xray-core v1.8.9/go.mod h1:XDE4f422qJKAU3hNDSNZyWrOHvn9kF8UHVdyOzU38rc=
+github.com/xtls/xray-core v1.8.10 h1:qxae6gSteonpPI7EZyOyqw5HmRVRzmU07qs0l1GNqz4=
+github.com/xtls/xray-core v1.8.10/go.mod h1:Mc1t+kLBPE5a1EpsUNKjMLviGz3Y0XywxeEraJZAMlI=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index 3a41d5bc..c9718e9f 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -498,11 +498,30 @@ class GrpcStreamSettings extends XrayCommonClass {
}
class HttpUpgradeStreamSettings extends XrayCommonClass {
- constructor(acceptProxyProtocol = false, path = '/', host = '') {
+ constructor(acceptProxyProtocol = false, path = '/', host = '', headers = []) {
super();
this.acceptProxyProtocol = acceptProxyProtocol;
this.path = path;
this.host = host;
+ this.headers = headers;
+ }
+
+
+ addHeader(name, value) {
+ this.headers.push({ name: name, value: value });
+ }
+
+ getHeader(name) {
+ for (const header of this.headers) {
+ if (header.name.toLowerCase() === name.toLowerCase()) {
+ return header.value;
+ }
+ }
+ return null;
+ }
+
+ removeHeader(index) {
+ this.headers.splice(index, 1);
}
static fromJson(json = {}) {
@@ -510,6 +529,7 @@ class HttpUpgradeStreamSettings extends XrayCommonClass {
json.acceptProxyProtocol,
json.path,
json.host,
+ XrayCommonClass.toHeaders(json.headers),
);
}
@@ -518,6 +538,7 @@ class HttpUpgradeStreamSettings extends XrayCommonClass {
acceptProxyProtocol: this.acceptProxyProtocol,
path: this.path,
host: this.host,
+ headers: XrayCommonClass.toV2Headers(this.headers, false),
};
}
}
@@ -1417,7 +1438,7 @@ class Inbound extends XrayCommonClass {
return url.toString();
}
- genSSLink(address = '', port = this.port, forceTls, remark = '', clientPassword) {
+ genSSLink(address = '', forceTls, remark = '') {
let settings = this.settings;
const type = this.stream.network;
const security = forceTls == 'same' ? this.stream.security : forceTls;
diff --git a/web/html/xui/form/stream/stream_httpupgrade.html b/web/html/xui/form/stream/stream_httpupgrade.html
index 0774b7bd..b90fe039 100644
--- a/web/html/xui/form/stream/stream_httpupgrade.html
+++ b/web/html/xui/form/stream/stream_httpupgrade.html
@@ -9,5 +9,26 @@
+
+
+
+ +
+
+
+
+
+
+
+
+ -
+
+
+
+
+
{{end}}
\ No newline at end of file