Proxy is working in a simple mode now

This commit is contained in:
9seconds
2021-03-23 15:14:36 +03:00
parent 66c45dc83b
commit a3362c7ea4
9 changed files with 220 additions and 26 deletions
@@ -60,3 +60,13 @@ func (h *handshakeFrame) iv() []byte {
func (h *handshakeFrame) connectionType() []byte {
return h.data[handshakeFrameOffsetConnectionType:handshakeFrameOffsetDC]
}
func (h *handshakeFrame) invert() handshakeFrame {
copyFrame := *h
for i := 0; i < handshakeFrameLenKey+handshakeFrameLenIV; i++ {
copyFrame.data[handshakeFrameOffsetKey+i] = h.data[handshakeFrameOffsetConnectionType-1-i]
}
return copyFrame
}