Documentation
¶
Index ¶
- func ClientHandshake(conn net.Conn, hostPort, password string) error
- func ClientHandshakeTimeout(conn net.Conn, hostPort, password string, timeout time.Duration) error
- func Dial(network, address, hostPort, password string, config *tls.Config) (*tls.Conn, error)
- func DialTimeout(network, address, hostPort, password string, config *tls.Config, ...) (*tls.Conn, error)
- func Hash(password string) []byte
- func ServerHandshake(conn net.Conn, auth AuthMethod) (network string, hostPort string, err error)
- func ServerHandshakeTimeout(conn net.Conn, auth AuthMethod, timeout time.Duration) (network string, hostPort string, err error)
- type AuthFailure
- type AuthMethod
- type AuthPassword
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientHandshakeTimeout ¶
func DialTimeout ¶
func ServerHandshake ¶
func ServerHandshakeTimeout ¶
Types ¶
type AuthFailure ¶
type AuthFailure string
func (AuthFailure) Error ¶
func (a AuthFailure) Error() string
type AuthMethod ¶
AuthMethod trojan 认证方式接口
type AuthPassword ¶
func NewAuthPasswordMap ¶
func NewAuthPasswordMap(m map[string]int, toHash bool) *AuthPassword
func NewAuthPasswordSlice ¶
func NewAuthPasswordSlice(slice []string, toHash bool) *AuthPassword
func (*AuthPassword) Method ¶
func (a *AuthPassword) Method() string
Click to show internal directories.
Click to hide internal directories.