prefer interface over struct

This commit is contained in:
V2Ray committed 2015-09-20 18:22:29 +02:00
1 parent 823cbf1509
commit cb16047cf0
12 files changed
+88 -59

No files matched your search

+2 -2
View File
@@ -70,7 +70,7 @@ func (server *SocksServer) HandleConnection(connection net.Conn) error {
return err
}
var dest *v2net.Destination
var dest v2net.Destination
// TODO refactor this part
if err == protocol.ErrorSocksVersion4 {
@@ -85,7 +85,7 @@ func (server *SocksServer) HandleConnection(connection net.Conn) error {
return ErrorCommandNotSupported
}
dest = v2net.NewDestination(v2net.NetTCP, v2net.IPAddress(auth4.IP[:], auth4.Port))
dest = v2net.NewTCPDestination(v2net.IPAddress(auth4.IP[:], auth4.Port))
} else {
expectedAuthMethod := protocol.AuthNotRequired
if server.config.AuthMethod == JsonAuthMethodUserPass {