mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
delete insecure hint
This commit is contained in:
@@ -63,10 +63,6 @@ namespace NekoRay::fmt {
|
||||
virtual ExternalBuildResult BuildExternal(int mapping_port, int socks_port, int external_stat) { return {}; };
|
||||
|
||||
virtual QString ToShareLink() { return {}; };
|
||||
|
||||
virtual QString InsecureHint() { return {}; };
|
||||
|
||||
QString DisplayInsecureHint();
|
||||
};
|
||||
|
||||
} // namespace NekoRay::fmt
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
#include "V2RayStreamSettings.hpp"
|
||||
#include "ShadowSocksBean.hpp"
|
||||
#include "VMessBean.hpp"
|
||||
#include "TrojanVLESSBean.hpp"
|
||||
#include "SocksHttpBean.hpp"
|
||||
|
||||
namespace NekoRay::fmt {
|
||||
QString AbstractBean::DisplayInsecureHint() {
|
||||
if (!dataStore->insecure_hint) return {};
|
||||
auto insecure_hint = InsecureHint();
|
||||
auto stream = GetStreamSettings(this);
|
||||
if (stream != nullptr) insecure_hint += "\n" + stream->InsecureHint();
|
||||
return insecure_hint.trimmed();
|
||||
}
|
||||
|
||||
QString V2rayStreamSettings::InsecureHint() const {
|
||||
if (allow_insecure) {
|
||||
return QObject::tr("The configuration (insecure) can be detected and identified, the transmission is fully visible to the censor and is not resistant to man-in-the-middle tampering with the content of the communication.");
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
QString ShadowSocksBean::InsecureHint() {
|
||||
if (method.contains("-poly") || method.contains("-gcm")) {
|
||||
return {};
|
||||
}
|
||||
return QObject::tr(
|
||||
"This configuration (Shadowsocks streaming cipher) can be accurately proactively detected and decrypted by censors without requiring a password, and cannot be mitigated by turning on IV replay filters on the server side.\n"
|
||||
"\n"
|
||||
"Learn more: https://github.com/net4people/bbs/issues/24");
|
||||
}
|
||||
|
||||
QString VMessBean::InsecureHint() {
|
||||
if (security == "none" || security == "zero") {
|
||||
if (stream->security.isEmpty()) {
|
||||
return QObject::tr("This profile is cleartext, don't use it if the server is not in your local network.");
|
||||
}
|
||||
}
|
||||
if (aid > 0) {
|
||||
return QObject::tr(
|
||||
"This configuration (VMess MD5 authentication) has been deprecated by upstream because of its questionable resistance to tampering and concealment.\n"
|
||||
"\n"
|
||||
"As of January 1, 2022, compatibility with MD5 authentication information will be disabled on the server side by default. Any client using MD5 authentication information will not be able to connect to a server with VMess MD5 authentication information disabled.");
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
QString TrojanVLESSBean::InsecureHint() {
|
||||
if (stream->security.isEmpty()) {
|
||||
return QObject::tr("This profile is cleartext, don't use it if the server is not in your local network.");
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
QString SocksHttpBean::InsecureHint() {
|
||||
if (stream->security.isEmpty()) {
|
||||
return QObject::tr("This profile is cleartext, don't use it if the server is not in your local network.");
|
||||
}
|
||||
return {};
|
||||
}
|
||||
} // namespace NekoRay::fmt
|
||||
@@ -28,7 +28,5 @@ namespace NekoRay::fmt {
|
||||
bool TryParseLink(const QString &link);
|
||||
|
||||
QString ToShareLink() override;
|
||||
|
||||
QString InsecureHint() override;
|
||||
};
|
||||
} // namespace NekoRay::fmt
|
||||
|
||||
@@ -33,7 +33,5 @@ namespace NekoRay::fmt {
|
||||
bool TryParseLink(const QString &link);
|
||||
|
||||
QString ToShareLink() override;
|
||||
|
||||
QString InsecureHint() override;
|
||||
};
|
||||
} // namespace NekoRay::fmt
|
||||
|
||||
@@ -31,7 +31,5 @@ namespace NekoRay::fmt {
|
||||
bool TryParseLink(const QString &link);
|
||||
|
||||
QString ToShareLink() override;
|
||||
|
||||
QString InsecureHint() override;
|
||||
};
|
||||
} // namespace NekoRay::fmt
|
||||
@@ -47,8 +47,6 @@ namespace NekoRay::fmt {
|
||||
QJsonObject BuildStreamSettingsV2Ray();
|
||||
|
||||
void BuildStreamSettingsSingBox(QJsonObject *outbound);
|
||||
|
||||
[[nodiscard]] QString InsecureHint() const;
|
||||
};
|
||||
|
||||
inline V2rayStreamSettings *GetStreamSettings(AbstractBean *bean) {
|
||||
|
||||
@@ -28,7 +28,5 @@ namespace NekoRay::fmt {
|
||||
bool TryParseLink(const QString &link);
|
||||
|
||||
QString ToShareLink() override;
|
||||
|
||||
QString InsecureHint() override;
|
||||
};
|
||||
} // namespace NekoRay::fmt
|
||||
|
||||
Reference in New Issue
Block a user