proxy

package
v2.10.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package proxy contains all proxies used by V2Ray.

Index

Constants

View Source
const (
	HandlerStateStopped = HandlerState(0)
	HandlerStateRunning = HandlerState(1)
)

Variables

View Source
var (
	ErrInvalidProtocolVersion = errors.New("Invalid protocol version.")
	ErrAlreadyListening       = errors.New("Already listening on another port.")
)

Functions

This section is empty.

Types

type HandlerState added in v1.11.2

type HandlerState int

type InboundHandler

type InboundHandler interface {
	// Listen starts a InboundHandler.
	Start() error
	// Close stops the handler to accepting anymore inbound connections.
	Close()
	// Port returns the port that the handler is listening on.
	Port() v2net.Port
}

An InboundHandler handles inbound network connections to V2Ray.

type InboundHandlerMeta added in v1.17.2

type InboundHandlerMeta struct {
	Tag                    string
	Address                v2net.Address
	Port                   v2net.Port
	AllowPassiveConnection bool
	StreamSettings         *internet.StreamConfig
}

type OutboundHandler

type OutboundHandler interface {
	// Dispatch sends one or more Packets to its destination.
	Dispatch(destination v2net.Destination, payload *buf.Buffer, ray ray.OutboundRay)
}

An OutboundHandler handles outbound network connection for V2Ray.

type OutboundHandlerMeta added in v1.17.2

type OutboundHandlerMeta struct {
	Tag            string
	Address        v2net.Address
	StreamSettings *internet.StreamConfig
	ProxySettings  *internet.ProxyConfig
}

func (*OutboundHandlerMeta) GetDialerOptions

func (v *OutboundHandlerMeta) GetDialerOptions() internet.DialerOptions

type SessionInfo added in v1.24.1

type SessionInfo struct {
	Source      v2net.Destination
	Destination v2net.Destination
	User        *protocol.User
	Inbound     *InboundHandlerMeta
}

Directories

Path Synopsis
Package blackhole is a generated protocol buffer package.
Package blackhole is a generated protocol buffer package.
Package dokodemo is a generated protocol buffer package.
Package dokodemo is a generated protocol buffer package.
Package freedom is a generated protocol buffer package.
Package freedom is a generated protocol buffer package.
Package http is a generated protocol buffer package.
Package http is a generated protocol buffer package.
Package shadowsocks is a generated protocol buffer package.
Package shadowsocks is a generated protocol buffer package.
Package socks is a generated protocol buffer package.
Package socks is a generated protocol buffer package.
Package vmess is a generated protocol buffer package.
Package vmess is a generated protocol buffer package.
inbound
Package inbound is a generated protocol buffer package.
Package inbound is a generated protocol buffer package.
outbound
Package outbound is a generated protocol buffer package.
Package outbound is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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