Closed itsjfx closed 4 years ago
some thoughts looking at the code
if you'd single-step through the code with gdb rather than looking, you'd see that server_setup() does the resolving.
couldn't this potentially lead to the thread hanging for a long time in some rare case
indeed, i've never had any issues reported though in this regard (and never experienced any either)
Cool, thanks for the answers, love your work.
Hey, just had some thoughts looking at the code and was wondering what your thoughts on them were.
1. How come you resolve the bind address given by a user but not the listen IP?(actually in hindsight I think this is because the socket server won't run if the listen IP is bad anyway, so need to resolve) https://github.com/rofl0r/microsocks/blob/31557857ccce5e4fdd2cfdae7ab640d589aa2b41/sockssrv.c#L396 https://github.com/rofl0r/microsocks/blob/31557857ccce5e4fdd2cfdae7ab640d589aa2b41/sockssrv.c#L407clientthread
has a timeout: https://github.com/rofl0r/microsocks/blob/31557857ccce5e4fdd2cfdae7ab640d589aa2b41/sockssrv.c#L304 - couldn't this potentially lead to the thread hanging for a long time in some rare case? if its waiting for the client to send info such as auth, etc?Sorry if these are noob queries I am new to socket/this type of low level programming in general so some things may not be that obvious to me.
Cheers