mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-05 03:02:06 +00:00
Fix Issue.(#22)
This commit is contained in:
1 parent
2ee7c3aa04
commit
8a18d3564b
1 file changed
+14
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user