mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-18 22:20:06 +08:00
fix: fix bug for generate httpupgrade in v2raytransport
This commit is contained in:
parent
06a20d0609
commit
f839b26ff3
@ -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) {
|
||||
|
||||
@ -4585,4 +4585,13 @@ public class SingBoxOptions {
|
||||
|
||||
}
|
||||
|
||||
public static class V2RayTransportOptions_HTTPUpgradeOptions extends V2RayTransportOptions {
|
||||
|
||||
public String host;
|
||||
|
||||
public String path;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user