fix proxy protocol

This commit is contained in:
ginuerzh
2022-09-28 11:47:56 +08:00
parent cf20abf656
commit a1255e52d8
41 changed files with 524 additions and 180 deletions

View File

@ -15,6 +15,7 @@ type metadata struct {
enableUDP bool
udpBufferSize int
compatibilityMode bool
hash string
}
func (h *socks5Handler) parseMetadata(md mdata.Metadata) (err error) {
@ -25,6 +26,7 @@ func (h *socks5Handler) parseMetadata(md mdata.Metadata) (err error) {
enableUDP = "udp"
udpBufferSize = "udpBufferSize"
compatibilityMode = "comp"
hash = "hash"
)
h.md.readTimeout = mdutil.GetDuration(md, readTimeout)
@ -39,6 +41,7 @@ func (h *socks5Handler) parseMetadata(md mdata.Metadata) (err error) {
}
h.md.compatibilityMode = mdutil.GetBool(md, compatibilityMode)
h.md.hash = mdutil.GetString(md, hash)
return nil
}