Add httpupgrade
This commit is contained in:
1 parent
3cdd5822cb
commit
eb1d71bda6
7 files changed
+28
-9
No files matched your search
@@ -135,6 +135,7 @@ data class V2rayConfig(
|
|||||||
var tcpSettings: TcpSettingsBean? = null,
|
var tcpSettings: TcpSettingsBean? = null,
|
||||||
var kcpSettings: KcpSettingsBean? = null,
|
var kcpSettings: KcpSettingsBean? = null,
|
||||||
var wsSettings: WsSettingsBean? = null,
|
var wsSettings: WsSettingsBean? = null,
|
||||||
|
var httpupgradeSettings: HttpupgradeSettingsBean? = null,
|
||||||
var httpSettings: HttpSettingsBean? = null,
|
var httpSettings: HttpSettingsBean? = null,
|
||||||
var tlsSettings: TlsSettingsBean? = null,
|
var tlsSettings: TlsSettingsBean? = null,
|
||||||
var quicSettings: QuicSettingBean? = null,
|
var quicSettings: QuicSettingBean? = null,
|
||||||
@@ -184,6 +185,10 @@ data class V2rayConfig(
|
|||||||
data class HeadersBean(var Host: String = "")
|
data class HeadersBean(var Host: String = "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data class HttpupgradeSettingsBean(var path: String = "",
|
||||||
|
var host: String = "",
|
||||||
|
val acceptProxyProtocol: Boolean? = null)
|
||||||
|
|
||||||
data class HttpSettingsBean(var host: List<String> = ArrayList(),
|
data class HttpSettingsBean(var host: List<String> = ArrayList(),
|
||||||
var path: String = "")
|
var path: String = "")
|
||||||
|
|
||||||
@@ -259,6 +264,13 @@ data class V2rayConfig(
|
|||||||
wssetting.path = path ?: "/"
|
wssetting.path = path ?: "/"
|
||||||
wsSettings = wssetting
|
wsSettings = wssetting
|
||||||
}
|
}
|
||||||
|
"httpupgrade" -> {
|
||||||
|
val httpupgradeSetting = HttpupgradeSettingsBean()
|
||||||
|
httpupgradeSetting.host = host ?: ""
|
||||||
|
sni = httpupgradeSetting.host
|
||||||
|
httpupgradeSetting.path = path ?: "/"
|
||||||
|
httpupgradeSettings = httpupgradeSetting
|
||||||
|
}
|
||||||
"h2", "http" -> {
|
"h2", "http" -> {
|
||||||
network = "h2"
|
network = "h2"
|
||||||
val h2Setting = HttpSettingsBean()
|
val h2Setting = HttpSettingsBean()
|
||||||
@@ -388,6 +400,12 @@ data class V2rayConfig(
|
|||||||
wsSetting.headers.Host,
|
wsSetting.headers.Host,
|
||||||
wsSetting.path)
|
wsSetting.path)
|
||||||
}
|
}
|
||||||
|
"httpupgrade" -> {
|
||||||
|
val httpupgradeSetting = streamSettings?.httpupgradeSettings ?: return null
|
||||||
|
listOf("",
|
||||||
|
httpupgradeSetting.host,
|
||||||
|
httpupgradeSetting.path)
|
||||||
|
}
|
||||||
"h2" -> {
|
"h2" -> {
|
||||||
val h2Setting = streamSettings?.httpSettings ?: return null
|
val h2Setting = streamSettings?.httpSettings ?: return null
|
||||||
listOf("",
|
listOf("",
|
||||||
|
|||||||
@@ -731,7 +731,7 @@ object AngConfigManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"ws" -> {
|
"ws", "httpupgrade" -> {
|
||||||
if (!TextUtils.isEmpty(transportDetails[1])) {
|
if (!TextUtils.isEmpty(transportDetails[1])) {
|
||||||
dicQuery["host"] = Utils.urlEncode(transportDetails[1])
|
dicQuery["host"] = Utils.urlEncode(transportDetails[1])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,8 +46,8 @@
|
|||||||
<string name="server_lab_more_function">底层传输方式(transport)</string>
|
<string name="server_lab_more_function">底层传输方式(transport)</string>
|
||||||
<string name="server_lab_head_type">伪装类型(type)</string>
|
<string name="server_lab_head_type">伪装类型(type)</string>
|
||||||
<string name="server_lab_mode_type">gRPC 传输模式(mode)</string>
|
<string name="server_lab_mode_type">gRPC 传输模式(mode)</string>
|
||||||
<string name="server_lab_request_host">伪装域名(host)(host/ws host/h2 host)/QUIC 加密方式</string>
|
<string name="server_lab_request_host">伪装域名(host)(host/ws host/httpupgrade host/h2 host)/QUIC 加密方式</string>
|
||||||
<string name="server_lab_path">path(ws path/h2 path)/QUIC 加密密钥/kcp seed/gRPC serviceName</string>
|
<string name="server_lab_path">path(ws path/httpupgrade path/h2 path)/QUIC 加密密钥/kcp seed/gRPC serviceName</string>
|
||||||
<string name="server_lab_stream_security">传输层安全(TLS)</string>
|
<string name="server_lab_stream_security">传输层安全(TLS)</string>
|
||||||
<string name="server_lab_allow_insecure">跳过证书验证(allowInsecure)</string>
|
<string name="server_lab_allow_insecure">跳过证书验证(allowInsecure)</string>
|
||||||
<string name="server_lab_sni">SNI</string>
|
<string name="server_lab_sni">SNI</string>
|
||||||
|
|||||||
@@ -46,8 +46,8 @@
|
|||||||
<string name="server_lab_more_function">底層傳輸方式 (transport)</string>
|
<string name="server_lab_more_function">底層傳輸方式 (transport)</string>
|
||||||
<string name="server_lab_head_type">標頭類型</string>
|
<string name="server_lab_head_type">標頭類型</string>
|
||||||
<string name="server_lab_mode_type">gRPC 傳輸模式 (mode)</string>
|
<string name="server_lab_mode_type">gRPC 傳輸模式 (mode)</string>
|
||||||
<string name="server_lab_request_host">要求主機 (host)(host/ws host/h2 host)/QUIC 加密方式</string>
|
<string name="server_lab_request_host">要求主機 (host)(host/ws host/httpupgrade host/h2 host)/QUIC 加密方式</string>
|
||||||
<string name="server_lab_path">path(ws path/h2 path)/QUIC 加密金鑰/kcp seed/gRPC serviceName</string>
|
<string name="server_lab_path">path(ws path/httpupgrade path/h2 path)/QUIC 加密金鑰/kcp seed/gRPC serviceName</string>
|
||||||
<string name="server_lab_stream_security">傳輸層安全 (TLS)</string>
|
<string name="server_lab_stream_security">傳輸層安全 (TLS)</string>
|
||||||
<string name="server_lab_allow_insecure">跳過憑證驗證 (allowInsecure)</string>
|
<string name="server_lab_allow_insecure">跳過憑證驗證 (allowInsecure)</string>
|
||||||
<string name="server_lab_sni">SNI</string>
|
<string name="server_lab_sni">SNI</string>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
<item>tcp</item>
|
<item>tcp</item>
|
||||||
<item>kcp</item>
|
<item>kcp</item>
|
||||||
<item>ws</item>
|
<item>ws</item>
|
||||||
|
<item>httpupgrade</item>
|
||||||
<item>h2</item>
|
<item>h2</item>
|
||||||
<item>quic</item>
|
<item>quic</item>
|
||||||
<item>grpc</item>
|
<item>grpc</item>
|
||||||
|
|||||||
@@ -47,8 +47,8 @@
|
|||||||
<string name="server_lab_more_function">Transport</string>
|
<string name="server_lab_more_function">Transport</string>
|
||||||
<string name="server_lab_head_type">head type</string>
|
<string name="server_lab_head_type">head type</string>
|
||||||
<string name="server_lab_mode_type">gRPC mode</string>
|
<string name="server_lab_mode_type">gRPC mode</string>
|
||||||
<string name="server_lab_request_host">request host(host/ws host/h2 host)/QUIC security</string>
|
<string name="server_lab_request_host">request host(host/ws host/httpupgrade host/h2 host)/QUIC security</string>
|
||||||
<string name="server_lab_path">path(ws path/h2 path)/QUIC key/kcp seed/gRPC serviceName</string>
|
<string name="server_lab_path">path(ws path/httpupgrade path/h2 path)/QUIC key/kcp seed/gRPC serviceName</string>
|
||||||
<string name="server_lab_stream_security">TLS</string>
|
<string name="server_lab_stream_security">TLS</string>
|
||||||
<string name="server_lab_stream_fingerprint" translatable="false">Fingerprint</string>
|
<string name="server_lab_stream_fingerprint" translatable="false">Fingerprint</string>
|
||||||
<string name="server_lab_stream_alpn" translatable="false">Alpn</string>
|
<string name="server_lab_stream_alpn" translatable="false">Alpn</string>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.3.0" apply false
|
id("com.android.application") version "8.2.2" apply false
|
||||||
id("com.android.library") version "8.3.0" apply false
|
id("com.android.library") version "8.2.2" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "1.9.23" apply false
|
id("org.jetbrains.kotlin.android") version "1.9.23" apply false
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user