Connection string support for XRay protocol (#777)
* Connection string support for XRay protocol
This commit is contained in:
parent
d8020878d5
commit
e6ee9085a2
39 changed files with 20709 additions and 11 deletions
38
client/core/serialization/inbound.cpp
Normal file
38
client/core/serialization/inbound.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include <QString>
|
||||
#include <QJsonObject>
|
||||
#include <QList>
|
||||
#include "3rd/QJsonStruct/QJsonIO.hpp"
|
||||
#include "transfer.h"
|
||||
#include "serialization.h"
|
||||
|
||||
namespace amnezia::serialization::inbounds
|
||||
{
|
||||
|
||||
//"inbounds": [
|
||||
// {
|
||||
// "listen": "127.0.0.1",
|
||||
// "port": 10808,
|
||||
// "protocol": "socks",
|
||||
// "settings": {
|
||||
// "udp": true
|
||||
// }
|
||||
// }
|
||||
//],
|
||||
|
||||
const static QString listen = "127.0.0.1";
|
||||
const static int port = 10808;
|
||||
const static QString protocol = "socks";
|
||||
|
||||
QJsonObject GenerateInboundEntry()
|
||||
{
|
||||
QJsonObject root;
|
||||
QJsonIO::SetValue(root, listen, "listen");
|
||||
QJsonIO::SetValue(root, port, "port");
|
||||
QJsonIO::SetValue(root, protocol, "protocol");
|
||||
QJsonIO::SetValue(root, true, "settings", "udp");
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
} // namespace amnezia::serialization::inbounds
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue