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
- Variables
- type Config
- type ConfigLoader
- type ConnectionConfig
- type InboundConnectionHandlerWithPort
- type InboundDetourAllocationConfig
- type InboundDetourConfig
- type InboundDetourHandler
- type InboundDetourHandlerAlways
- type InboundDetourHandlerDynamic
- type LogConfig
- type OutboundDetourConfig
- type Point
- func (this *Point) Close()
- func (this *Point) DispatchToOutbound(context app.Context, destination v2net.Destination) ray.InboundRay
- func (this *Point) FilterPacketAndDispatch(destination v2net.Destination, link ray.OutboundRay, ...)
- func (this *Point) GetHandler(context app.Context, tag string) (proxy.InboundHandler, int)
- func (this *Point) Start() error
Constants ¶
View Source
const ( AllocationStrategyAlways = "always" AllocationStrategyRandom = "random" AllocationStrategyExternal = "external" )
Variables ¶
View Source
var (
ErrorBadConfiguration = errors.New("Bad configuration.")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.9.1
type Config struct { Port v2net.Port LogConfig *LogConfig RouterConfig *router.Config InboundConfig *ConnectionConfig OutboundConfig *ConnectionConfig InboundDetours []*InboundDetourConfig OutboundDetours []*OutboundDetourConfig }
func LoadConfig ¶ added in v1.9.1
type ConfigLoader ¶ added in v1.9.1
type ConnectionConfig ¶
type InboundConnectionHandlerWithPort ¶
type InboundConnectionHandlerWithPort struct {
// contains filtered or unexported fields
}
type InboundDetourAllocationConfig ¶ added in v1.9.1
type InboundDetourConfig ¶
type InboundDetourHandler ¶
type InboundDetourHandler interface { Start() error Close() GetConnectionHandler() (proxy.InboundHandler, int) }
type InboundDetourHandlerAlways ¶ added in v1.9.1
type InboundDetourHandlerAlways struct {
// contains filtered or unexported fields
}
Handler for inbound detour connections.
func NewInboundDetourHandlerAlways ¶ added in v1.9.1
func NewInboundDetourHandlerAlways(space app.Space, config *InboundDetourConfig) (*InboundDetourHandlerAlways, error)
func (*InboundDetourHandlerAlways) Close ¶ added in v1.9.1
func (this *InboundDetourHandlerAlways) Close()
func (*InboundDetourHandlerAlways) GetConnectionHandler ¶ added in v1.9.1
func (this *InboundDetourHandlerAlways) GetConnectionHandler() (proxy.InboundHandler, int)
func (*InboundDetourHandlerAlways) Start ¶ added in v1.9.1
func (this *InboundDetourHandlerAlways) Start() error
Starts the inbound connection handler.
type InboundDetourHandlerDynamic ¶ added in v1.9.1
func NewInboundDetourHandlerDynamic ¶ added in v1.9.1
func NewInboundDetourHandlerDynamic(space app.Space, config *InboundDetourConfig) (*InboundDetourHandlerDynamic, error)
func (*InboundDetourHandlerDynamic) Close ¶ added in v1.9.1
func (this *InboundDetourHandlerDynamic) Close()
func (*InboundDetourHandlerDynamic) GetConnectionHandler ¶ added in v1.9.1
func (this *InboundDetourHandlerDynamic) GetConnectionHandler() (proxy.InboundHandler, int)
func (*InboundDetourHandlerDynamic) Start ¶ added in v1.9.1
func (this *InboundDetourHandlerDynamic) Start() error
type OutboundDetourConfig ¶
type Point ¶
type Point struct {
// contains filtered or unexported fields
}
Point shell of V2Ray.
func NewPoint ¶
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(context app.Context, destination v2net.Destination) 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) FilterPacketAndDispatch ¶ added in v1.9.1
func (this *Point) FilterPacketAndDispatch(destination v2net.Destination, link ray.OutboundRay, dispatcher proxy.OutboundHandler)
func (*Point) GetHandler ¶ added in v1.9.1
Click to show internal directories.
Click to hide internal directories.