mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Add support to bind to interface (-Di / -Do) via SO_BINDTODEVICE
This commit is contained in:
1 parent
6010190940
commit
b17b36cbce
3 files changed
+25
-2
No files matched your search
+3
-1
@@ -714,7 +714,9 @@ int doconnect(struct clientparam * param){
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SO_BINDTODEVICE
|
||||
if(param->srv->obindtodevice) so._setsockopt(param->remsock, SOL_SOCKET, SO_BINDTODEVICE, param->srv->obindtodevice, strlen(param->srv->obindtodevice) + 1);
|
||||
#endif
|
||||
if(SAISNULL(¶m->sinsl)){
|
||||
#ifndef NOIPV6
|
||||
if(*SAFAMILY(¶m->sinsr) == AF_INET6) param->sinsl = param->srv->extsa6;
|
||||
|
||||
Reference in new issue
Block a user