#include <netinet/in.h>
#include <arpa/inet.h>
+#ifndef VERSION
+#define VERSION "dev"
+#endif
/***********
return NULL;
}
-bool proxy_create_copy_from_dest_thread(
- int dst_fd,
- int src_fd
-) {
+bool proxy_create_copy_from_dest_thread(int dst_fd, int src_fd) {
struct proxy_copy_from_dest_data* data = smalloc(sizeof(struct proxy_copy_from_dest_data));
data->dst_fd = dst_fd;
data->src_fd = src_fd;
return false;
}
switch (addr_type) {
- case 1:
- return proxy_ipv4_handle_request(dst_fd, fd);
- case 3:
- return proxy_dns_handle_request(dst_fd, fd);
- case 4:
- return proxy_ipv6_handle_request(dst_fd, fd);
+ case 1:
+ return proxy_ipv4_handle_request(dst_fd, fd);
+ case 3:
+ return proxy_dns_handle_request(dst_fd, fd);
+ case 4:
+ return proxy_ipv6_handle_request(dst_fd, fd);
}
proxy_write_error_response(fd, 8);
}
struct in6_addr* addr_data = &((struct sockaddr_in6*)addr)->sin6_addr;
- if (!(
- ((uint32_t*)(addr_data))[0] == 0 &&
- ((uint32_t*)(addr_data))[1] == 0 &&
- ((uint32_t*)(addr_data))[2] == htonl(0xffff)
- )) {
+ if (!(((uint32_t*)(addr_data))[0] == 0 &&
+ ((uint32_t*)(addr_data))[1] == 0 &&
+ ((uint32_t*)(addr_data))[2] == htonl(0xffff)))
+ {
return;
}