mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-13 22:45:13 +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
@@ -278,7 +278,7 @@ func ReadRequest(reader io.Reader) (request *Socks5Request, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (request *Socks5Request) Destination() *v2net.Destination {
|
||||
func (request *Socks5Request) Destination() v2net.Destination {
|
||||
var address v2net.Address
|
||||
switch request.AddrType {
|
||||
case AddrTypeIPv4:
|
||||
@@ -290,7 +290,7 @@ func (request *Socks5Request) Destination() *v2net.Destination {
|
||||
default:
|
||||
panic("Unknown address type")
|
||||
}
|
||||
return v2net.NewDestination(v2net.NetTCP, address)
|
||||
return v2net.NewTCPDestination(address)
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
Reference in new issue
Block a user