mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2024-12-22 22:36:53 +00:00
20 lines
291 B
Go
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:]}
|
|
}
|