outbound

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConn

func NewConn(c net.Conn, a constant.ProxyAdapter) constant.Conn

Types

type Base

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

func (*Base) Addr

func (b *Base) Addr() string

Addr implements constant.ProxyAdapter

func (*Base) DialOptions

func (b *Base) DialOptions(opts ...dialer.Option) []dialer.Option

DialOptions return []dialer.Option from struct

func (*Base) ListenPacketContext

func (b *Base) ListenPacketContext(_ context.Context, _ *constant.Metadata, _ ...dialer.Option) (constant.PacketConn, error)

ListenPacketContext implements constant.ProxyAdapter

func (*Base) MarshalJSON

func (b *Base) MarshalJSON() ([]byte, error)

MarshalJSON implements constant.ProxyAdapter

func (*Base) Name

func (b *Base) Name() string

Name implements constant.ProxyAdapter

func (*Base) StreamConn

func (b *Base) StreamConn(c net.Conn, _ *constant.Metadata) (net.Conn, error)

StreamConn implements constant.ProxyAdapter

func (*Base) SupportUDP

func (b *Base) SupportUDP() bool

SupportUDP implements constant.ProxyAdapter

func (*Base) Type

func (b *Base) Type() constant.AdapterType

Type implements constant.ProxyAdapter

func (*Base) Unwrap

func (b *Base) Unwrap(_ *constant.Metadata) constant.Proxy

Unwrap implements constant.ProxyAdapter

type BaseOption

type BaseOption struct {
	Name      string
	Addr      string
	Type      constant.AdapterType
	UDP       bool
	Interface string
}

type BasicOption

type BasicOption struct {
	Interface string `proxy:"interface-name,omitempty" group:"interface-name,omitempty"`
}

type Direct

type Direct struct {
	*Base
}

func NewDirect

func NewDirect() *Direct

func (*Direct) DialContext

func (d *Direct) DialContext(ctx context.Context, metadata *constant.Metadata, opts ...dialer.Option) (constant.Conn, error)

DialContext implements constant.ProxyAdapter

func (*Direct) ListenPacketContext

func (d *Direct) ListenPacketContext(ctx context.Context, _ *constant.Metadata, opts ...dialer.Option) (constant.PacketConn, error)

ListenPacketContext implements constant.ProxyAdapter

Jump to

Keyboard shortcuts

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