SpoofDPI/packet/https.go
2022-01-09 00:09:01 +09:00

20 lines
291 B
Go

package packet
type HttpsPacket struct {
Raw *[]byte
}
func NewHttpsPacket(raw *[]byte) HttpsPacket {
return HttpsPacket{
Raw: raw,
}
}
func (r HttpsPacket) SplitInChunks() [][]byte {
if len(*r.Raw) < 1 {
return [][]byte{*r.Raw}
}
return [][]byte{(*r.Raw)[:1], (*r.Raw)[1:]}
}