Update bindToInterface.c

This commit is contained in:
JsBergbau 2021-05-21 15:35:27 +02:00 committed by GitHub
parent 0674205197
commit 0e46876a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}