Documentation
¶
Index ¶
- type Instance
- type Server
- func (s *Server) Close() error
- func (s *Server) RouteConnection(ctx context.Context, conn net.Conn, metadata boxAdapter.InboundContext) error
- func (s *Server) RouteConnectionEx(ctx context.Context, conn net.Conn, metadata boxAdapter.InboundContext, ...)
- func (s *Server) RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata boxAdapter.InboundContext) error
- func (s *Server) RoutePacketConnectionEx(ctx context.Context, conn N.PacketConn, metadata boxAdapter.InboundContext, ...)
- func (s *Server) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server runs one panel node: it keeps a node server in sync with the panel and routes, accounts and reports everything its users send.
func NewServer ¶
func NewServer(ctx context.Context, logger log.ContextLogger, errorReporter reporter.Reporter, options option.ServerOptions) (*Server, error)
func (*Server) RouteConnection ¶
func (s *Server) RouteConnection(ctx context.Context, conn net.Conn, metadata boxAdapter.InboundContext) error
RouteConnection serves handlers that still use the blocking interface, such as Shadowsocks and UoT. It returns once the connection is done.
func (*Server) RouteConnectionEx ¶
func (s *Server) RouteConnectionEx(ctx context.Context, conn net.Conn, metadata boxAdapter.InboundContext, onClose N.CloseHandlerFunc)
RouteConnectionEx is where every proxied TCP connection lands once a node server has authenticated it.
func (*Server) RoutePacketConnection ¶
func (s *Server) RoutePacketConnection(ctx context.Context, conn N.PacketConn, metadata boxAdapter.InboundContext) error
func (*Server) RoutePacketConnectionEx ¶
func (s *Server) RoutePacketConnectionEx(ctx context.Context, conn N.PacketConn, metadata boxAdapter.InboundContext, onClose N.CloseHandlerFunc)
Directories
¶
| Path | Synopsis |
|---|---|
|
serverv1
Package serverv1 implements NeXT-Panel Server API V1 (/api/server/v1).
|
Package serverv1 implements NeXT-Panel Server API V1 (/api/server/v1). |
|
cmd
|
|
|
internal/nextserverbuild
command
|
|
|
next-server
command
|
|
|
common
|
|
|
limit
Package limit throttles connections with a token bucket per direction.
|
Package limit throttles connections with a token bucket per direction. |
|
reporter
Package reporter sends errors to Sentry in builds with -tags with_sentry.
|
Package reporter sends errors to Sentry in builds with -tags with_sentry. |
|
inbound
Package inbound holds the listener plumbing the node servers share.
|
Package inbound holds the listener plumbing the node servers share. |
Click to show internal directories.
Click to hide internal directories.