UDPProxy is proxy for which handles UDP datagrams. It implements the Proxy interface to handle UDP traffic forwarding between the frontend and backend addresses.
| 76 | // interface to handle UDP traffic forwarding between the frontend and backend |
| 77 | // addresses. |
| 78 | type UDPProxy struct { |
| 79 | listener *net.UDPConn |
| 80 | frontendAddr *net.UDPAddr |
| 81 | backendAddr *net.UDPAddr |
| 82 | connTrackTable connTrackMap |
| 83 | connTrackLock sync.Mutex |
| 84 | connTrackTimeout time.Duration |
| 85 | ipVer ipVersion |
| 86 | } |
| 87 | |
| 88 | // NewUDPProxy creates a new UDPProxy. |
| 89 | func NewUDPProxy(listener *net.UDPConn, backendAddr *net.UDPAddr, ipVer ipVersion) (*UDPProxy, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected