Exemple #1
0
package dispatcher

import (
	"v2ray.com/core/app"
	"v2ray.com/core/proxy"
	"v2ray.com/core/transport/ray"
)

const (
	APP_ID = app.ID(1)
)

// PacketDispatcher dispatch a packet and possibly further network payload to its destination.
type PacketDispatcher interface {
	DispatchToOutbound(meta *proxy.InboundHandlerMeta, session *proxy.SessionInfo) ray.InboundRay
}
Exemple #2
0
package dns

import (
	"net"

	"v2ray.com/core/app"
)

const (
	APP_ID = app.ID(2)
)

// A DnsCache is an internal cache of DNS resolutions.
type Server interface {
	Get(domain string) []net.IP
}
Exemple #3
0
package api

import (
	"v2ray.com/core/app"
)

const (
	APP_ID = app.ID(5)
)

type ApiServer struct {
}
Exemple #4
0
package router

import (
	"errors"

	"v2ray.com/core/app"
	"v2ray.com/core/app/dns"
	"v2ray.com/core/common/loader"
	"v2ray.com/core/common/log"
	v2net "v2ray.com/core/common/net"
	"v2ray.com/core/proxy"
)

const (
	APP_ID = app.ID(3)
)

var (
	ErrInvalidRule      = errors.New("Invalid Rule")
	ErrNoRuleApplicable = errors.New("No rule applicable")
)

type Router struct {
	domainStrategy Config_DomainStrategy
	rules          []Rule
	//	cache          *RoutingTable
	dnsServer dns.Server
}

func NewRouter(config *Config, space app.Space) *Router {
	r := &Router{
Exemple #5
0
package web

import (
	"v2ray.com/core/app"
	"v2ray.com/core/common"
)

const (
	APP_ID = app.ID(8)
)

type WebServer interface {
	common.Releasable
	Handle()
}