Enhancements

Improve subscription recognition.
INIReader: Add back line break detect.
This commit is contained in:
Tindy X committed 2019-11-12 13:08:44 +08:00
1 parent 732e2f8bcd
commit 439bae0fbf
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -129,7 +129,7 @@ public:
string_multimap itemGroup, existItemGroup;
std::stringstream strStrm;
unsigned int lineSize = 0;
//char delimiter = count(content.begin(), content.end(), '\n') <= 1 ? '\r' : '\n';
char delimiter = count(content.begin(), content.end(), '\n') <= 1 ? '\r' : '\n';
EraseAll(); //first erase all data
if(do_utf8_to_gbk && is_str_utf8(content))
@@ -138,8 +138,8 @@ public:
if(store_isolated_line)
curSection = isolated_items_section; //items before any section define will be store in this section
strStrm<<content;
//while(getline(strStrm, strLine, delimiter))
while(getline(strStrm, strLine)) //get one line of content
while(getline(strStrm, strLine, delimiter))
//while(getline(strStrm, strLine)) //get one line of content
{
lineSize = strLine.size();
if(!lineSize || strLine[0] == ';' || strLine[0] == '#') //empty lines and comments are ignored
+1 -1
View File
@@ -1251,7 +1251,7 @@ bool explodeSurge(std::string surge, std::string custom_port, int local_port, st
nodes.push_back(node);
index++;
}
return true;
return index;
}
void explodeSSTap(std::string sstap, std::string custom_port, int local_port, std::vector<nodeInfo> &nodes, bool ss_libev, bool ssr_libev)