mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 10:50:23 +08:00
[Subscription] Added vmess convertion option for Subscriptions
Former-commit-id: f88d5986cf
This commit is contained in:
parent
621bc1efdf
commit
94b46523f1
@ -56,7 +56,7 @@ namespace Qv2ray
|
|||||||
bool SaveConnectionConfig(QJsonObject obj, const QString *alias);
|
bool SaveConnectionConfig(QJsonObject obj, const QString *alias);
|
||||||
bool RenameConnection(QString originalName, QString newName);
|
bool RenameConnection(QString originalName, QString newName);
|
||||||
// VMess Protocol
|
// VMess Protocol
|
||||||
QJsonObject ConvertConfigFromVMessString(QString vmess);
|
QJsonObject ConvertConfigFromVMessString(QString vmess, QString source = QV2RAY_CONFIG_TYPE_CONNECTIONSTRING);
|
||||||
QJsonObject ConvertConfigFromFile(QString sourceFilePath, bool overrideInbounds);
|
QJsonObject ConvertConfigFromFile(QString sourceFilePath, bool overrideInbounds);
|
||||||
// Load Configs
|
// Load Configs
|
||||||
QMap<QString, QJsonObject> GetConnections(list<string> connections);
|
QMap<QString, QJsonObject> GetConnections(list<string> connections);
|
||||||
|
@ -11,7 +11,7 @@ namespace Qv2ray
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This generates global config containing only one outbound....
|
// This generates global config containing only one outbound....
|
||||||
QJsonObject ConvertConfigFromVMessString(QString str)
|
QJsonObject ConvertConfigFromVMessString(QString str, QString source)
|
||||||
{
|
{
|
||||||
DROOT
|
DROOT
|
||||||
QStringRef vmessJsonB64(&str, 8, str.length() - 8);
|
QStringRef vmessJsonB64(&str, 8, str.length() - 8);
|
||||||
@ -66,7 +66,7 @@ namespace Qv2ray
|
|||||||
outbounds.append(outbound);
|
outbounds.append(outbound);
|
||||||
root.insert("outbounds", outbounds);
|
root.insert("outbounds", outbounds);
|
||||||
root.insert("QV2RAY_ALIAS", QString::fromStdString(vmessConf.ps));
|
root.insert("QV2RAY_ALIAS", QString::fromStdString(vmessConf.ps));
|
||||||
root.insert(QV2RAY_CONFIG_TYPE_JSON_KEY, QV2RAY_CONFIG_TYPE_CONNECTIONSTRING);
|
root.insert(QV2RAY_CONFIG_TYPE_JSON_KEY, source);
|
||||||
RROOT
|
RROOT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "w_RouteEditor.h"
|
#include "w_RouteEditor.h"
|
||||||
#include "ui_w_OutboundEditor.h"
|
#include "ui_w_RouteEditor.h"
|
||||||
|
|
||||||
RouteEditor::RouteEditor(QWidget *parent) :
|
RouteEditor::RouteEditor(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
|
@ -98,10 +98,10 @@
|
|||||||
<widget class="QListWidget" name="subscribeList">
|
<widget class="QListWidget" name="subscribeList">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>530</x>
|
<x>430</x>
|
||||||
<y>101</y>
|
<y>10</y>
|
||||||
<width>181</width>
|
<width>281</width>
|
||||||
<height>121</height>
|
<height>211</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
Loading…
Reference in New Issue
Block a user