listener

package
v0.2.10-2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	Verbose bool

	net.Listener
	Upstream app.Upstream
	Proxy    app.Proxy
	Logger   *zap.Logger
	// contains filtered or unexported fields
}

func NewListener

func NewListener(ln net.Listener, up app.Upstream, px app.Proxy, logger *zap.Logger) *Listener

func (*Listener) Accept

func (l *Listener) Accept() (net.Conn, error)

func (*Listener) Close

func (l *Listener) Close() error

type ListenerWrapper

type ListenerWrapper struct {
	ProxyName string `json:"proxy_name,omitempty"`
	Verbose   bool   `json:"verbose,omitempty"`
	// contains filtered or unexported fields
}

ListenerWrapper implements an TLS wrapper that it accept connections from clients and check the connection with pre-defined password and aead cipher defined by go-shadowsocks2, and return a normal page if failed.

func (ListenerWrapper) CaddyModule

func (ListenerWrapper) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*ListenerWrapper) Provision

func (m *ListenerWrapper) Provision(ctx caddy.Context) error

Provision implements caddy.Provisioner.

func (*ListenerWrapper) UnmarshalCaddyfile

func (m *ListenerWrapper) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile unmarshals Caddyfile tokens into h.

func (*ListenerWrapper) WrapListener

func (m *ListenerWrapper) WrapListener(l net.Listener) net.Listener

WrapListener implements caddy.ListenWrapper

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL