A "simple" auto port forwarding mechanism.
Hi
A possible (common?) use case of libslirp is to virtualise a network where only 1 guest is attached. My case is running a single old-computer emulator inside libslirp.
Would it make sense in this particular case to auto-forward all incoming traffic to this single internal IP?
What I mean, is that every time the guest opens a port, a rule to forward this exact port should be added (or maybe a callback to let me chose the host port). And, this is only really necessary when the guest opens a server port to listen, rather than a client port to connect (but if the distinction is impossible, we can do for them all). And, I fully understand that if the port is not free (on the host), this would be trigger a failure.
The goal is to simplify the case where the guest runs a server, without forcing the user to manually set up a forwarding rule.
Questions:
- does this make sense at all? or at least part of it?
- is it already possible?
- would it be a useful addition?
Andrea