Open
Description
For VPN/proxy-like programs, it's useful to listen to all traffic on all ports. For example, see this library. I'm currently using it, but it would be nice to be able to use smoltcp for this use case as well.
How this would be implemented:
- For TCP sockets, very little has to change - port 0 should listen on all ports instead of being forbidden (the address tuple will be changed after accepting a packet so this is fine), the state machine is obviously socket-specific so the user will be responsible for creating additional sockets as necessary.
- For UDP sockets, it's somewhat harder as the implementation is very tied to being available only for a single port right now. Nonetheless, even just implementing sockets that listen for any traffic, then bind to the port where traffic arrived would probably be helpful. Alternatively, new code for wildcard UDP sockets with
recv_to
andsend_from
functions can be added, as UDP is a relatively simple protocol. - For other sockets, nothing needs to be done as they are either port-specific or port-agnostic
Metadata
Metadata
Assignees
Labels
No labels