README.md 3.71 KB
Newer Older
François Michel's avatar
François Michel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# MPQUIC-FEC
This repositery contains a modified version of `MPQUIC` adding the Forward Erasure Correction (FEC) extension.

To compile this correctly, you will need to checkout the dependencies to an older version, as they made backward-incompatible changes. To do so, you can use the following commands :

    go get -d ./...
    pushd ~/go/src/github.com/bifurcation/mint && git checkout 64af8ab && popd
    pushd ~/go/src/github.com/vishvananda/netlink && git checkout ad19ca1 && popd
    
You can compile an example HTTP 2.0 over QUIC client and servers by compiling `example/test_http/main.go` like the following :

    go build -o quic-fec example/test_http/main.go


Marten Seemann's avatar
Marten Seemann committed
15
# A QUIC implementation in pure Go
Lucas Clemente's avatar
Lucas Clemente committed
16
17

<img src="docs/quic.png" width=303 height=124>
Lucas Clemente's avatar
Lucas Clemente committed
18

Marten Seemann's avatar
Marten Seemann committed
19
[![Godoc Reference](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/lucas-clemente/quic-go)
20
[![Linux Build Status](https://img.shields.io/travis/lucas-clemente/quic-go/master.svg?style=flat-square&label=linux+build)](https://travis-ci.org/lucas-clemente/quic-go)
21
[![Windows Build Status](https://img.shields.io/appveyor/ci/lucas-clemente/quic-go/master.svg?style=flat-square&label=windows+build)](https://ci.appveyor.com/project/lucas-clemente/quic-go/branch/master)
Lucas Clemente's avatar
Lucas Clemente committed
22
[![Code Coverage](https://img.shields.io/codecov/c/github/lucas-clemente/quic-go/master.svg?style=flat-square)](https://codecov.io/gh/lucas-clemente/quic-go/)
Lucas Clemente's avatar
Lucas Clemente committed
23

Marten Seemann's avatar
Marten Seemann committed
24
quic-go is an implementation of the [QUIC](https://en.wikipedia.org/wiki/QUIC) protocol in Go.
Lucas Clemente's avatar
Lucas Clemente committed
25

Lucas Clemente's avatar
Lucas Clemente committed
26
## Roadmap
Lucas Clemente's avatar
Lucas Clemente committed
27

Marten Seemann's avatar
Marten Seemann committed
28
29
quic-go is compatible with the current version(s) of Google Chrome and QUIC as deployed on Google's servers. We're actively tracking the development of the Chrome code to ensure compatibility as the protocol evolves. In that process, we're dropping support for old QUIC versions.
As Google's QUIC versions are expected to converge towards the [IETF QUIC draft](https://github.com/quicwg/base-drafts), quic-go will eventually implement that draft.
Lucas Clemente's avatar
Lucas Clemente committed
30
31
32

## Guides

33
We currently support Go 1.9+.
34

Marten Seemann's avatar
Marten Seemann committed
35
Installing and updating dependencies:
Lucas Clemente's avatar
Lucas Clemente committed
36

Marten Seemann's avatar
Marten Seemann committed
37
    go get -t -u ./...
Lucas Clemente's avatar
Lucas Clemente committed
38

Lucas Clemente's avatar
Lucas Clemente committed
39
40
41
42
Running tests:

    go test ./...

Marten Seemann's avatar
Marten Seemann committed
43
### Running the example server
Lucas Clemente's avatar
Lucas Clemente committed
44

Lucas Clemente's avatar
Lucas Clemente committed
45
    go run example/main.go -www /var/www/
Lucas Clemente's avatar
Lucas Clemente committed
46
47
48

Using the `quic_client` from chromium:

Marten Seemann's avatar
Marten Seemann committed
49
    quic_client --host=127.0.0.1 --port=6121 --v=1 https://quic.clemente.io
Lucas Clemente's avatar
Lucas Clemente committed
50

51
Using Chrome:
Lucas Clemente's avatar
Lucas Clemente committed
52
53

    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/chrome --no-proxy-server --enable-quic --origin-to-force-quic-on=quic.clemente.io:443 --host-resolver-rules='MAP quic.clemente.io:443 127.0.0.1:6121' https://quic.clemente.io
54

Lucas Clemente's avatar
Lucas Clemente committed
55
56
57
58
### QUIC without HTTP/2

Take a look at [this echo example](example/echo/echo.go).

Marten Seemann's avatar
Marten Seemann committed
59
60
### Using the example client

61
    go run example/client/main.go https://clemente.io
Marten Seemann's avatar
Marten Seemann committed
62

63
64
## Usage

Marten Seemann's avatar
Marten Seemann committed
65
66
### As a server

Lucas Clemente's avatar
Lucas Clemente committed
67
See the [example server](example/main.go) or try out [Caddy](https://github.com/mholt/caddy) (from version 0.9, [instructions here](https://github.com/mholt/caddy/wiki/QUIC)). Starting a QUIC server is very similar to the standard lib http in go:
68
69
70

```go
http.Handle("/", http.FileServer(http.Dir(wwwDir)))
71
h2quic.ListenAndServeQUIC("localhost:4242", "/path/to/cert/chain.pem", "/path/to/privkey.pem", nil)
72
```
73

Marten Seemann's avatar
Marten Seemann committed
74
75
### As a client

76
See the [example client](example/client/main.go). Use a `h2quic.RoundTripper` as a `Transport` in a `http.Client`.
Marten Seemann's avatar
Marten Seemann committed
77
78
79

```go
http.Client{
80
  Transport: &h2quic.RoundTripper{},
Marten Seemann's avatar
Marten Seemann committed
81
82
}
```
83
84
85

## Contributing

86
We are always happy to welcome new contributors! We have a number of self-contained issues that are suitable for first-time contributors, they are tagged with [help wanted](https://github.com/lucas-clemente/quic-go/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). If you have any questions, please feel free to reach out by opening an issue or leaving a comment.