Skip to content

Commit

Permalink
Replace incrementing defines with one enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Waujito committed Nov 28, 2024
1 parent 801c357 commit 991a8a8
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions args.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,40 @@ struct config_t config = {
.syslog = 0,
};

#define OPT_SNI_DOMAINS 1
#define OPT_EXCLUDE_DOMAINS 25
#define OPT_FAKE_SNI 2
#define OPT_FAKING_TTL 3
#define OPT_FAKING_STRATEGY 10
#define OPT_FAKE_SNI_SEQ_LEN 11
#define OPT_FAKE_SNI_TYPE 27
#define OPT_FAKE_CUSTOM_PAYLOAD 28
#define OPT_START_SECTION 29
#define OPT_END_SECTION 30
#define OPT_DAEMONIZE 31
#define OPT_NOCLOSE 32
#define OPT_SYSLOG 33
#define OPT_FRAG 4
#define OPT_FRAG_SNI_REVERSE 12
#define OPT_FRAG_SNI_FAKED 13
#define OPT_FRAG_MIDDLE_SNI 18
#define OPT_FRAG_SNI_POS 19
#define OPT_FK_WINSIZE 14
#define OPT_TRACE 15
#define OPT_QUIC_DROP 16
#define OPT_SNI_DETECTION 17
#define OPT_NO_IPV6 20
#define OPT_FAKE_SEQ_OFFSET 21
#define OPT_PACKET_MARK 22
#define OPT_SYNFAKE 23
#define OPT_SYNFAKE_LEN 24
#define OPT_SEG2DELAY 5
#define OPT_THREADS 6
#define OPT_SILENT 7
#define OPT_NO_GSO 8
#define OPT_QUEUE_NUM 9

#define OPT_MAX OPT_SYSLOG
enum opts {
OPT_SNI_DOMAINS,
OPT_EXCLUDE_DOMAINS,
OPT_FAKE_SNI,
OPT_FAKING_TTL,
OPT_FAKING_STRATEGY,
OPT_FAKE_SNI_SEQ_LEN,
OPT_FAKE_SNI_TYPE,
OPT_FAKE_CUSTOM_PAYLOAD,
OPT_START_SECTION,
OPT_END_SECTION,
OPT_DAEMONIZE,
OPT_NOCLOSE,
OPT_SYSLOG,
OPT_FRAG,
OPT_FRAG_SNI_REVERSE,
OPT_FRAG_SNI_FAKED,
OPT_FRAG_MIDDLE_SNI,
OPT_FRAG_SNI_POS,
OPT_FK_WINSIZE,
OPT_TRACE,
OPT_QUIC_DROP,
OPT_SNI_DETECTION,
OPT_NO_IPV6,
OPT_FAKE_SEQ_OFFSET,
OPT_PACKET_MARK,
OPT_SYNFAKE,
OPT_SYNFAKE_LEN,
OPT_SEG2DELAY,
OPT_THREADS,
OPT_SILENT,
OPT_NO_GSO,
OPT_QUEUE_NUM,
};

static struct option long_opt[] = {
{"help", 0, 0, 'h'},
Expand Down

0 comments on commit 991a8a8

Please sign in to comment.