Skip to content

Commit

Permalink
删除 quic 协议 更新一些依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
qist committed Sep 9, 2024
1 parent a074355 commit 5217f31
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 108 deletions.
2 changes: 1 addition & 1 deletion config/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.27
24.9.9
72 changes: 0 additions & 72 deletions web/assets/js/model/xray.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,35 +440,6 @@ class HttpStreamSettings extends XrayCommonClass {
}
}


class QuicStreamSettings extends XrayCommonClass {
constructor(security = VmessMethods.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 XrayCommonClass {
constructor(
serviceName = "",
Expand Down Expand Up @@ -889,7 +860,6 @@ class StreamSettings extends XrayCommonClass {
kcpSettings = new KcpStreamSettings(),
wsSettings = new WsStreamSettings(),
httpSettings = new HttpStreamSettings(),
quicSettings = new QuicStreamSettings(),
grpcSettings = new GrpcStreamSettings(),
httpupgradeSettings = new HttpUpgradeStreamSettings(),
splithttpSettings = new SplitHTTPStreamSettings(),
Expand All @@ -904,7 +874,6 @@ class StreamSettings extends XrayCommonClass {
this.kcp = kcpSettings;
this.ws = wsSettings;
this.http = httpSettings;
this.quic = quicSettings;
this.grpc = grpcSettings;
this.httpupgrade = httpupgradeSettings;
this.splithttp = splithttpSettings;
Expand Down Expand Up @@ -953,7 +922,6 @@ class StreamSettings extends XrayCommonClass {
KcpStreamSettings.fromJson(json.kcpSettings),
WsStreamSettings.fromJson(json.wsSettings),
HttpStreamSettings.fromJson(json.httpSettings),
QuicStreamSettings.fromJson(json.quicSettings),
GrpcStreamSettings.fromJson(json.grpcSettings),
HttpUpgradeStreamSettings.fromJson(json.httpupgradeSettings),
SplitHTTPStreamSettings.fromJson(json.splithttpSettings),
Expand All @@ -972,7 +940,6 @@ class StreamSettings extends XrayCommonClass {
kcpSettings: network === 'kcp' ? this.kcp.toJson() : undefined,
wsSettings: network === 'ws' ? this.ws.toJson() : undefined,
httpSettings: network === 'http' ? this.http.toJson() : undefined,
quicSettings: network === 'quic' ? this.quic.toJson() : undefined,
grpcSettings: network === 'grpc' ? this.grpc.toJson() : undefined,
httpupgradeSettings: network === 'httpupgrade' ? this.httpupgrade.toJson() : undefined,
splithttpSettings: network === 'splithttp' ? this.splithttp.toJson() : undefined,
Expand Down Expand Up @@ -1081,10 +1048,6 @@ class Inbound extends XrayCommonClass {
return this.network === "kcp";
}

get isQuic() {
return this.network === "quic"
}

get isGrpc() {
return this.network === "grpc";
}
Expand Down Expand Up @@ -1195,18 +1158,6 @@ class Inbound extends XrayCommonClass {
return null;
}

get quicSecurity() {
return this.stream.quic.security;
}

get quicKey() {
return this.stream.quic.key;
}

get quicType() {
return this.stream.quic.type;
}

get kcpType() {
return this.stream.kcp.type;
}
Expand Down Expand Up @@ -1234,7 +1185,6 @@ class Inbound extends XrayCommonClass {
case "tcp":
case "ws":
case "http":
case "quic":
case "grpc":
case "httpupgrade":
case "splithttp":
Expand Down Expand Up @@ -1344,10 +1294,6 @@ class Inbound extends XrayCommonClass {
network = 'h2';
path = this.stream.http.path;
host = this.stream.http.host.join(',');
} else if (network === 'quic') {
type = this.stream.quic.type;
host = this.stream.quic.security;
path = this.stream.quic.key;
} else if (network === 'grpc') {
path = this.stream.grpc.serviceName;
authority = this.stream.grpc.authority;
Expand Down Expand Up @@ -1443,12 +1389,6 @@ class Inbound extends XrayCommonClass {
params.set("path", http.path);
params.set("host", http.host);
break;
case "quic":
const quic = this.stream.quic;
params.set("quicSecurity", quic.security);
params.set("key", quic.key);
params.set("headerType", quic.type);
break;
case "grpc":
const grpc = this.stream.grpc;
params.set("serviceName", grpc.serviceName);
Expand Down Expand Up @@ -1568,12 +1508,6 @@ class Inbound extends XrayCommonClass {
params.set("path", http.path);
params.set("host", http.host);
break;
case "quic":
const quic = this.stream.quic;
params.set("quicSecurity", quic.security);
params.set("key", quic.key);
params.set("headerType", quic.type);
break;
case "grpc":
const grpc = this.stream.grpc;
params.set("serviceName", grpc.serviceName);
Expand Down Expand Up @@ -1684,12 +1618,6 @@ class Inbound extends XrayCommonClass {
params.set("path", http.path);
params.set("host", http.host);
break;
case "quic":
const quic = this.stream.quic;
params.set("quicSecurity", quic.security);
params.set("key", quic.key);
params.set("headerType", quic.type);
break;
case "grpc":
const grpc = this.stream.grpc;
params.set("serviceName", grpc.serviceName);
Expand Down
5 changes: 0 additions & 5 deletions web/html/xui/component/inbound_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
<p v-else>path: <a-tag color="orange"></a-tag></p>
</template>

<template v-if="inbound.isQuic">
<p>quic 加密: <a-tag color="green">[[ inbound.quicSecurity ]]</a-tag></p>
<p>quic 密码: <a-tag color="green">[[ inbound.quicKey ]]</a-tag></p>
<p>quic 伪装: <a-tag color="green">[[ inbound.quicType ]]</a-tag></p>
</template>

<template v-if="inbound.isKcp">
<p>kcp 加密: <a-tag color="green">[[ inbound.kcpType ]]</a-tag></p>
Expand Down
24 changes: 0 additions & 24 deletions web/html/xui/form/stream/stream_quic.html

This file was deleted.

6 changes: 0 additions & 6 deletions web/html/xui/form/stream/stream_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<a-select-option value="kcp">kcp</a-select-option>
<a-select-option value="ws">ws</a-select-option>
<a-select-option value="http">http</a-select-option>
<a-select-option value="quic">quic</a-select-option>
<a-select-option value="grpc">grpc</a-select-option>
<a-select-option value="httpupgrade">HTTPUpgrade</a-select-option>
<a-select-option value="splithttp">SplitHTTP</a-select-option>
Expand Down Expand Up @@ -35,11 +34,6 @@
{{template "form/streamHTTP"}}
</template>

<!-- quic -->
<template v-if="inbound.stream.network === 'quic'">
{{template "form/streamQUIC"}}
</template>

<!-- grpc -->
<template v-if="inbound.stream.network === 'grpc'">
{{template "form/streamGRPC"}}
Expand Down

0 comments on commit 5217f31

Please sign in to comment.