mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 11:29:36 +03:00
Add PROXY Protocol support for freedom outbound
This commit is contained in:
@ -17,6 +17,7 @@ type FreedomConfig struct {
|
||||
Redirect string `json:"redirect"`
|
||||
UserLevel uint32 `json:"userLevel"`
|
||||
Fragment *Fragment `json:"fragment"`
|
||||
ProxyProtocol uint32 `json:"proxyProtocol"`
|
||||
}
|
||||
|
||||
type Fragment struct {
|
||||
@ -165,5 +166,8 @@ func (c *FreedomConfig) Build() (proto.Message, error) {
|
||||
config.DestinationOverride.Server.Address = v2net.NewIPOrDomain(v2net.ParseAddress(host))
|
||||
}
|
||||
}
|
||||
if c.ProxyProtocol > 0 && c.ProxyProtocol <= 2 {
|
||||
config.ProxyProtocol = c.ProxyProtocol
|
||||
}
|
||||
return config, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user