• Stars
    star
    198
  • Rank 196,898 (Top 4 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

quiche

quiche is a work-in-progress QUIC implementation by BVC (Bilibili Video Cloud team). It is based on Google quiche(https://quiche.googlesource.com/quiche/). BVC uses this to enable gQUIC and iQUIC service capability on production, for example, there are quic proxy server and nginx quic module.

QUIC (Quick UDP Internet Connections) is a new transport which reduces latency compared to that of TCP. Look QUIC from 10000 feet, it is very similar to TCP+TLS+HTTP/2 implemented on UDP. Because TCP is implemented in operating system kernels, and middlebox firmware, making significant changes to TCP is next to impossible. However, since QUIC is built on top of UDP, it suffers from no such limitations.

Key features of QUIC+HTTP3 over existing TCP+TLS+HTTP2 include

  • User space implementation
  • Dramatically reduced connection establishment time
  • Improved congestion control
  • Multiplexing without head of line blocking
  • Connection migration

Google quiche is used in Chromium (http://www.chromium.org/quic) project. This repository integrates google quiche with some common-used repositories, which are independent of Chromium platform.

  • Platform related implementations of epoll server/client, http2 stack, quic stack
  • Rewrite include directives for google quiche source files

Features

  • Easy building with cmake
  • Only support Linux platform
  • Easy to keep pace with Google quiche upgrading
  • Support Qlog: APIs to expose transport and server statistics for debuggability with qvis

Source Layout

  • base: Implementation of basic platform functions
  • googleurl: Googleurl source files
  • gquiche: Google quiche source files
  • net: Implementation of platform net related functions
  • platform/epoll_platform_impl: Implementation of epoll client and server functions
  • platform/http2_platform_impl: Implementation of http2 stack functions
  • platform/quic_platform_impl: Implementation of quic stack functions
  • platform/quiche_platform_impl: Implementation of google quiche platform functions
  • platform/spdy_platform_impl: Implementation of spdy stack functions
  • third_party: Submodules of thirdparty repositories
  • utils: Scripts of some usefull utilities

Getting Started

Prerequisite

apt-get install cmake build-essential protobuf-compiler libprotobuf-dev golang-go libunwind-dev libicu-dev
git submodule update --init

Build

mkdir build && cd build  
cmake .. && make
cd -
extra cmake options values default
ENABLE_LINK_TCMALLOC on, off on

Play examples

  • A sample quic server and client implementation are provided in quiche. To use these you should build the binaries.
cd build
make simple_quic_server simple_quic_client
cd -
  • Download a copy of www.example.org, which we will serve locally using the simple_quic_server binary.
mkdir -p /data/quic-root
wget -p --save-headers https://www.example.org -P /data/quic-root
  • In order to run the simple_quic_server, you will need a valid certificate, and a private key is pkcs8 format. If you don't have one, there are scripts to generate them.
cd utils
./generate-certs.sh
mkdir -p /data/quic-cert
mv ./out/* /data/quic-cert/
cd -
  • Run the quic server
./build/simple_quic_server \
  --quic_response_cache_dir=/data/quic-root/ \
  --certificate_file=/data/quic-cert/leaf_cert.pem \
  --key_file=/data/quic-cert/leaf_cert.pkcs8
  • Request the file with quic client
./build/simple_quic_client \
  --disable_certificate_verification=true \
  --host=127.0.0.1 --port=6121 \
  "https://www.example.org/index.html"

You can also use chormium-based browsers to access simple_quic_server at 127.0.0.1:6121, and check the request/response protocol by DevTools -> Network panel.

More Repositories

1

ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
C
32,382
star
2

flv.js

HTML5 FLV Player
JavaScript
22,882
star
3

DanmakuFlameMaster

Android开源弹幕引擎·烈焰弹幕使 ~
Java
9,535
star
4

ailab

Python
5,588
star
5

MagicaSakura

MagicaSakura 是 Android 多主题框架。~ is an Android multi theme library which supporting both daily colorful theme and night theme.
Java
3,552
star
6

boxing

Android multi-media selector based on MVP mode.
Java
3,193
star
7

overlord

Overlord是哔哩哔哩基于Go语言编写的memcache和redis&cluster的代理及集群管理功能,致力于提供自动化高可用的缓存服务解决方案。
Go
2,213
star
8

gengine

Go
1,947
star
9

discovery

A registry for resilient mid-tier load balancing and failover.
Go
1,779
star
10

WebAV

WebAV is an SDK built on WebCodecs, designed for creating and editing video files on the web platform. WebAV 是基于 WebCodecs 构建的 SDK,用于在 Web 平台上创建/编辑视频文件。
TypeScript
895
star
11

Index-1.9B

A SOTA lightweight multilingual LLM
Python
877
star
12

vim-vide

Lightest vimrc, while strong enough. 最轻的vim配置,却足够强!
Vim Script
792
star
13

drawee-text-view

Simple drawee spannable text view based on Fresco
Java
762
star
14

join-us

大B站需要更多的小伙伴~ ( ゜- ゜)つロ 乾杯~
720
star
15

LastOrder-Dota2

Dota2 AI bot
Python
398
star
16

NativeBitmapFactory

DFM jni
C++
321
star
17

jni4android

JNI Generater for Android
C
309
star
18

BRouter

Kotlin
302
star
19

biliobs

C++
241
star
20

UnityBVA

C#
198
star
21

bas

Bilibili Animation Script
HTML
187
star
22

kratos-demo

a project that use kratos
Go
187
star
23

libyuv

mirror of https://chromium.googlesource.com/external/libyuv/
C++
151
star
24

apk-channelization

[不支持v2签名]Android多渠道输出脚本
Python
147
star
25

BurstLinker

🚀 A simple GIF encoder for Android.
C++
140
star
26

xpref

A SharedPreferences' wrapper that truly supported sharing data across multi-process
Kotlin
84
star
27

soundtouch

SoundTouch library compiled for ijkplayer/Android http://www.surina.net/soundtouch/sourcecode.html
C++
84
star
28

mahimahi

C++
74
star
29

muzei-bilibili

Muzei 插件,bilibili 壁纸源
Java
72
star
30

vlc-android-macbuild

Deprecated, official site is recommended http://git.videolan.org
Java
70
star
31

redis_sdk_cxx

C++
65
star
32

LastOrder

StarCraft AI bot
C++
62
star
33

vlc-ports-android

fork of git://git.videolan.org/vlc-ports/android.git
C++
57
star
34

bbip

Bilibili High Performance IP Resolve Library
C++
55
star
35

oresty

Lua
52
star
36

SMGo

Shang-Mi cipher library. Constant-time implementation of SM2 and SM4.
Go
42
star
37

http-service

TypeScript
40
star
38

bilibili.github.io

35
star
39

adaptation

too painful to work with PagerAdapter
Java
32
star
40

vlc

fork of git://git.videolan.org/vlc.git
C
30
star
41

openssl

mirror of https://www.openssl.org
C
30
star
42

twirp

twirp rpc
Go
27
star
43

ci-ijk-ffmpeg-ios

Prebuilt FFmpeg for ijkplayer on iOS
Shell
17
star
44

abtest

A layered experiment framework for C++/java/go
15
star
45

gas-preprocessor

personal fork of git://git.libav.org/gas-preprocessor.git
Perl
13
star
46

flvbind

A tools to combine multiple flv file to a single flv file.
C
13
star
47

uptool

JavaScript
12
star
48

nginx_quic_module

C
12
star
49

nginx_quic_stack

C++
11
star
50

jmp_logpipe

A tool for jumper analyize log and send the command to remove UDP server for aduit. And this tool will denied for lszrz protocol to prevent a large log for storage.
C
11
star
51

ci-ijk-ffmpeg-android

Continuous integration for ijkplayer on Android
8
star
52

vim

B站Vim会所
5
star
53

arrange-play

Java
5
star
54

bilibili_wtm

Python
1
star