dunapi

package
v1.9.0-alpha.9-dun-1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProxyHttpClient

func CreateProxyHttpClient(box *dunbox.Box) *http.Client

func DialContext

func DialContext(ctx context.Context, box *dunbox.Box, network, addr string) (net.Conn, error)

func DialUDP

func DialUDP(ctx context.Context, box *dunbox.Box) (net.PacketConn, error)

Types

type SbStatsService

type SbStatsService struct {
	// contains filtered or unexported fields
}

func NewSbStatsService

func NewSbStatsService(options option.V2RayStatsServiceOptions) *SbStatsService

func (*SbStatsService) GetStats

func (s *SbStatsService) GetStats(ctx context.Context, name string, reset bool) (int64, error)

func (*SbStatsService) RoutedConnection

func (s *SbStatsService) RoutedConnection(inbound string, outbound string, user string, conn net.Conn) net.Conn

func (*SbStatsService) RoutedConnectionInternal

func (s *SbStatsService) RoutedConnectionInternal(inbound string, outbound string, user string, conn net.Conn, directIn bool) net.Conn

func (*SbStatsService) RoutedPacketConnection

func (s *SbStatsService) RoutedPacketConnection(inbound string, outbound string, user string, conn N.PacketConn) N.PacketConn

type SbV2rayServer

type SbV2rayServer struct {
	// contains filtered or unexported fields
}

func NewSbV2rayServer

func NewSbV2rayServer(options option.V2RayStatsServiceOptions) *SbV2rayServer

func (*SbV2rayServer) Close

func (s *SbV2rayServer) Close() error

func (*SbV2rayServer) QueryStats

func (s *SbV2rayServer) QueryStats(name string) int64

func (*SbV2rayServer) Start

func (s *SbV2rayServer) Start() error

func (*SbV2rayServer) StatsService

func (s *SbV2rayServer) StatsService() adapter.V2RayStatsService

Jump to

Keyboard shortcuts

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