Fix Issue.(#22)

This commit is contained in:
asdlokj1qpi23 committed 2024-06-17 11:28:12 +08:00
1 parent 2ee7c3aa04
commit 8a18d3564b
1 file changed
+14 -2
+14 -2
View File
@@ -1987,9 +1987,21 @@ proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf, std::vector
if(!x.ServerName.empty()){
proxy += ",sni="+x.ServerName;
}
if(!x.DownMbps.empty()){
proxy += ",download-bandwidth="+x.DownMbps;
if(!x.UpMbps.empty()){
std::string search = " Mbps";
size_t pos = x.UpMbps.find(search);
if (pos != std::string::npos) {
x.UpMbps.replace(pos, search.length(), "");
} else{
search = "Mbps";
pos = x.UpMbps.find(search);
if (pos != std::string::npos) {
x.UpMbps.replace(pos, search.length(), "");
}
}
proxy += ",download-bandwidth="+x.UpMbps;
}
break;
default:
continue;
}