diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-12-04 15:27:29 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-12-04 15:49:43 +0300 |
| commit | 4efcdb3e01357ad67119f42ff9b1830e3b0fe4f1 (patch) | |
| tree | bd4d1e67c06c386469ed99849ebe887ac03e2c24 /web/assets/js/model/outbound.js | |
| parent | ddc2cfacb92f0ec31f8325519c4078682bb2e42e (diff) | |
Transport: Remove HTTP
Migrated to XHTTP "stream-one" mode.
Diffstat (limited to 'web/assets/js/model/outbound.js')
| -rw-r--r-- | web/assets/js/model/outbound.js | 68 |
1 files changed, 1 insertions, 67 deletions
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js index 5a7722e3..7a53383c 100644 --- a/web/assets/js/model/outbound.js +++ b/web/assets/js/model/outbound.js @@ -235,59 +235,6 @@ class WsStreamSettings extends CommonClass { } } -class HttpStreamSettings extends CommonClass { - constructor(path = '/', host = '') { - super(); - this.path = path; - this.host = host; - } - - static fromJson(json = {}) { - return new HttpStreamSettings( - json.path, - json.host ? json.host.join(',') : '', - ); - } - - toJson() { - return { - path: this.path, - host: ObjectUtil.isEmpty(this.host) ? [''] : this.host.split(','), - } - } -} - -class QuicStreamSettings extends CommonClass { - constructor( - security = 'none', - key = '', - type = 'none' - ) { - super(); - this.security = security; - this.key = key; - this.type = type; - } - - static fromJson(json = {}) { - return new QuicStreamSettings( - json.security, - json.key, - json.header ? json.header.type : 'none', - ); - } - - toJson() { - return { - security: this.security, - key: this.key, - header: { - type: this.type, - } - } - } -} - class GrpcStreamSettings extends CommonClass { constructor( serviceName = "", @@ -478,8 +425,6 @@ class StreamSettings extends CommonClass { tcpSettings = new TcpStreamSettings(), kcpSettings = new KcpStreamSettings(), wsSettings = new WsStreamSettings(), - httpSettings = new HttpStreamSettings(), - quicSettings = new QuicStreamSettings(), grpcSettings = new GrpcStreamSettings(), httpupgradeSettings = new HttpUpgradeStreamSettings(), xhttpSettings = new xHTTPStreamSettings(), @@ -493,7 +438,6 @@ class StreamSettings extends CommonClass { this.tcp = tcpSettings; this.kcp = kcpSettings; this.ws = wsSettings; - this.http = httpSettings; this.grpc = grpcSettings; this.httpupgrade = httpupgradeSettings; this.xhttp = xhttpSettings; @@ -525,8 +469,6 @@ class StreamSettings extends CommonClass { TcpStreamSettings.fromJson(json.tcpSettings), KcpStreamSettings.fromJson(json.kcpSettings), WsStreamSettings.fromJson(json.wsSettings), - HttpStreamSettings.fromJson(json.httpSettings), - QuicStreamSettings.fromJson(json.quicSettings), GrpcStreamSettings.fromJson(json.grpcSettings), HttpUpgradeStreamSettings.fromJson(json.httpupgradeSettings), xHTTPStreamSettings.fromJson(json.xhttpSettings), @@ -544,7 +486,6 @@ class StreamSettings extends CommonClass { tcpSettings: network === 'tcp' ? this.tcp.toJson() : undefined, kcpSettings: network === 'kcp' ? this.kcp.toJson() : undefined, wsSettings: network === 'ws' ? this.ws.toJson() : undefined, - httpSettings: network === 'http' ? this.http.toJson() : undefined, grpcSettings: network === 'grpc' ? this.grpc.toJson() : undefined, httpupgradeSettings: network === 'httpupgrade' ? this.httpupgrade.toJson() : undefined, xhttpSettings: network === 'xhttp' ? this.xhttp.toJson() : undefined, @@ -585,7 +526,7 @@ class Mux extends CommonClass { class Outbound extends CommonClass { constructor( tag = '', - protocol = Protocols.VMess, + protocol = Protocols.VLESS, settings = null, streamSettings = new StreamSettings(), sendThrough, @@ -723,11 +664,6 @@ class Outbound extends CommonClass { stream.seed = json.path; } else if (network === 'ws') { stream.ws = new WsStreamSettings(json.path, json.host); - } else if (network === 'http' || network == 'h2') { - stream.network = 'http' - stream.http = new HttpStreamSettings( - json.path, - json.host); } else if (network === 'grpc') { stream.grpc = new GrpcStreamSettings(json.path, json.authority, json.type == 'multi'); } else if (network === 'httpupgrade') { @@ -767,8 +703,6 @@ class Outbound extends CommonClass { stream.kcp.seed = path; } else if (type === 'ws') { stream.ws = new WsStreamSettings(path, host); - } else if (type === 'http' || type == 'h2') { - stream.http = new HttpStreamSettings(path, host); } else if (type === 'grpc') { stream.grpc = new GrpcStreamSettings( url.searchParams.get('serviceName') ?? '', |
