Skip to content

Commit

Permalink
Fix Vision reader
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhan6665 committed Sep 17, 2023
1 parent 92bec53 commit 585d5ba
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,21 +159,15 @@ func (w *VisionReader) ReadMultiBuffer() (buf.MultiBuffer, error) {
}
}
buffer = mb2
if w.trafficState.RemainingContent == 0 && w.trafficState.RemainingPadding == 0 {
if w.trafficState.CurrentCommand == 1 {
w.trafficState.WithinPaddingBuffers = false
} else if w.trafficState.CurrentCommand == 2 {
w.trafficState.WithinPaddingBuffers = false
w.trafficState.ReaderSwitchToDirectCopy = true
} else if w.trafficState.CurrentCommand == 0 {
w.trafficState.WithinPaddingBuffers = true
} else {
newError("XtlsRead unknown command ", w.trafficState.CurrentCommand, buffer.Len()).WriteToLog(session.ExportIDToError(w.ctx))
}
} else if w.trafficState.RemainingContent > 0 || w.trafficState.RemainingPadding > 0 {
if w.trafficState.RemainingContent > 0 || w.trafficState.RemainingPadding > 0 || w.trafficState.CurrentCommand == 0 {
w.trafficState.WithinPaddingBuffers = true
} else {
} else if w.trafficState.CurrentCommand == 1 {
w.trafficState.WithinPaddingBuffers = false
} else if w.trafficState.CurrentCommand == 2 {
w.trafficState.WithinPaddingBuffers = false
w.trafficState.ReaderSwitchToDirectCopy = true
} else {
newError("XtlsRead unknown command ", w.trafficState.CurrentCommand, buffer.Len()).WriteToLog(session.ExportIDToError(w.ctx))
}
}
if w.trafficState.NumberOfPacketToFilter > 0 {
Expand Down

4 comments on commit 585d5ba

@VariatezzZ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该 commit 构建的双端使用 tcp + xtls 表现有问题,chrome 打卡网页显示 ERR_CONNECTION_CLOSED 错误;reality 表现无问题。回退至 c00e56c 则一切正常

@yuhan6665
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该 commit 构建的双端使用 tcp + xtls 表现有问题,chrome 打卡网页显示 ERR_CONNECTION_CLOSED 错误;reality 表现无问题。回退至 c00e56c 则一切正常

麻烦开个issue 发一下两端日志 谢谢

@VariatezzZ
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该 commit 构建的双端使用 tcp + xtls 表现有问题,chrome 打卡网页显示 ERR_CONNECTION_CLOSED 错误;reality 表现无问题。回退至 c00e56c 则一切正常

麻烦开个issue 发一下两端日志 谢谢

已发,见 #2567

@chika0801
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VLESS VISION TLS 还真没测试,空了试试

Please sign in to comment.