add buffer size option for udp connection

This commit is contained in:
ginuerzh
2025-07-30 21:40:53 +08:00
parent b64e5901b6
commit a5309eee97
26 changed files with 218 additions and 219 deletions
+2
View File
@@ -19,6 +19,7 @@ type metadata struct {
noTLS bool
enableBind bool
enableUDP bool
udpBufferSize int
compatibilityMode bool
hash string
muxCfg *mux.Config
@@ -50,6 +51,7 @@ func (h *socks5Handler) parseMetadata(md mdata.Metadata) (err error) {
h.md.noTLS = mdutil.GetBool(md, "notls")
h.md.enableBind = mdutil.GetBool(md, "bind")
h.md.enableUDP = mdutil.GetBool(md, "udp")
h.md.udpBufferSize = mdutil.GetInt(md, "udp.bufferSize", "udpBufferSize")
h.md.compatibilityMode = mdutil.GetBool(md, "comp")
h.md.hash = mdutil.GetString(md, "hash")