• Stars
    star
    191
  • Rank 195,471 (Top 4 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created almost 3 years ago
  • Updated 7 months 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,047
star
2

flv.js

HTML5 FLV Player
JavaScript
22,695
star
3

DanmakuFlameMaster

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

ailab

Python
5,450
star
5

MagicaSakura

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

boxing

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

overlord

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

gengine

Go
1,867
star
9

discovery

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

vim-vide

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

drawee-text-view

Simple drawee spannable text view based on Fresco
Java
764
star
12

join-us

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

LastOrder-Dota2

Dota2 AI bot
Python
399
star
14

NativeBitmapFactory

DFM jni
C++
320
star
15

jni4android

JNI Generater for Android
C
305
star
16

BRouter

Kotlin
301
star
17

biliobs

C++
240
star
18

UnityBVA

C#
189
star
19

kratos-demo

a project that use kratos
Go
188
star
20

bas

Bilibili Animation Script
HTML
187
star
21

apk-channelization

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

libyuv

mirror of https://chromium.googlesource.com/external/libyuv/
C++
147
star
23

BurstLinker

🚀 A simple GIF encoder for Android.
C++
131
star
24

xpref

A SharedPreferences' wrapper that truly supported sharing data across multi-process
Kotlin
85
star
25

soundtouch

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

mahimahi

C++
76
star
27

muzei-bilibili

Muzei 插件,bilibili 壁纸源
Java
71
star
28

vlc-android-macbuild

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

LastOrder

StarCraft AI bot
C++
61
star
30

vlc-ports-android

fork of git://git.videolan.org/vlc-ports/android.git
C++
56
star
31

bbip

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

oresty

Lua
52
star
33

SMGo

Shang-Mi cipher library. Constant-time implementation of SM2 and SM4.
Go
40
star
34

bilibili.github.io

35
star
35

adaptation

too painful to work with PagerAdapter
Java
32
star
36

vlc

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

openssl

mirror of https://www.openssl.org
C
29
star
38

twirp

twirp rpc
Go
26
star
39

ci-ijk-ffmpeg-ios

Prebuilt FFmpeg for ijkplayer on iOS
Shell
18
star
40

abtest

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

flvbind

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

uptool

JavaScript
12
star
43

gas-preprocessor

personal fork of git://git.libav.org/gas-preprocessor.git
Perl
12
star
44

nginx_quic_module

C
12
star
45

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
10
star
46

nginx_quic_stack

C++
10
star
47

ci-ijk-ffmpeg-android

Continuous integration for ijkplayer on Android
8
star
48

vim

B站Vim会所
6
star
49

arrange-play

Java
5
star
50

IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
Objective-C
4
star
51

bilibili_wtm

Python
1
star