mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-28 04:55:37 -05:00
proto for destination
This commit is contained in:
@@ -236,14 +236,14 @@ func (this *Server) handleUDP(reader io.Reader, writer *v2io.BufferedWriter) err
|
||||
|
||||
udpAddr := this.udpAddress
|
||||
|
||||
response.Port = udpAddr.Port()
|
||||
switch udpAddr.Address().Family() {
|
||||
response.Port = udpAddr.Port
|
||||
switch udpAddr.Address.Family() {
|
||||
case v2net.AddressFamilyIPv4:
|
||||
response.SetIPv4(udpAddr.Address().IP())
|
||||
response.SetIPv4(udpAddr.Address.IP())
|
||||
case v2net.AddressFamilyIPv6:
|
||||
response.SetIPv6(udpAddr.Address().IP())
|
||||
response.SetIPv6(udpAddr.Address.IP())
|
||||
case v2net.AddressFamilyDomain:
|
||||
response.SetDomain(udpAddr.Address().Domain())
|
||||
response.SetDomain(udpAddr.Address.Domain())
|
||||
}
|
||||
|
||||
response.Write(writer)
|
||||
|
||||
Reference in New Issue
Block a user