mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2025-01-03 04:50:11 +00:00
20 lines
285 B
Go
20 lines
285 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:]}
|
|
}
|