mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-03-27 19:15:38 +08:00
支持PROXY Protocol
This commit is contained in:
21
pkg/serverconfigs/proxy_protocol_config.go
Normal file
21
pkg/serverconfigs/proxy_protocol_config.go
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package serverconfigs
|
||||
|
||||
type ProxyProtocolVersion = int
|
||||
|
||||
const (
|
||||
ProxyProtocolVersion1 ProxyProtocolVersion = 1
|
||||
ProxyProtocolVersion2 ProxyProtocolVersion = 2
|
||||
)
|
||||
|
||||
// ProxyProtocolConfig PROXY Protocol配置
|
||||
type ProxyProtocolConfig struct {
|
||||
IsOn bool `yaml:"isOn" json:"isOn"`
|
||||
Version ProxyProtocolVersion `yaml:"version" json:"version"`
|
||||
}
|
||||
|
||||
// Init 初始化
|
||||
func (this *ProxyProtocolConfig) Init() error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user