ecs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMask4 = 24
	DefaultMask6 = 60
)
View Source
const Type = "ecs"

Variables

This section is empty.

Functions

func NewECS

func NewECS(_ context.Context, _ adapter.Core, logger log.Logger, tag string, args any) (adapter.PluginExecutor, error)

Types

type Args

type Args struct {
	IPv4        netip.Addr `json:"ipv4"`
	IPv6        netip.Addr `json:"ipv6"`
	Mask4       uint8      `json:"mask4"`
	Mask6       uint8      `json:"mask6"`
	UseClientIP bool       `json:"use-client-ip"`
}

type ECS

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

func (*ECS) Exec

func (e *ECS) Exec(ctx context.Context, dnsCtx *adapter.DNSContext, _ uint16) (adapter.ReturnMode, error)

func (*ECS) LoadRunningArgs

func (e *ECS) LoadRunningArgs(_ context.Context, _ any) (uint16, error)

func (*ECS) Tag

func (e *ECS) Tag() string

func (*ECS) Type

func (e *ECS) Type() string

Jump to

Keyboard shortcuts

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