SpoofDPI/request/https.go
2022-01-08 03:01:54 +09:00

20 lines
297 B
Go

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