mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
separate network and transport protocol
This commit is contained in:
@@ -114,12 +114,6 @@ func (c *Client) Dispatch(destination net.Destination, ray ray.OutboundRay) {
|
||||
|
||||
type ClientFactory struct{}
|
||||
|
||||
func (ClientFactory) StreamCapability() net.NetworkList {
|
||||
return net.NetworkList{
|
||||
Network: []net.Network{net.Network_TCP},
|
||||
}
|
||||
}
|
||||
|
||||
func (ClientFactory) Create(space app.Space, rawConfig interface{}, meta *proxy.OutboundHandlerMeta) (proxy.OutboundHandler, error) {
|
||||
return NewClient(rawConfig.(*ClientConfig), space, meta)
|
||||
}
|
||||
|
||||
@@ -183,12 +183,6 @@ func (v *Server) transport(reader io.Reader, writer io.Writer, session *proxy.Se
|
||||
|
||||
type ServerFactory struct{}
|
||||
|
||||
func (v *ServerFactory) StreamCapability() v2net.NetworkList {
|
||||
return v2net.NetworkList{
|
||||
Network: []v2net.Network{v2net.Network_TCP},
|
||||
}
|
||||
}
|
||||
|
||||
func (v *ServerFactory) Create(space app.Space, rawConfig interface{}, meta *proxy.InboundHandlerMeta) (proxy.InboundHandler, error) {
|
||||
return NewServer(rawConfig.(*ServerConfig), space, meta), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user