#include <arpa/inet.h>
#include <assert.h>
#include <errno.h>
+#include <limits.h>
+#include <netinet/in.h>
#include <pthread.h>
#include <signal.h>
+#include <stdint.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <unistd.h>
-#include <limits.h>
#if GNUTLS_VERSION_NUMBER <= 0x020b00
/* Necessary for GnuTLS when used with threads. */
}
#ifdef USE_IPV4_ONLY
- server_socket = socket(PF_INET, SOCK_STREAM, 0);
+ server_socket = socket(AF_INET, SOCK_STREAM, 0);
#else
- server_socket = socket(PF_INET6, SOCK_STREAM, 0);
+ server_socket = socket(AF_INET6, SOCK_STREAM, 0);
#endif
if (server_socket < 0) {
perror("socket()");
if (global_log_level >= LOG_DEBUG1_LEVEL) {
printf("tlsproxy %s\n", VERSION);
printf("Listening for connections on port %d.\n", port);
+ printf("Priority string: %s.\n", PROXY_TLS_PRIORITIES);
if (global_proxy_host != NULL && global_proxy_port != NULL) {
printf("Using proxy: %s:%s.\n", global_proxy_host,
#endif
/* Setup GnuTLS cipher suites. */
- result = gnutls_priority_init(&global_tls_priority_cache, "NORMAL", NULL);
+ result = gnutls_priority_init(&global_tls_priority_cache,
+ PROXY_TLS_PRIORITIES, NULL);
GNUTLS_ERROR_EXIT(result, "gnutls_priority_init()");
/* Read Diffie-Hellman parameters. */