slt

Go 中的 SNI 多路复用 TLS 反向代理。「A TLS reverse proxy with SNI multiplexing in Go」

Github星跟踪图

slt is a dead-simple TLS reverse-proxy with SNI multiplexing (TLS virtual hosts).

That means you can send TLS/SSL connections for multiple different applications to the same port and forward
them all to the appropriate backend hosts depending on the intended destination.

Features

SNI Multiplexing

slt multiplexes connections to a single TLS port by inspecting the name in the SNI extension field of each connection.

Simple YAML Configuration

You configure slt with a simple YAML configuration file:

bind_addr: ":443"

frontends:
  v1.example.com:
    backends:
      -
        addr: ":4443"

  v2.example.com:
    backends:
      -
        addr: "192.168.0.2:443"
      -
        addr: "192.168.0.1:443"

Optional TLS Termination

Sometimes, you don't actually want to terminate the TLS traffic, you just want to forward it elsewhere. slt only
terminates the TLS traffic if you specify a private key and certificate file like so:

frontends:
  v1.example.com:
    tls_key: /path/to/v1.example.com.key
    tls_crt: /path/to/v1.example.com.crt

Round robin load balancing among arbitrary backends

slt performs simple round-robin load balancing when more than one backend is available (other strategies will be available in the future):

frontends:
  v1.example.com:
    backends:
      -
        addr: ":8080"
      -
        addr: ":8081"

Running it

Running slt is also simple. It takes a single argument, the path to the configuration file:

./slt /path/to/config.yml

Building it

Just cd into the directory and "go build". It requires Go 1.1+.

Testing it

Just cd into the directory and "go test".

Stability

I run slt in production handling hundreds of thousands of connections daily.

License

Apache

主要指标

概览
名称与所有者inconshreveable/slt
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证Other
所有者活动
创建于2013-12-15 18:32:54
推送于2023-12-19 14:26:23
最后一次提交2017-10-02 11:47:31
发布数0
用户参与
星数414
关注者数19
派生数62
提交数11
已启用问题?
问题数16
打开的问题数12
拉请求数1
打开的拉请求数5
关闭的拉请求数2
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?