fix: fix bug for generate httpupgrade in v2raytransport

This commit is contained in:
Misaka-blog 2023-11-01 15:33:31 +08:00
parent 06a20d0609
commit f839b26ff3
3 changed files with 19 additions and 2 deletions

View File

@ -454,7 +454,7 @@ fun StandardV2RayBean.toUriVMessVLESSTrojan(isTrojan: Boolean): String {
when (type) {
"tcp" -> {}
"ws", "http" -> {
"ws", "http", "httpupgrade" -> {
if (host.isNotBlank()) {
builder.addQueryParameter("host", host)
}
@ -582,6 +582,14 @@ fun buildSingBoxOutboundStreamSettings(bean: StandardV2RayBean): V2RayTransportO
service_name = bean.path
}
}
"httpupgrade" -> {
return V2RayTransportOptions_HTTPUpgradeOptions().apply {
type = "httpupgrade"
host = bean.host
path = bean.path
}
}
}
// if (needKeepAliveInterval) {

View File

@ -4585,4 +4585,13 @@ public class SingBoxOptions {
}
public static class V2RayTransportOptions_HTTPUpgradeOptions extends V2RayTransportOptions {
public String host;
public String path;
}
}

View File

@ -1,5 +1,5 @@
if [ ! -z $ENV_NB4A ]; then
export COMMIT_SING_BOX_EXTRA="2f8e1bdb842ec2138c1699101a84950617c3cbb8"
export COMMIT_SING_BOX_EXTRA="5e69e4d38b195721b9e991c88d64ecdf9dcc51c5"
fi
if [ ! -z $ENV_SING_BOX_EXTRA ]; then