func NewNegotiationReply(method byte) *NegotiationReply {
	return &NegotiationReply{
		Ver:    Ver,
		Method: method,
	}
}
NewNegotiationReply return negotiation reply packet can be writed into client
package socks5
import (
	"errors"
	"io"
	"log"
)
var (
	ErrVersion = errors.New("Invalid Version")
	ErrUserPassVersion = errors.New("Invalid Version of Username Password Auth")
	ErrBadRequest = errors.New("Bad Request")
)
func NewNegotiationRequestFrom(r io.Reader) (*NegotiationRequest, error) {
	bb := make([]byte, 2)
	if _, err := io.ReadFull(r, bb); err != nil {
		return nil, err
	}
	if bb[0] != Ver {
		return nil, ErrVersion
	}
	if bb[1] == 0 {
		return nil, ErrBadRequest
	}
	ms := make([]byte, int(bb[1]))
	if _, err := io.ReadFull(r, ms); err != nil {
		return nil, err
	}
	if Debug {
		log.Printf("Got NegotiationRequest: %#v %#v %#v\n", bb[0], bb[1], ms)
	}
	return &NegotiationRequest{
		Ver:      bb[0],
		NMethods: bb[1],
		Methods:  ms,
	}, nil
}