mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
fix naive link
This commit is contained in:
@@ -81,7 +81,7 @@ namespace NekoRay::fmt {
|
|||||||
|
|
||||||
QString NaiveBean::ToShareLink() {
|
QString NaiveBean::ToShareLink() {
|
||||||
QUrl url;
|
QUrl url;
|
||||||
url.setScheme("https+naive");
|
url.setScheme("naive+" + protocol);
|
||||||
url.setUserName(username);
|
url.setUserName(username);
|
||||||
url.setPassword(password);
|
url.setPassword(password);
|
||||||
url.setHost(serverAddress);
|
url.setHost(serverAddress);
|
||||||
|
|||||||
@@ -136,6 +136,9 @@ namespace NekoRay::fmt {
|
|||||||
auto url = QUrl(link);
|
auto url = QUrl(link);
|
||||||
if (!url.isValid()) return false;
|
if (!url.isValid()) return false;
|
||||||
|
|
||||||
|
protocol = url.scheme().replace("naive+", "");
|
||||||
|
if (protocol != "https" && protocol != "quic") return false;
|
||||||
|
|
||||||
name = url.fragment(QUrl::FullyDecoded);
|
name = url.fragment(QUrl::FullyDecoded);
|
||||||
serverAddress = url.host();
|
serverAddress = url.host();
|
||||||
serverPort = url.port();
|
serverPort = url.port();
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace NekoRay::sub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Naive
|
// Naive
|
||||||
if (str.startsWith("https+naive://")) {
|
if (str.startsWith("naive+")) {
|
||||||
ent = ProfileManager::NewProxyEntity("naive");
|
ent = ProfileManager::NewProxyEntity("naive");
|
||||||
auto ok = ent->NaiveBean()->TryParseLink(str);
|
auto ok = ent->NaiveBean()->TryParseLink(str);
|
||||||
if (!ok) return;
|
if (!ok) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user