|
@ -22,27 +22,6 @@ |
|
|
#ifndef _COMMON_H |
|
|
#ifndef _COMMON_H |
|
|
#define _COMMON_H |
|
|
#define _COMMON_H |
|
|
|
|
|
|
|
|
// only enable TCP_FASTOPEN on linux |
|
|
|
|
|
#if defined(__linux__) |
|
|
|
|
|
|
|
|
|
|
|
/* conditional define for TCP_FASTOPEN */ |
|
|
|
|
|
#ifndef TCP_FASTOPEN |
|
|
|
|
|
#define TCP_FASTOPEN 23 |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
/* conditional define for MSG_FASTOPEN */ |
|
|
|
|
|
#ifndef MSG_FASTOPEN |
|
|
|
|
|
#define MSG_FASTOPEN 0x20000000 |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#elif !defined(__APPLE__) |
|
|
|
|
|
|
|
|
|
|
|
#ifdef TCP_FASTOPEN |
|
|
|
|
|
#undef TCP_FASTOPEN |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define DEFAULT_CONF_PATH "/etc/shadowsocks-libev/config.json" |
|
|
#define DEFAULT_CONF_PATH "/etc/shadowsocks-libev/config.json" |
|
|
|
|
|
|
|
|
#ifndef SOL_TCP |
|
|
#ifndef SOL_TCP |
|
|