Skip to content

Commit

Permalink
Fix issue #23.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr-Incognito committed Jun 19, 2020
1 parent 194b79a commit f73328e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
static const QString APP_NAME = "V2Ray-Desktop";
static const int APP_VERSION_MAJOR = 2;
static const int APP_VERSION_MINOR = 1;
static const int APP_VERSION_PATCH = 5;
static const int APP_VERSION_PATCH = 6;

static const QString APP_RELEASES_URL =
"https://api.github.com/repos/Dr-Incognito/V2Ray-Desktop/releases";
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ void messageHandler(QtMsgType msgType,
QFile logFile(Configurator::getAppLogFilePath());
logFile.open(QIODevice::WriteOnly | QIODevice::Append);
QTextStream logTextStream(&logFile);
logTextStream << logMessage.arg(dt, msgTypeStr, msg) << endl;
logTextStream << logMessage.arg(dt, msgTypeStr, msg) << Qt::endl;
logFile.close();
} else {
QTextStream(stdout) << logMessage.arg(dt, msgTypeStr, msg) << endl;
QTextStream(stdout) << logMessage.arg(dt, msgTypeStr, msg) << Qt::endl;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/serverconfighelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ QJsonObject ServerConfigHelper::getPrettyV2RayConfig(

QString network = serverConfig["network"].toString();
QString tcpHeader = serverConfig["tcpHeaderType"].toString();
qDebug() << network << tcpHeader;
if (network == "ws") {
v2RayConfig["network"] = "ws";
v2RayConfig["ws-path"] = serverConfig["networkPath"].toString();
v2RayConfig["ws-headers"] =
QJsonObject{{"Host", serverConfig["networkHost"].toString()}};
} else if (network == "tcp" && tcpHeader == "none") {
v2RayConfig["network"] = "tcp";
} else if (network == "tcp" && tcpHeader == "http") {
v2RayConfig["network"] = "http";
v2RayConfig["http-opts"] = QJsonObject{
Expand All @@ -172,7 +173,6 @@ QJsonObject ServerConfigHelper::getPrettyV2RayConfig(
{"Connection", QJsonArray{"keep-alive"}}}},
};
}
qDebug() << v2RayConfig;
return v2RayConfig;
}

Expand Down

0 comments on commit f73328e

Please sign in to comment.