From eb4c12835068289d3bc4e88e7608e5e9ee1b616a Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 7 Jan 2025 01:12:55 +0100 Subject: [PATCH] adjust hy2 to sing-box 1.11.0 --- .../src/components/protocols/Hysteria2.vue | 181 ++++++++++++++---- frontend/src/types/inbounds.ts | 10 +- frontend/src/types/outbounds.ts | 2 + 3 files changed, 150 insertions(+), 43 deletions(-) diff --git a/frontend/src/components/protocols/Hysteria2.vue b/frontend/src/components/protocols/Hysteria2.vue index 1f22031..1e8f7d1 100644 --- a/frontend/src/components/protocols/Hysteria2.vue +++ b/frontend/src/components/protocols/Hysteria2.vue @@ -1,29 +1,5 @@ - - - - - - + + @@ -78,22 +149,44 @@ \ No newline at end of file diff --git a/frontend/src/types/inbounds.ts b/frontend/src/types/inbounds.ts index 13c529a..c6d185f 100644 --- a/frontend/src/types/inbounds.ts +++ b/frontend/src/types/inbounds.ts @@ -165,7 +165,15 @@ export interface Hysteria2 extends InboundBasics { } users: NamePass[] ignore_client_bandwidth?: boolean - masquerade?: string + masquerade?: string | { + type: string + directory?: string + url?: string + rewrite_host?: string + status_code?: number + headers?: Headers[] + content?: string + } brutal_debug?: boolean } export interface Tun extends InboundBasics { diff --git a/frontend/src/types/outbounds.ts b/frontend/src/types/outbounds.ts index b8646ba..f4aa274 100644 --- a/frontend/src/types/outbounds.ts +++ b/frontend/src/types/outbounds.ts @@ -168,6 +168,8 @@ export interface TUIC extends OutboundBasics, Dial { export interface Hysteria2 extends OutboundBasics, Dial { server: string server_port: number + server_ports?: string[] + hop_interval: string up_mbps?: number down_mbps?: number obfs?: {