sing-box/common/badtls/link.go

23 lines
457 B
Go
Raw Normal View History

2023-04-18 11:56:01 +00:00
//go:build go1.20 && !go.1.21
2022-09-30 03:27:18 +00:00
package badtls
import (
"reflect"
_ "unsafe"
)
const (
maxPlaintext = 16384 // maximum plaintext payload length
recordHeaderLen = 5 // record header length
)
//go:linkname errShutdown crypto/tls.errShutdown
var errShutdown error
//go:linkname incSeq crypto/tls.(*halfConn).incSeq
func incSeq(conn uintptr)
//go:linkname valueInterface reflect.valueInterface
func valueInterface(v reflect.Value, safe bool) any