Open fernvenue opened 1 year ago
I assume you want to listen to v4 and v6 0.0.0.0 at the same time, not with different IP addresses. Actually, I'm not sure what's the code change needed to achieve this. On some platforms(IIRC, linux), binding a listen socket at 0.0.0.0 automatically listens to both v4 and v6. It's called dualstack or something.
Hi @rapiz1, I have reviewed the code and attempted to assess the implementation difficulty of this feature. The conclusion is that it may require significant modifications and will be somewhat challenging. However, fortunately, we can achieve listening to both IPv4 and IPv6 addresses simultaneously by listening to ::
. I have successfully tested this on Debian. However, if we wanna specify addresses, currently it still requires manually writing separate services for each address.
The conclusion is that it may require significant modifications and will be somewhat challenging.
Yeah, it's not trivial.
However, if we wanna specify addresses, currently it still requires manually writing separate services for each address.
That's true but I'm not sure if ppl really need it. ::
should satisfy most users
I wanted to bind both IPv4 and IPv6 in Ubuntu and came across this issue and it works for me.
Example config on the server:
[server]
bind_addr = "[::]:2333"
# Then services...
Feature Proposed As mentioned above, does rathole allow binding on multiple addresses? If so, could anyone please let me know how to utilize this feature? Thanks!
Use Case When we wanna bind on both IPv4 and IPv6, or when we have multiple adapters, this feature will be very useful.