point

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package point is a shell of V2Ray to run on various of systems. Point server is a full functionality proxying system. It consists of an inbound and an outbound connection, as well as any number of inbound and outbound detours. It provides a way internally to route network packets.

Index

Constants

This section is empty.

Variables

View Source
var (
	BadConfiguration = errors.New("Bad configuration.")
)

Functions

This section is empty.

Types

type ConnectionConfig

type ConnectionConfig interface {
	Protocol() string
	Settings() interface{}
}

type DnsConfig

type DnsConfig interface {
	Enabled() bool
	Settings() dns.CacheConfig
}

type InboundConnectionHandlerWithPort

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

type InboundDetourConfig

type InboundDetourConfig interface {
	Protocol() string
	PortRange() v2net.PortRange
	Tag() string
	Settings() interface{}
}

type InboundDetourHandler

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

Handler for inbound detour connections.

func (*InboundDetourHandler) Initialize

func (this *InboundDetourHandler) Initialize() error

func (*InboundDetourHandler) Start

func (this *InboundDetourHandler) Start() error

Starts the inbound connection handler.

type LogConfig

type LogConfig interface {
	AccessLog() string
	ErrorLog() string
	LogLevel() log.LogLevel
}

type OutboundDetourConfig

type OutboundDetourConfig interface {
	Protocol() string
	Tag() string
	Settings() interface{}
}

type Point

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

Point shell of V2Ray.

func NewPoint

func NewPoint(pConfig PointConfig) (*Point, error)

NewPoint returns a new Point server based on given configuration. The server is not started at this point.

func (*Point) DispatchToOutbound

func (this *Point) DispatchToOutbound(packet v2net.Packet) ray.InboundRay

Dispatches a Packet to an OutboundConnection. The packet will be passed through the router (if configured), and then sent to an outbound connection with matching tag.

func (*Point) Start

func (this *Point) Start() error

Start starts the Point server, and return any error during the process. In the case of any errors, the state of the server is unpredicatable.

type PointConfig

type PointConfig interface {
	Port() v2net.Port
	LogConfig() LogConfig
	RouterConfig() router.Config
	InboundConfig() ConnectionConfig
	OutboundConfig() ConnectionConfig
	InboundDetours() []InboundDetourConfig
	OutboundDetours() []OutboundDetourConfig
}

Directories

Path Synopsis
testing

Jump to

Keyboard shortcuts

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