Versions in this module Expand all Collapse all v0 v0.0.2 Apr 19, 2024 Changes in this version type Option + func WithDial(dial func(ctx context.Context, network, addr string) (net.Conn, error)) Option v0.0.1 Mar 1, 2024 Changes in this version + type CertificateFileConfig struct + PrivateKeyFile string + PublicKeyFile string + type Option func(s *Server) + func WhichAuthenticationHandler(handler authenticationHandler) Option + func WhichErrorHandler(handler errorHandler) Option + func WhichRequestHandler(handler requestHandler) Option + func WithConfig(config *TrojanConfig) Option + func WithConnectHandler(handler connectHandler) Option + func WithLogger(l *logrus.Logger) Option + type ReverseProxyConfig struct + Host string + Port int + RemoteURL string + Scheme string + type Server struct + func NewServer(opts ...Option) *Server + func (s *Server) ListenAndServe(network, addr string) error + func (s *Server) ServeConn(conn net.Conn) + type TLSConfig struct + Certificate tls.Certificate + MaxVersion uint16 + MinVersion uint16 + type TrojanConfig struct + Password string + ReverseProxyConfig *ReverseProxyConfig + TLSConfig *TLSConfig