Bug fixes

Fix when parsing some subscription, the same node will appear multiple times.
Fix incorrect plugin in exporting SSD subscription.
This commit is contained in:
Tindy X
2019-12-21 03:08:51 +08:00
parent 204e309086
commit 97a1a123ba
2 changed files with 3 additions and 0 deletions

View File

@@ -1522,6 +1522,7 @@ void explodeSub(std::string sub, bool sslibev, bool ssrlibev, std::string custom
char delimiter = count(sub.begin(), sub.end(), '\n') < 1 ? count(sub.begin(), sub.end(), '\r') < 1 ? ' ' : '\r' : '\n';
while(getline(strstream, strLink, delimiter))
{
node.linkType = -1;
explode(strLink, sslibev, ssrlibev, custom_port, local_port, node);
if(strLink.size() == 0 || node.linkType == -1)
{

View File

@@ -1308,6 +1308,8 @@ std::string netchToSSD(std::vector<nodeInfo> &nodes, std::string &group, extra_s
switch(x.linkType)
{
case SPEEDTEST_MESSAGE_FOUNDSS:
if(plugin == "obfs-local")
plugin = "simple-obfs";
writer.StartObject();
writer.Key("server");
writer.String(hostname.data());