Skip to content

Latest commit

 

History

History
77 lines (64 loc) · 1.3 KB

README.md

File metadata and controls

77 lines (64 loc) · 1.3 KB

Http3 server for FNS

Install

go get github.com/aacfactory/fns-contrib/transports/http3

Usage

Make sure tls is used.

import (
    "github.com/aacfactory/fns-contrib/transports/http3"
)
tr := http3.New()

Setup config, see quic for more quic config detail.

transport:
  name: "http3"
  tls:
    kind: "SSC"
    options:
      ca: "{path of ca}"
      caKey: "{path of ca key}"
  options:
    enableDatagrams: true
    maxRequestHeaderSize: "4K"
    quic:
      handshakeIdleTimeout: "2s"
      maxIdleTimeout: "60s"
      keepAlivePeriod: "60s"
    client:
      maxConnsPerHost: 64
      maxResponseHeaderSize: "4K"
      timeout: "2s"

Enable announce that this server supports HTTP/3.

tr := http3.NewWithAlternative(fast.New())
transport:
  name: "http3"
  tls:
    kind: "SSC"
    options:
      ca: "{path of ca}"
      caKey: "{path of ca key}"
  options:
    enableDatagrams: true
    maxHeaderBytes: "4K"
    quic:
      handshakeIdleTimeout: "2s"
      maxIdleTimeout: "60s"
      keepAlivePeriod: "60s"
    client:
      maxConnsPerHost: 64
      maxResponseHeaderBytes: "4K"
      timeout: "2s"
    alternative: # alternative http server config
      name: "fasthttp" 
      options:
        foo: "bar"