feat: inbound authorization

This commit is contained in:
arm64v8a
2023-01-12 12:51:03 +09:00
parent 10d7d9437a
commit 6a344bc3d5
22 changed files with 288 additions and 119 deletions

View File

@@ -34,6 +34,16 @@ namespace NekoRay {
void Delete(const QString &id);
};
class InboundAuthorization : public JsonStore {
public:
QString username;
QString password;
InboundAuthorization();
[[nodiscard]] bool NeedAuth() const;
};
class DataStore : public JsonStore {
public:
// Running
@@ -98,6 +108,7 @@ namespace NekoRay {
QString inbound_address = "127.0.0.1";
int inbound_socks_port = 2080; // or Mixed
int inbound_http_port = -2081;
InboundAuthorization *inbound_auth = new InboundAuthorization;
QString custom_inbound = "{\"inbounds\": []}";
// DNS