rproxy

package
v0.4.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Overview

* Apache License 2.0 * * Copyright (c) 2022, Austin Zhai * All rights reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dial

type Dial func(dst net.Addr, custom interface{}) (net.Conn, error)

type OptionRProxy

type OptionRProxy func(rproxy *RProxy) error

func OptionRProxyDial

func OptionRProxyDial(dial Dial) OptionRProxy

func OptionRProxyPostAccept

func OptionRProxyPostAccept(postAccept PostAccept) OptionRProxy

func OptionRProxyPostDial

func OptionRProxyPostDial(postDial PostDial) OptionRProxy

func OptionRProxyPreDial

func OptionRProxyPreDial(preDial PreDial) OptionRProxy

func OptionRProxyPreWrite

func OptionRProxyPreWrite(preWrite PreWrite) OptionRProxy

func OptionRProxyQuitOn added in v0.2.4

func OptionRProxyQuitOn(errs ...error) OptionRProxy

func OptionRProxyWaitOnErr added in v0.2.4

func OptionRProxyWaitOnErr(wait time.Duration) OptionRProxy

type Pipe

type Pipe struct {
	Src net.Addr
	Dst net.Addr
	// contains filtered or unexported fields
}

type PostAccept

type PostAccept func(src net.Addr, dst net.Addr) (interface{}, error)

You can return a custom data for later usage

type PostDial

type PostDial func(custom interface{}) error

type PreDial

type PreDial func(custom interface{}) error

type PreWrite

type PreWrite func(writer io.Writer, custom interface{}) error

type RProxy

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

func NewRProxy

func NewRProxy(ln net.Listener, options ...OptionRProxy) (*RProxy, error)

func (*RProxy) Close

func (rproxy *RProxy) Close()

func (*RProxy) Proxy

func (rproxy *RProxy) Proxy(ctx context.Context)

Jump to

Keyboard shortcuts

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