Skip to content

[server] UDP Associate may not work when listening to wildcard address #29

Description

@ge9

In this UDP Associate implementation, TCP listen port number is also used as the "relay" port for UDP Associate.

addr1, err := net.ResolveUDPAddr("udp", s.Addr)

caddr, err := r.UDP(c, s.ServerAddr)

This will work when we specify non-zero addresses (127.0.0.1:1080 or 10.0.0.1:1080), but won't work when we specify wildcard addresses (0.0.0.0:1080 or :1080).

An option is using TCP local address.

caddr, err := r.UDP(c, c.LocalAddr())

Or at least there should be some warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions