mirror of
https://github.com/JsBergbau/BindToInterface.git
synced 2025-09-08 11:40:50 -04:00
Update bindToInterface.c
This commit is contained in:
parent
0674205197
commit
0e46876a79
@ -11,7 +11,7 @@
|
||||
|
||||
//#define DEBUG
|
||||
|
||||
//compile with gcc -nostartfiles -fpic -shared bindInterface.c -o bindInterface.so -ldl -D_GNU_SOURCE
|
||||
//compile with gcc -nostartfiles -fpic -shared bindToInterface.c -o bindToInterface.so -ldl -D_GNU_SOURCE
|
||||
//Use with BIND_INTERFACE=<network interface> LD_PRELOAD=./bindInterface.so <your program> like curl ifconfig.me
|
||||
|
||||
int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
|
||||
@ -127,4 +127,4 @@ int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
|
||||
|
||||
int ret = (int)original_connect(sockfd, addr, addrlen);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user