Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCipherMethod ¶
Types ¶
type SSTCPConn ¶
type SSTCPConn struct { net.Conn sync.RWMutex *StreamCipher IObfs obfs.IObfs IProtocol protocol.IProtocol // contains filtered or unexported fields }
SSTCPConn the struct that override the net.Conn methods
func NewSSTCPConn ¶
func NewSSTCPConn(c net.Conn, cipher *StreamCipher) *SSTCPConn
type StreamCipher ¶
type StreamCipher struct {
// contains filtered or unexported fields
}
func NewStreamCipher ¶
func NewStreamCipher(method, password string) (c *StreamCipher, err error)
NewStreamCipher creates a cipher that can be used in Dial() etc. Use cipher.Copy() to create a new cipher with the same method and password to avoid the cost of repeated cipher initialization.
func (*StreamCipher) Copy ¶
func (c *StreamCipher) Copy() *StreamCipher
Copy creates a new cipher at it's initial state.
func (*StreamCipher) IV ¶
func (c *StreamCipher) IV() ([]byte, int)
func (*StreamCipher) Key ¶
func (c *StreamCipher) Key() (key []byte, keyLen int)
Click to show internal directories.
Click to hide internal directories.