refactor vpn settings

fix: nekoray_core freedom udp loopback

feat: copy custom config
This commit is contained in:
arm64v8a
2022-09-25 13:12:29 +08:00
parent 913b5c8be6
commit bbcd9df977
24 changed files with 454 additions and 190 deletions

View File

@@ -35,6 +35,15 @@ inline QString SubStrAfter(QString str, const QString &sub) {
return str.right(str.length() - str.indexOf(sub) - sub.length());
}
inline QString QStringList2Command(const QStringList &list) {
QStringList new_list;
for (auto str: list) {
auto q = "\"" + str.replace("\"", "\\\"") + "\"";
new_list << q;
}
return new_list.join(" ");
}
inline QString
DecodeB64IfValid(const QString &input, QByteArray::Base64Option options = QByteArray::Base64Option::Base64Encoding) {
auto result = QByteArray::fromBase64Encoding(input.toUtf8(),