Describe actual behavior
When request the udp association command, the dst.addr and dst.port is set the destination address and the destination port.
What is your expected behavior
If the client is not in possesion of the information at the time of the UDP ASSOCIATE, the client MUST use a port number and address of all zeros. Come from the describe of UDP ASSOCIATE in rfc-1928
Specifications like the version of the project, operating system, or hardware
Steps to reproduce the problem
package main
import (
"fmt"
"github.com/txthinking/socks5"
)
func main() {
server := "xxx"
username := "xxx"
password := "xxx"
tcpTimeout := 10
udpTimeout := 60
client, err := socks5.NewClient(server, username, password, tcpTimeout, udpTimeout)
if err != nil {
return
}
network := "udp"
addr := "xxx"
conn, _ := client.Dial(network, addr)
_, err = conn.Write([]byte("hello"))
if err != nil {
return
}
udpResp := make([]byte, 1024)
_, err = conn.Read(udpResp)
if err != nil {
fmt.Println("Error receiving UDP data:", err)
return
}
fmt.Println(udpResp)
}
Describe actual behavior
When request the udp association command, the dst.addr and dst.port is set the destination address and the destination port.
What is your expected behavior
If the client is not in possesion of the information at the time of the UDP ASSOCIATE, the client MUST use a port number and address of all zeros.Come from the describe of UDP ASSOCIATE in rfc-1928Specifications like the version of the project, operating system, or hardware
Steps to reproduce the problem