byedpi/params.h

48 lines
745 B
C
Raw Normal View History

2023-06-12 04:00:33 +00:00
#include <stdio.h>
2023-06-03 19:52:10 +00:00
enum demode {
DESYNC_NONE,
DESYNC_SPLIT,
DESYNC_DISORDER,
DESYNC_FAKE
};
2023-07-07 20:07:27 +00:00
#define DESYNC_UDP_FAKE 1
2023-06-03 19:52:10 +00:00
struct params {
int ttl;
int split;
size_t sfdelay;
enum demode attack;
2023-07-07 20:07:27 +00:00
int desync_udp;
2023-06-03 19:52:10 +00:00
char split_host;
int def_ttl;
int mod_http;
char ipv6;
char resolve;
2023-07-07 18:30:53 +00:00
char udp;
2023-06-03 19:52:10 +00:00
char de_known;
int max_open;
int debug;
size_t bfsize;
int send_bfsz;
};
extern struct params params;
struct packet {
2023-07-07 20:07:27 +00:00
ssize_t size;
2023-06-03 19:52:10 +00:00
char *data;
};
extern struct packet fake_tls;
extern struct packet fake_http;
2023-07-07 20:07:27 +00:00
extern struct packet fake_udp;
2023-06-03 19:52:10 +00:00
#define LOG_S 1
#define LOG_L 2
#define LOG(s, str, ...) \
2023-06-12 08:01:40 +00:00
if (params.debug >= s) printf(str, ##__VA_ARGS__)