Minor fixes

This commit is contained in:
世界
2023-03-03 16:31:07 +08:00
parent 19b15e0d10
commit 7ecb9fc738
9 changed files with 48 additions and 30 deletions

View File

@@ -128,7 +128,7 @@ func WriteRequest(writer io.Writer, request Request, payload []byte) error {
requestLen += 1 // protobuf length
var addonsLen int
if request.Flow != "" {
if request.Command == vmess.CommandTCP && request.Flow != "" {
addonsLen += 1 // protobuf header
addonsLen += UvarintLen(uint64(len(request.Flow)))
addonsLen += len(request.Flow)