chisel
chisel copied to clipboard
Random opened port for local binding in case its not given
Current logic defaults local port to remote one in case former is not given. Maybe it makes sense to use any opened port for local port on a server side at least for reversed connections? Otherwise there is no way for client to determine which port to use for local binding on a server in case there is a lot of connections and ports might be already used on a server while they are free on a client.
Say it chose a random port and you did: chisel client myserver.com 4000 5000
How would you know what got bound to what?
On Thu, 29 Jun 2023 at 7:25 pm Andrii Ursulenko @.***> wrote:
Current logic defaults local port to remote one in case former is not given. Maybe it makes sense to use any opened port for local port on a server side at least for reversed connections? Otherwise there is no way for client to determine which port to use for local binding on a server in case there is a lot of connections and ports might be already used on a server while they are free on a client.
— Reply to this email directly, view it on GitHub https://github.com/jpillora/chisel/issues/434, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X45BHRO3L72LCDFNQPLXNVCXZANCNFSM6AAAAAAZYHWXAA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Maybe my use case is too specific, but for reversed connections from a client standpoint why would i care what bound to what? And on a server there is multiple of ways to determine which port from which client is bound to what.
On the other hand it might be optional. If for local keyword random
is used, then server will choose bind port on random. Kind like stdio
is used for specific use case.