mirror of
https://github.com/xvzc/SpoofDPI.git
synced 2025-01-22 12:13:01 +00:00
20 lines
297 B
Go
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:]}
|
|
}
|