fix: feel free to use empty host with http/h2 in your vmess

This commit is contained in:
Qv2ray-dev 2020-03-16 18:22:51 +08:00
parent e11b609d6b
commit ac480eb396
2 changed files with 7 additions and 3 deletions

View File

@ -1 +1 @@
4716 4718

View File

@ -233,9 +233,12 @@ namespace Qv2ray::core::connection
{ {
// Fill hosts for HTTP // Fill hosts for HTTP
for (auto _host : host.split(',')) for (auto _host : host.split(','))
{
if (!_host.isEmpty())
{ {
streaming.httpSettings.host.push_back(_host.trimmed()); streaming.httpSettings.host.push_back(_host.trimmed());
} }
}
streaming.httpSettings.path = path; streaming.httpSettings.path = path;
} }
@ -271,7 +274,8 @@ namespace Qv2ray::core::connection
// //
// Network type // Network type
// NOTE(DuckSoft): Damn vmess:// just don't write 'http' properly // NOTE(DuckSoft): Damn vmess:// just don't write 'http' properly
if (net == "h2") net = "http"; if (net == "h2")
net = "http";
streaming.network = net; streaming.network = net;
// //
// WARN Mux is missing here. // WARN Mux is missing here.