go-proxyproto

Golang package to handle HAProxy Proxy Protocol

  • 所有者: armon/go-proxyproto
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

proxyproto

This library provides the proxyproto package which can be used for servers
listening behind HAProxy of Amazon ELB load balancers. Those load balancers
support the use of a proxy protocol (http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt),
which provides a simple mechansim for the server to get the address of the client
instead of the load balancer.

This library provides both a net.Listener and net.Conn implementation that
can be used to handle situation in which you may be using the proxy protocol.
Only proxy protocol version 1, the human-readable form, is understood.

The only caveat is that we check for the "PROXY " prefix to determine if the protocol
is being used. If that string may occur as part of your input, then it is ambiguous
if the protocol is being used and you may have problems.

Documentation

Full documentation can be found here.

Examples

Using the library is very simple:


// Create a listener
list, err := net.Listen("tcp", "...")

// Wrap listener in a proxyproto listener
proxyList := &proxyproto.Listener{Listener: list}
conn, err :=proxyList.Accept()

...

主要指标

概览
名称与所有者armon/go-proxyproto
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2014-03-08 00:43:46
推送于2023-11-06 17:55:38
最后一次提交2023-11-06 12:55:23
发布数1
最新版本名称v0.1.0 (发布于 )
第一版名称v0.1.0 (发布于 )
用户参与
星数199
关注者数8
派生数53
提交数17
已启用问题?
问题数5
打开的问题数1
拉请求数7
打开的拉请求数2
关闭的拉请求数5
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?