README ¶
Project V2Ray
[![Build Status][1]][2] [![codecov.io][3]][4] [![Go Report][5]][6] [![GoDoc][7]][8] [![codebeat][9]][10] [1]: https://travis-ci.org/v2ray/v2ray-core.svg?branch=master "Build Status badge" [2]: https://travis-ci.org/v2ray/v2ray-core "Travis-CI Build Status" [3]: https://codecov.io/github/v2ray/v2ray-core/coverage.svg?branch=master "Coverage badge" [4]: https://codecov.io/github/v2ray/v2ray-core?branch=master "Codecov Status" [5]: https://goreportcard.com/badge/v2ray.com/core "Go Report badge" [6]: https://goreportcard.com/report/v2ray.com/core "Go Report" [7]: https://godoc.org/v2ray.com/core?status.svg "GoDoc badge" [8]: https://godoc.org/v2ray.com/core "GoDoc" [9]: https://codebeat.co/badges/f2354ca8-3e24-463d-a2e3-159af73b2477 "Codebeat badge" [10]: https://codebeat.co/projects/github-com-v2ray-v2ray-core "Codebeat"
V2Ray 是一个模块化的代理软件包,它的目标是提供常用的代理软件模块,简化网络代理软件的开发。
V2Ray provides building blocks for network proxy development. Read our Wiki for more information.
License
Documentation ¶
Overview ¶
Package core provides common definitions and functionalities of V2Ray.
Index ¶
- Variables
- func PrintVersion()
- func RegisterConfigLoader(format ConfigFormat, loader ConfigLoader) error
- func Version() string
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetApp() []*v2ray_core_common_serial.TypedMessage
- func (m *Config) GetInbound() []*v2ray_core_app_proxyman.InboundHandlerConfig
- func (m *Config) GetLog() *v2ray_core_common_log.Config
- func (m *Config) GetOutbound() []*v2ray_core_app_proxyman.OutboundHandlerConfig
- func (m *Config) GetTransport() *v2ray_core_transport.Config
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- type ConfigFormat
- type ConfigLoader
- type Point
Constants ¶
This section is empty.
Variables ¶
var ConfigFormat_name = map[int32]string{
0: "Protobuf",
1: "JSON",
}
var ConfigFormat_value = map[string]int32{
"Protobuf": 0,
"JSON": 1,
}
Functions ¶
func PrintVersion ¶ added in v0.9.1
func PrintVersion()
func RegisterConfigLoader ¶
func RegisterConfigLoader(format ConfigFormat, loader ConfigLoader) error
Types ¶
type Config ¶
type Config struct { // Inbound handler configurations. Must have at least one item. Inbound []*v2ray_core_app_proxyman.InboundHandlerConfig `protobuf:"bytes,1,rep,name=inbound" json:"inbound,omitempty"` // Outbound handler configurations. Must have at least one item. The first item is used as default for routing. Outbound []*v2ray_core_app_proxyman.OutboundHandlerConfig `protobuf:"bytes,2,rep,name=outbound" json:"outbound,omitempty"` Log *v2ray_core_common_log.Config `protobuf:"bytes,3,opt,name=log" json:"log,omitempty"` // App configuration. Must be one in the app directory. App []*v2ray_core_common_serial.TypedMessage `protobuf:"bytes,4,rep,name=app" json:"app,omitempty"` Transport *v2ray_core_transport.Config `protobuf:"bytes,5,opt,name=transport" json:"transport,omitempty"` }
func LoadConfig ¶
func LoadConfig(format ConfigFormat, input io.Reader) (*Config, error)
func (*Config) Descriptor ¶
func (*Config) GetApp ¶
func (m *Config) GetApp() []*v2ray_core_common_serial.TypedMessage
func (*Config) GetInbound ¶
func (m *Config) GetInbound() []*v2ray_core_app_proxyman.InboundHandlerConfig
func (*Config) GetLog ¶
func (m *Config) GetLog() *v2ray_core_common_log.Config
func (*Config) GetOutbound ¶
func (m *Config) GetOutbound() []*v2ray_core_app_proxyman.OutboundHandlerConfig
func (*Config) GetTransport ¶
func (m *Config) GetTransport() *v2ray_core_transport.Config
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
type ConfigFormat ¶
type ConfigFormat int32
Configuration serialization format.
const ( ConfigFormat_Protobuf ConfigFormat = 0 ConfigFormat_JSON ConfigFormat = 1 )
func (ConfigFormat) EnumDescriptor ¶
func (ConfigFormat) EnumDescriptor() ([]byte, []int)
func (ConfigFormat) String ¶
func (x ConfigFormat) String() string
Directories ¶
Path | Synopsis |
---|---|
proxyman
Package proxyman defines applications for manageing inbound and outbound proxies.
|
Package proxyman defines applications for manageing inbound and outbound proxies. |
Package common contains common utilities that are shared among other packages.
|
Package common contains common utilities that are shared among other packages. |
buf
Package buf provides a light-weight memory allocation mechanism.
|
Package buf provides a light-weight memory allocation mechanism. |
bufio
Package bufio is a replacement of the standard golang package bufio.
|
Package bufio is a replacement of the standard golang package bufio. |
crypto
Package crypto provides common crypto libraries for V2Ray.
|
Package crypto provides common crypto libraries for V2Ray. |
dice
Package dice contains common functions to generate random number.
|
Package dice contains common functions to generate random number. |
net
Package net contains common network utilities.
|
Package net contains common network utilities. |
Package proxy contains all proxies used by V2Ray.
|
Package proxy contains all proxies used by V2Ray. |
blackhole
Package blackhole is an outbound handler that blocks all connections.
|
Package blackhole is an outbound handler that blocks all connections. |
shadowsocks
Package shadowsocks provides compatible functionality to Shadowsocks.
|
Package shadowsocks provides compatible functionality to Shadowsocks. |
socks
Package socks provides implements of Socks protocol 4, 4a and 5.
|
Package socks provides implements of Socks protocol 4, 4a and 5. |
vmess
Package vmess contains the implementation of VMess protocol and transportation.
|
Package vmess contains the implementation of VMess protocol and transportation. |
testing
|
|
Package tools contains utilities that is not directly linked into V2Ray binary.
|
Package tools contains utilities that is not directly linked into V2Ray binary. |
internet/kcp
Package kcp - A Fast and Reliable ARQ Protocol Acknowledgement: skywind3000@github for inventing the KCP protocol xtaci@github for translating to Golang
|
Package kcp - A Fast and Reliable ARQ Protocol Acknowledgement: skywind3000@github for inventing the KCP protocol xtaci@github for translating to Golang |
internet/websocket
Package websocket implements Websocket transport Websocket transport implements a HTTP(S) compliable, surveillance proof transport method with plausible deniability.
|
Package websocket implements Websocket transport Websocket transport implements a HTTP(S) compliable, surveillance proof transport method with plausible deniability. |