2024-08-03 23:20:09 +00:00
|
|
|
#define MAX_THREADS 16
|
|
|
|
|
|
|
|
#ifndef THREADS_NUM
|
|
|
|
#define THREADS_NUM 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if THREADS_NUM > MAX_THREADS
|
|
|
|
#error "Too much threads"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NOUSE_GSO
|
|
|
|
#define USE_GSO
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define FRAG_STRAT_TCP 0
|
|
|
|
#define FRAG_STRAT_IP 1
|
|
|
|
#define FRAG_STRAT_NONE 2
|
|
|
|
|
2024-08-05 20:37:45 +00:00
|
|
|
#ifndef FRAGMENTATION_STRATEGY
|
2024-08-03 23:20:09 +00:00
|
|
|
#define FRAGMENTATION_STRATEGY FRAG_STRAT_TCP
|
2024-08-05 20:37:45 +00:00
|
|
|
#endif
|
2024-08-03 23:20:09 +00:00
|
|
|
|
|
|
|
#if FRAGMENTATION_STRATEGY == FRAG_STRAT_TCP
|
|
|
|
#define USE_TCP_SEGMENTATION
|
|
|
|
#elif FRAGMENTATION_STRATEGY == FRAG_STRAT_IP
|
|
|
|
#define USE_IP_FRAGMENTATION
|
|
|
|
#elif FRAGMENTATION_STRATEGY == FRAG_STRAT_NONE
|
2024-08-04 12:55:07 +00:00
|
|
|
#define USE_NO_FRAGMENTATION
|
2024-08-03 23:20:09 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define RAWSOCKET_MARK (1 << 15)
|
|
|
|
|
|
|
|
#ifdef USE_SEG2_DELAY
|
|
|
|
#define SEG2_DELAY 100
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NO_FAKE_SNI
|
|
|
|
#define FAKE_SNI
|
|
|
|
#endif
|
|
|
|
|
2024-08-05 20:13:35 +00:00
|
|
|
#define FAKE_SNI_TTL 8
|
|
|
|
|
|
|
|
// Will invalidate fake client hello by out-of-ack_seq out-of-seq request
|
|
|
|
#define FKSN_STRAT_ACK_SEQ 0
|
|
|
|
// Will assume that GGC server is located further than FAKE_SNI_TTL
|
|
|
|
// Thus, Fake Client Hello will be eliminated automatically.
|
|
|
|
#define FKSN_STRAT_TTL 1
|
|
|
|
|
2024-08-05 20:37:45 +00:00
|
|
|
#ifndef FAKE_SNI_STRATEGY
|
2024-08-05 20:13:35 +00:00
|
|
|
#define FAKE_SNI_STRATEGY FKSN_STRAT_ACK_SEQ
|
2024-08-05 20:37:45 +00:00
|
|
|
#endif
|
2024-08-05 20:13:35 +00:00
|
|
|
|
2024-08-04 12:55:07 +00:00
|
|
|
#if !defined(SILENT) && !defined(KERNEL_SPACE)
|
2024-08-03 23:20:09 +00:00
|
|
|
#define DEBUG
|
|
|
|
#endif
|
2024-08-04 12:55:07 +00:00
|
|
|
|
2024-08-06 21:22:52 +00:00
|
|
|
// The Maximum Transmission Unit size for rawsocket
|
|
|
|
// Larger packets will be fragmented. Applicable for Chrome's kyber.
|
|
|
|
#define AVAILABLE_MTU 1384
|