ITADN

add -B bind device option (follows up on #29)

#79Pull Requestpeppergrayxyz 创建于 2024-09-28
P
peppergrayxyzcommented
This follows up on https://github.com/rofl0r/microsocks/pull/29 - works on linux and macos - dedicated file (ifdefs are in a single spot) - doesn't break the build if feature is unsupported (use stub and return error if used) - prints a build message if feature is unsupported It could be integrated into ```socksrv.c``` as well, but ```#include <netinet/in.h>``` must be included with ```_GNU_SOURCE``` or ```_DARWIN_C_SOURCE``` set (depending on the platform) and this doesn't play well with the way the ```server.h``` currently works. References: - https://github.com/wine-mirror/wine/blob/wine-9.18/server/sock.c#L2151 - https://djangocas.dev/blog/linux/linux-SO_BINDTODEVICE-and-mac-IP_BOUND_IF-to-bind-socket-to-a-network-interface/
合并状态:未合并 3 条评论