minor refactor

This commit is contained in:
arm64v8a
2023-05-22 11:07:14 +09:00
parent 1b050dd3fb
commit c5122b77e4
98 changed files with 1173 additions and 1142 deletions

View File

@@ -7,7 +7,7 @@
auto streamSettings = stream->BuildStreamSettingsV2Ray(); \
outbound["streamSettings"] = streamSettings;
namespace NekoRay::fmt {
namespace NekoGui_fmt {
QJsonObject V2rayStreamSettings::BuildStreamSettingsV2Ray() {
QJsonObject streamSettings{{"network", network}};
@@ -56,10 +56,10 @@ namespace NekoRay::fmt {
}
if (security == "tls") {
auto fp = utlsFingerprint.isEmpty() ? NekoRay::dataStore->utlsFingerprint : utlsFingerprint;
auto fp = utlsFingerprint.isEmpty() ? NekoGui::dataStore->utlsFingerprint : utlsFingerprint;
bool v5_utls = !fp.isEmpty();
QJsonObject tls;
if (allow_insecure || dataStore->skip_cert) tls["allowInsecure"] = true;
if (allow_insecure || NekoGui::dataStore->skip_cert) tls["allowInsecure"] = true;
if (!sni.trimmed().isEmpty()) tls["serverName"] = sni;
if (!certificate.trimmed().isEmpty()) {
tls["disableSystemRoot"] = true;
@@ -212,4 +212,4 @@ namespace NekoRay::fmt {
return result;
}
} // namespace NekoRay::fmt
} // namespace NekoGui_fmt