Documentation
¶
Index ¶
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func GetCert() tls.Certificate
- func GetRandomString(l int, id ...int) string
- func InitTls()
- func Md5(s string) string
- func NewTlsClientConn(conn net.Conn) net.Conn
- func NewTlsServerConn(conn net.Conn) net.Conn
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) (error, []byte)
- func ReadClientHello(clientConn net.Conn) (helloInfo *tls.ClientHelloInfo, rawData []byte, err error)
- type ReadOnlyConn
- func (c *ReadOnlyConn) Close() error
- func (c *ReadOnlyConn) LocalAddr() net.Addr
- func (c *ReadOnlyConn) Read(p []byte) (int, error)
- func (c *ReadOnlyConn) RemoteAddr() net.Addr
- func (c *ReadOnlyConn) SetDeadline(_ time.Time) error
- func (c *ReadOnlyConn) SetReadDeadline(_ time.Time) error
- func (c *ReadOnlyConn) SetWriteDeadline(_ time.Time) error
- func (c *ReadOnlyConn) Write(_ []byte) (int, error)
- type SniffConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCert ¶
func GetCert() tls.Certificate
func GetRandomString ¶
GetRandomString 生成指定长度的随机密钥,支持可选传入id
func PKCS5Padding ¶
Completion when the length is insufficient
func ReadClientHello ¶
Types ¶
type ReadOnlyConn ¶
type ReadOnlyConn struct {
// contains filtered or unexported fields
}
func (*ReadOnlyConn) Close ¶
func (c *ReadOnlyConn) Close() error
func (*ReadOnlyConn) LocalAddr ¶
func (c *ReadOnlyConn) LocalAddr() net.Addr
func (*ReadOnlyConn) RemoteAddr ¶
func (c *ReadOnlyConn) RemoteAddr() net.Addr
func (*ReadOnlyConn) SetDeadline ¶
func (c *ReadOnlyConn) SetDeadline(_ time.Time) error
func (*ReadOnlyConn) SetReadDeadline ¶
func (c *ReadOnlyConn) SetReadDeadline(_ time.Time) error
func (*ReadOnlyConn) SetWriteDeadline ¶
func (c *ReadOnlyConn) SetWriteDeadline(_ time.Time) error
Click to show internal directories.
Click to hide internal directories.