core

package module
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2015 License: MIT Imports: 2 Imported by: 0

README

Project V2Ray

Build Status Coverage Status GoDoc License

中文 | English

V2Ray 是一个翻墙工具包,用于简化和复用其它翻墙工具,加速二次开发。

“V2”来源于 V2 火箭,Ray 即射线,意指新一代的翻墙工具。

主要特点

  • 多对多服务器支持,负载均衡
  • 支持多用户
  • 开放协议支持,兼容 Shadowsocks 和 GoAgent

使用说明

开发人员相关

  • 概要设计
  • 开发计划
  • Help Wanted:所有被标记为“Help Wanted”的 Issue 都接受 Pull Request,如果你对本项目感兴趣并想做点贡献,请挑选其中之一完善之,不甚感激。

联系方式

捐赠

目前 V2Ray 还在早期开发阶段,暂时没什么可用性,也谈不上捐赠。如果你执意想捐赠,请发送 Amazon Gift Card 至 donate@v2ray.com

关于

我只是一名普通的开发人员,已肉翻,本已不依赖这些翻墙工具,但 ShadowSock 和 GoAgent 被迫删除代码的事件实在太恶心,不得不做点什么了。

Documentation

Overview

Package core provides common definitions and functionalities of V2Ray.

Index

Constants

View Source
const (
	Version  = "0.6"
	Codename = "Post Apocalypse"
	Intro    = "A stable and unbreakable connection for everyone."
)

Variables

This section is empty.

Functions

func RegisterInboundConnectionHandlerFactory added in v0.6.1

func RegisterInboundConnectionHandlerFactory(name string, factory InboundConnectionHandlerFactory) error

func RegisterOutboundConnectionHandlerFactory added in v0.6.1

func RegisterOutboundConnectionHandlerFactory(name string, factory OutboundConnectionHandlerFactory) error

Types

type ConnectionConfig added in v0.6.1

type ConnectionConfig interface {
	Protocol() string
	Content() []byte
}

type InboundConnectionHandler added in v0.6.1

type InboundConnectionHandler interface {
	Listen(port uint16) error
}

type InboundConnectionHandlerFactory added in v0.6.1

type InboundConnectionHandlerFactory interface {
	Create(vp *Point, config []byte) (InboundConnectionHandler, error)
}

type InboundRay added in v0.6.1

type InboundRay interface {
	InboundInput() chan<- []byte
	InboundOutput() <-chan []byte
}

type OutboundConnectionHandler added in v0.6.1

type OutboundConnectionHandler interface {
	Start(ray OutboundRay) error
}

type OutboundConnectionHandlerFactory added in v0.6.1

type OutboundConnectionHandlerFactory interface {
	Initialize(config []byte) error
	Create(VP *Point, firstPacket v2net.Packet) (OutboundConnectionHandler, error)
}

type OutboundRay added in v0.6.1

type OutboundRay interface {
	OutboundInput() <-chan []byte
	OutboundOutput() chan<- []byte
}

type Point added in v0.6.1

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

Point is an single server in V2Ray system.

func NewPoint added in v0.6.1

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

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

func (*Point) DispatchToOutbound added in v0.6.1

func (p *Point) DispatchToOutbound(packet v2net.Packet) InboundRay

func (*Point) Start added in v0.6.1

func (vp *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 added in v0.6.1

type PointConfig interface {
	Port() uint16
	InboundConfig() ConnectionConfig
	OutboundConfig() ConnectionConfig
}

type Ray added in v0.6.1

type Ray struct {
	Input  chan []byte
	Output chan []byte
}

Ray is an internal tranport channel bewteen inbound and outbound connection.

func NewRay added in v0.6.1

func NewRay() *Ray

func (*Ray) InboundInput added in v0.6.1

func (ray *Ray) InboundInput() chan<- []byte

func (*Ray) InboundOutput added in v0.6.1

func (ray *Ray) InboundOutput() <-chan []byte

func (*Ray) OutboundInput added in v0.6.1

func (ray *Ray) OutboundInput() <-chan []byte

func (*Ray) OutboundOutput added in v0.6.1

func (ray *Ray) OutboundOutput() chan<- []byte

type UDPRay added in v0.6.1

type UDPRay struct {
}

Directories

Path Synopsis
common
io
log
net
config
proxy
vmess/protocol
Package vmess contains protocol definition, io lib for VMess.
Package vmess contains protocol definition, io lib for VMess.
release
testing

Jump to

Keyboard shortcuts

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