reject

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Overview

Package reject implements a virtual proxy which always reject requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRejectDialer

func NewRejectDialer(s string, d proxy.Dialer) (proxy.Dialer, error)

NewRejectDialer returns a reject proxy dialer.

Types

type Reject

type Reject struct{}

A Reject represents the base struct of a reject proxy.

func NewReject

func NewReject(s string, d proxy.Dialer) (*Reject, error)

NewReject returns a reject proxy, reject://.

func (*Reject) Addr

func (s *Reject) Addr() string

Addr returns forwarder's address.

func (*Reject) Dial

func (s *Reject) Dial(network, addr string) (net.Conn, error)

Dial connects to the address addr on the network net via the proxy.

func (*Reject) DialUDP

func (s *Reject) DialUDP(network, addr string) (net.PacketConn, net.Addr, error)

DialUDP connects to the given address via the proxy.

Jump to

Keyboard shortcuts

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