Enhancements

Fix dependency bug for compiling on some platforms.
Add specifying port via environment variable.
Add BacktoCN.list extracted from ConnersHua's original BakctoCN configuration.
This commit is contained in:
Tindy X committed 2020-01-07 11:39:18 +08:00
1 parent 6a61f29cf2
commit d1bf8a13f2
5 files changed
+109 -3

No files matched your search

+15
View File
@@ -320,6 +320,21 @@ std::vector<std::string> split(const std::string &s, const std::string &seperato
return result;
}
std::string GetEnv(std::string name)
{
std::string retVal;
#ifdef _WIN32
char chrData[1024] = {};
if(GetEnvironmentVariable(name.c_str(), chrData, 1023))
retVal.assign(chrData);
#else
char *env = getenv(name.c_str());
if(env != NULL)
retVal.assign(env);
#endif // _WIN32
return retVal;
}
std::string getSystemProxy()
{
#ifdef _WIN32