mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
switch core support
add nekobox_core linux: use sing-box for vpn
This commit is contained in:
19
rpc/gRPC.cpp
19
rpc/gRPC.cpp
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user