diff --git a/connect_socks.c b/connect_socks.c index 4f3ec0b..ed44acf 100644 --- a/connect_socks.c +++ b/connect_socks.c @@ -7,6 +7,9 @@ #include #include #include + +int proxy_fds[65536]; +int len_proxy_fds = 0; char * socks_host = NULL; char * socks_port = NULL; diff --git a/connect_socks.h b/connect_socks.h index ce6fec3..11bdd24 100644 --- a/connect_socks.h +++ b/connect_socks.h @@ -8,8 +8,8 @@ #include #ifndef CONNECT_SOCKS_H #define CONNECT_SOCKS_H -int proxy_fds[256]; -int len_proxy_fds; +extern int proxy_fds[]; +extern int len_proxy_fds; struct addrinfo *get_socks_addr(char *host, char *port); int get_socks_fd(struct addrinfo *res); int connect_socks(int sockfd, struct addrinfo *res); diff --git a/my_connect.c b/my_connect.c index 5db7b4a..3d49f18 100644 --- a/my_connect.c +++ b/my_connect.c @@ -4,6 +4,7 @@ #include #include #include + int socket(int domain, int type, int protocol) { char * socks_h = getenv("SOCKS_HOST"); char * socks_p = getenv("SOCKS_PORT");