Skip to content

H2 & H2C

名称: h2, h2c

状态: GA

H2监听器根据服务配置,监听在指定TCP端口,并使用HTTP2(HTTP2 Over TLS)或HTTP2 ClearText(HTTP2 Without TLS)协议进行通讯。

H2

gost -L http+h2://:8443
services:
- name: service-0
  addr: ":8443"
  handler:
    type: http
  listener:
    type: h2

H2C

gost -L http+h2c://:8443
services:
- name: service-0
  addr: ":8443"
  handler:
    type: http
  listener:
    type: h2c

参数列表

path (string)
请求URI
backlog (int, default=128)
单个连接的数据流队列大小

TLS配置请参考TLS配置说明