mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-12 22:42:18 +00:00
prefer interface over struct
This commit is contained in:
1 parent
823cbf1509
commit
cb16047cf0
12 files changed
+88
-59
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user