switch core support

add nekobox_core

linux: use sing-box for vpn
This commit is contained in:
arm64v8a
2022-09-24 22:42:22 +08:00
parent a083010795
commit 9ebf6fe807
87 changed files with 3496 additions and 1903 deletions

View File

@@ -196,19 +196,6 @@ namespace NekoRay::rpc {
}
}
QString Client::SetTun(bool *rpcOK, const libcore::SetTunReq &request) {
libcore::ErrorResp reply;
auto status = grpc_channel->Call("SetTun", request, &reply);
if (status == QNetworkReply::NoError) {
*rpcOK = true;
return {reply.error().c_str()};
} else {
NOT_OK
return "";
}
}
QString Client::Stop(bool *rpcOK) {
libcore::EmptyReq request;
libcore::ErrorResp reply;
@@ -250,10 +237,10 @@ namespace NekoRay::rpc {
}
}
std::string Client::ListV2rayConnections() {
std::string Client::ListConnections() {
libcore::EmptyReq request;
libcore::ListV2rayConnectionsResp reply;
auto status = grpc_channel->Call("ListV2rayConnections", request, &reply, 500);
libcore::ListConnectionsResp reply;
auto status = grpc_channel->Call("ListConnections", request, &reply, 500);
if (status == QNetworkReply::NoError) {
return reply.matsuri_connections_json();