Skip to content
This repository has been archived by the owner. It is now read-only.
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

QvRPCBridge

license downloads

A bridge for Qv2ray and v2ray-core to communicate with each other.

API

// connect to grpc server
extern char* Dial(char* address, uint32_t timeout);

// get information from server
extern uint64_t GetStats(char* name, uint32_t timeout);

Usage

Before getting information from GetStats, one must call Dial in prior to setup connection:

Dial("127.0.0.1:14950", 10000);

This API call is blocking, so be careful when using in main thread.

After that, one can call GetStats to fetch information from v2ray-core:

// uint64_t
auto stats = GetStats("inbound>>>socks_IN>>>traffic>>>downlink", 3000);

Linking

This library is provided as a .a file to preserve compatibility between different linkers.

Note that you may need to link -framework Security on macOS.

You can’t perform that action at this time.