func WithGPool(pool GPool) Option {
	return func(s *Server) {
		s.gPool = pool
	}
}
WithGPool can be provided to do custom goroutine pool.
package socks5
import (
	"context"
	"io"
	"net"
	"github.com/things-go/go-socks5/bufferpool"
)
type Option func(s *Server)
func WithBufferPool(bufferPool bufferpool.BufPool) Option {
	return func(s *Server) {
		s.bufferPool = bufferPool
	}
}
func WithAuthMethods(authMethods []Authenticator) Option {
	return func(s *Server) {
		s.authMethods = append(s.authMethods, authMethods...)
	}
}
func WithCredential(cs CredentialStore) Option {
	return func(s *Server) {
		s.credentials = cs
	}
}
func WithResolver(res NameResolver) Option {
	return func(s *Server) {
		s.resolver = res
	}
}
func WithRule(rule RuleSet) Option {
	return func(s *Server) {
		s.rules = rule
	}
}
func WithRewriter(rew AddressRewriter) Option {
	return func(s *Server) {
		s.rewriter = rew
	}
}
func WithBindIP(ip net.IP) Option {
	return func(s *Server) {
		if len(ip) != 0 {
			s.bindIP = make(net.IP, 0, len(ip))
			s.bindIP = append(s.bindIP, ip...)
		}
	}
}
func WithLogger(l Logger) Option {
	return func(s *Server) {
		s.logger = l
	}
}
func WithDial(dial func(ctx context.Context, network, addr string) (net.Conn, error)) Option {
	return func(s *Server) {
		s.dial = dial
	}
}