add: added libqvb as grpc api backend

This commit is contained in:
Qv2ray Bot 2020-01-22 15:07:11 +08:00
parent 46bf1cdd28
commit 2f4f70a165
8 changed files with 71 additions and 6 deletions

View File

@ -3,6 +3,7 @@ name: Qv2ray Push Build
on: push
jobs:
# ======================================================================================== WINDOWS
Windows:
name: Push build for win64
runs-on: windows-2019
@ -20,6 +21,14 @@ jobs:
# --------------------------------------------------------
- name: Extracting gRPC and protobuf libs and headers
run: tools\grpc_gen.bat
# --------------------------------------------------------
- name: Download libqvb static library.
uses: Legion2/download-release-action@v2.1.0
with:
repository: Qv2ray/QvRPCBridge
tag: 'latest'
path: libs
file: libqvb-win64.a
# --------------------------------------------------------
- name: Building Qv2ray
shell: cmd
@ -46,7 +55,7 @@ jobs:
name: Qv2ray.Win64.zip
path: build/Qv2ray.zip
# =========================================================================================
# ========================================================================================= MACOS
macOS:
name: Push build for macOS
@ -64,6 +73,14 @@ jobs:
# --------------------------------------------------------
- name: Extracting gRPC and protobuf libs and headers
run: tools/deps_macOS.sh
# --------------------------------------------------------
- name: Download libqvb static library.
uses: Legion2/download-release-action@v2.1.0
with:
repository: Qv2ray/QvRPCBridge
tag: 'latest'
path: libs
file: libqvb-darwin.a
# --------------------------------------------------------
- name: Building Qv2ray
run: |
@ -83,7 +100,7 @@ jobs:
with:
name: Qv2ray.macOS.app.zip
path: build/Qv2ray.app.tar.gz
# ===================================================================================
# =================================================================================== LINUX
Linux:
name: Push build for Linux
@ -108,6 +125,14 @@ jobs:
# --------------------------------------------------------
- name: Extracting gRPC and protobuf libs and headers
run: tools/grpc_gen.sh
# --------------------------------------------------------
- name: Download libqvb static library.
uses: Legion2/download-release-action@v2.1.0
with:
repository: Qv2ray/QvRPCBridge
tag: 'latest'
path: libs
file: libqvb-linux64.a
# --------------------------------------------------------
- name: Generate Makefile
run: |

View File

@ -22,6 +22,14 @@ jobs:
# --------------------------------------------------------
- name: Extracting gRPC and protobuf libs and headers
run: tools\grpc_gen.bat
# --------------------------------------------------------
- name: Download libqvb static library.
uses: Legion2/download-release-action@v2.1.0
with:
repository: Qv2ray/QvRPCBridge
tag: 'latest'
path: libs
file: libqvb-win64.a
# --------------------------------------------------------
- name: Building Qv2ray
shell: cmd
@ -74,6 +82,14 @@ jobs:
# --------------------------------------------------------
- name: Extracting gRPC and protobuf libs and headers
run: tools/deps_macOS.sh
# --------------------------------------------------------
- name: Download libqvb static library.
uses: Legion2/download-release-action@v2.1.0
with:
repository: Qv2ray/QvRPCBridge
tag: 'latest'
path: libs
file: libqvb-darwin.a
# --------------------------------------------------------
- name: Building Qv2ray
run: |
@ -126,6 +142,14 @@ jobs:
# --------------------------------------------------------
- name: Extracting gRPC and protobuf libs and headers
run: tools/grpc_gen.sh
# --------------------------------------------------------
- name: Download libqvb static library.
uses: Legion2/download-release-action@v2.1.0
with:
repository: Qv2ray/QvRPCBridge
tag: 'latest'
path: libs
file: libqvb-linux64.a
# --------------------------------------------------------
- name: Building Qv2ray
run: |

1
.gitignore vendored
View File

@ -7,5 +7,6 @@
SourceTrail/
libs/gen/
libs/libqvb-*
build/

3
.gitmodules vendored
View File

@ -16,3 +16,6 @@
[submodule "libs/gRPC-win32"]
path = libs/gRPC-win32
url = https://github.com/Qv2ray/gRPC-Windows-Packages
[submodule "libs/libqvb"]
path = libs/libqvb
url = https://github.com/Qv2ray/QvRPCBridge

View File

@ -1 +1 @@
3038
3044

View File

@ -84,7 +84,6 @@ INCLUDEPATH += \
libs/gen/
HEADERS += \
libs/libqvb.h \
src/Qv2rayBase.hpp \
src/Qv2rayFeatures.hpp \
src/QvCoreConfigObjects.hpp \
@ -235,13 +234,20 @@ win32 {
message(" --> Linking against winHTTP and winSock2.")
LIBS += -lwinhttp -lwininet -lws2_32
message(" --> Linking libqvb static library.")
LIBS += -L$$PWD/libs/ -lqvb-win64
}
macx {
# For Linux and macOS
message("Configuring for macOS specific environment")
LIBS += -framework Carbon -framework Cocoa
message(" --> Linking libgpr and libupb.")
LIBS += -lgpr -lupb
message(" --> Linking libqvb static library.")
LIBS += -L$$PWD/libs/ -lqvb-darwin
}
# Reuse unix for macx as well
@ -252,6 +258,9 @@ unix {
message(" --> Linking against gRPC and protobuf library.")
LIBS += -L/usr/local/lib -lgrpc++ -lprotobuf -lgrpc
message(" --> Linking libqvb static library.")
unix:!macx: LIBS += -L$$PWD/libs/ -lqvb-linux64
# macOS homebrew include path
message(" --> Adding local include folder to search path")
INCLUDEPATH += /usr/local/include/
@ -283,4 +292,6 @@ message(" ")
message("Done configuring Qv2ray project. Build output will be at:" $$OUT_PWD)
message("Type `make` or `mingw32-make` to start building Qv2ray")
unix|win32: LIBS += -L$$PWD/libs/ -lqvb

1
libs/libqvb Submodule

@ -0,0 +1 @@
Subproject commit 5589b7afe0b8ba56bb3e204f6c106bdd35dc07be

View File

@ -5,7 +5,7 @@
#include "QvCoreConfigOperations.hpp"
#include "QvCore/QvCommandLineArgs.hpp"
#include "libs/libqvb.h"
#include "libs/libqvb/build/libqvb.h"
using namespace v2ray::core::app::stats::command;
using grpc::Channel;