v2ray-core/app/router/wildcard_router/router.go

26 lines
563 B
Go
Raw Normal View History

2015-10-28 22:18:07 +00:00
package wildcard_router
import (
2015-10-30 21:50:45 +00:00
"github.com/v2ray/v2ray-core/app/point/config"
2015-10-28 22:18:07 +00:00
"github.com/v2ray/v2ray-core/app/router"
v2net "github.com/v2ray/v2ray-core/common/net"
)
type WildcardRouter struct {
}
func (router *WildcardRouter) TakeDetour(packet v2net.Packet) (config.ConnectionTag, error) {
return "", nil
}
type WildcardRouterFactory struct {
}
func (factory *WildcardRouterFactory) Create(rawConfig interface{}) (router.Router, error) {
return &WildcardRouter{}, nil
}
func init() {
router.RegisterRouter("wildcard", &WildcardRouterFactory{})
}