mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2025-12-27 01:48:07 +03:00
Add multiple sections with config sets for various domains
This commit is contained in:
407
args.c
407
args.c
@@ -12,8 +12,7 @@
|
||||
|
||||
static char custom_fake_buf[MAX_FAKE_SIZE];
|
||||
|
||||
struct config_t config = {
|
||||
.threads = THREADS_NUM,
|
||||
static const struct section_config_t default_section_config = {
|
||||
.frag_sni_reverse = 1,
|
||||
.frag_sni_faked = 0,
|
||||
.fragmentation_strategy = FRAGMENTATION_STRATEGY,
|
||||
@@ -24,31 +23,12 @@ struct config_t config = {
|
||||
.fake_sni_type = FAKE_PAYLOAD_DEFAULT,
|
||||
.frag_middle_sni = 1,
|
||||
.frag_sni_pos = 1,
|
||||
.use_ipv6 = 1,
|
||||
.fakeseq_offset = 10000,
|
||||
.mark = DEFAULT_RAWSOCKET_MARK,
|
||||
.synfake = 0,
|
||||
.synfake_len = 0,
|
||||
.quic_drop = 0,
|
||||
|
||||
.sni_detection = SNI_DETECTION_PARSE,
|
||||
|
||||
#ifdef SEG2_DELAY
|
||||
.seg2_delay = SEG2_DELAY,
|
||||
#else
|
||||
.seg2_delay = 0,
|
||||
#endif
|
||||
|
||||
#ifdef USE_GSO
|
||||
.use_gso = true,
|
||||
#else
|
||||
.use_gso = false,
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
.verbose = 1,
|
||||
#else
|
||||
.verbose = 0,
|
||||
#endif
|
||||
|
||||
.domains_str = defaul_snistr,
|
||||
.domains_strlen = sizeof(defaul_snistr),
|
||||
@@ -56,11 +36,25 @@ struct config_t config = {
|
||||
.exclude_domains_str = "",
|
||||
.exclude_domains_strlen = 0,
|
||||
|
||||
.queue_start_num = DEFAULT_QUEUE_NUM,
|
||||
.fake_sni_pkt = fake_sni_old,
|
||||
.fake_sni_pkt_sz = sizeof(fake_sni_old) - 1, // - 1 for null-terminator
|
||||
.fake_custom_pkt = custom_fake_buf,
|
||||
.fake_custom_pkt_sz = 0
|
||||
.fake_custom_pkt_sz = 0,
|
||||
|
||||
.sni_detection = SNI_DETECTION_PARSE,
|
||||
};
|
||||
|
||||
struct config_t config = {
|
||||
.threads = THREADS_NUM,
|
||||
.queue_start_num = DEFAULT_QUEUE_NUM,
|
||||
.mark = DEFAULT_RAWSOCKET_MARK,
|
||||
.use_ipv6 = 1,
|
||||
|
||||
.verbose = VERBOSE_DEBUG,
|
||||
.use_gso = true,
|
||||
|
||||
.default_config = default_section_config,
|
||||
.custom_configs_len = 0
|
||||
};
|
||||
|
||||
#define OPT_SNI_DOMAINS 1
|
||||
@@ -71,6 +65,8 @@ struct config_t config = {
|
||||
#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_FRAG 4
|
||||
#define OPT_FRAG_SNI_REVERSE 12
|
||||
#define OPT_FRAG_SNI_FAKED 13
|
||||
@@ -91,7 +87,7 @@ struct config_t config = {
|
||||
#define OPT_NO_GSO 8
|
||||
#define OPT_QUEUE_NUM 9
|
||||
|
||||
#define OPT_MAX OPT_FAKE_CUSTOM_PAYLOAD
|
||||
#define OPT_MAX OPT_END_SECTION
|
||||
|
||||
static struct option long_opt[] = {
|
||||
{"help", 0, 0, 'h'},
|
||||
@@ -123,6 +119,8 @@ static struct option long_opt[] = {
|
||||
{"no-ipv6", 0, 0, OPT_NO_IPV6},
|
||||
{"queue-num", 1, 0, OPT_QUEUE_NUM},
|
||||
{"packet-mark", 1, 0, OPT_PACKET_MARK},
|
||||
{"fbegin", 0, 0, OPT_START_SECTION},
|
||||
{"fend", 0, 0, OPT_END_SECTION},
|
||||
{0,0,0,0}
|
||||
};
|
||||
|
||||
@@ -182,16 +180,27 @@ void print_usage(const char *argv0) {
|
||||
printf("\t--trace\n");
|
||||
printf("\t--no-gso\n");
|
||||
printf("\t--no-ipv6\n");
|
||||
printf("\t--fbegin\n");
|
||||
printf("\t--fend\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
int parse_args(int argc, char *argv[]) {
|
||||
int opt;
|
||||
int optIdx;
|
||||
int optIdx = 0;
|
||||
long num;
|
||||
|
||||
struct section_config_t *sect_config = &config.default_config;
|
||||
|
||||
#define SECT_ITER_DEFAULT 1
|
||||
#define SECT_ITER_INSIDE 2
|
||||
#define SECT_ITER_OUTSIDE 3
|
||||
|
||||
int section_iter = SECT_ITER_DEFAULT;
|
||||
|
||||
while ((opt = getopt_long(argc, argv, "hv", long_opt, &optIdx)) != -1) {
|
||||
switch (opt) {
|
||||
/* config_t scoped configs */
|
||||
case 'h':
|
||||
print_usage(argv[0]);
|
||||
goto stop_exec;
|
||||
@@ -199,49 +208,98 @@ int parse_args(int argc, char *argv[]) {
|
||||
print_version();
|
||||
goto stop_exec;
|
||||
case OPT_TRACE:
|
||||
if (section_iter != SECT_ITER_DEFAULT)
|
||||
goto invalid_opt;
|
||||
config.verbose = 2;
|
||||
break;
|
||||
case OPT_SILENT:
|
||||
if (section_iter != SECT_ITER_DEFAULT)
|
||||
goto invalid_opt;
|
||||
|
||||
config.verbose = 0;
|
||||
break;
|
||||
case OPT_NO_GSO:
|
||||
if (section_iter != SECT_ITER_DEFAULT)
|
||||
goto invalid_opt;
|
||||
|
||||
config.use_gso = 0;
|
||||
break;
|
||||
case OPT_NO_IPV6:
|
||||
if (section_iter != SECT_ITER_DEFAULT)
|
||||
goto invalid_opt;
|
||||
|
||||
config.use_ipv6 = 0;
|
||||
break;
|
||||
case OPT_QUIC_DROP:
|
||||
config.quic_drop = 1;
|
||||
break;
|
||||
case OPT_SNI_DOMAINS:
|
||||
if (!strcmp(optarg, "all")) {
|
||||
config.all_domains = 1;
|
||||
}
|
||||
case OPT_THREADS:
|
||||
if (section_iter != SECT_ITER_DEFAULT)
|
||||
goto invalid_opt;
|
||||
|
||||
config.domains_str = optarg;
|
||||
config.domains_strlen = strlen(config.domains_str);
|
||||
break;
|
||||
case OPT_EXCLUDE_DOMAINS:
|
||||
config.exclude_domains_str = optarg;
|
||||
config.exclude_domains_strlen = strlen(config.exclude_domains_str);
|
||||
break;
|
||||
case OPT_SNI_DETECTION:
|
||||
if (strcmp(optarg, "parse") == 0) {
|
||||
config.sni_detection = SNI_DETECTION_PARSE;
|
||||
} else if (strcmp(optarg, "brute") == 0) {
|
||||
config.sni_detection = SNI_DETECTION_BRUTE;
|
||||
} else {
|
||||
num = parse_numeric_option(optarg);
|
||||
if (errno != 0 || num < 0 || num > MAX_THREADS) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.threads = num;
|
||||
break;
|
||||
case OPT_QUEUE_NUM:
|
||||
if (section_iter != SECT_ITER_DEFAULT)
|
||||
goto invalid_opt;
|
||||
|
||||
num = parse_numeric_option(optarg);
|
||||
if (errno != 0 || num < 0) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.queue_start_num = num;
|
||||
break;
|
||||
case OPT_PACKET_MARK:
|
||||
if (section_iter != SECT_ITER_DEFAULT)
|
||||
goto invalid_opt;
|
||||
|
||||
num = parse_numeric_option(optarg);
|
||||
if (errno != 0 || num < 0) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.mark = num;
|
||||
break;
|
||||
case OPT_START_SECTION:
|
||||
if (section_iter != SECT_ITER_DEFAULT && section_iter != SECT_ITER_OUTSIDE)
|
||||
goto invalid_opt;
|
||||
|
||||
sect_config = &config.custom_configs[config.custom_configs_len++];
|
||||
*sect_config = default_section_config;
|
||||
section_iter = SECT_ITER_INSIDE;
|
||||
|
||||
break;
|
||||
case OPT_END_SECTION:
|
||||
if (section_iter != SECT_ITER_INSIDE)
|
||||
goto invalid_opt;
|
||||
|
||||
section_iter = SECT_ITER_OUTSIDE;
|
||||
sect_config = &config.default_config;
|
||||
break;
|
||||
|
||||
/* section_config_t scoped configs */
|
||||
case OPT_SNI_DOMAINS:
|
||||
if (!strcmp(optarg, "all")) {
|
||||
sect_config->all_domains = 1;
|
||||
}
|
||||
|
||||
sect_config->domains_str = optarg;
|
||||
sect_config->domains_strlen = strlen(sect_config->domains_str);
|
||||
break;
|
||||
case OPT_EXCLUDE_DOMAINS:
|
||||
sect_config->exclude_domains_str = optarg;
|
||||
sect_config->exclude_domains_strlen = strlen(sect_config->exclude_domains_str);
|
||||
break;
|
||||
case OPT_FRAG:
|
||||
if (strcmp(optarg, "tcp") == 0) {
|
||||
config.fragmentation_strategy = FRAG_STRAT_TCP;
|
||||
sect_config->fragmentation_strategy = FRAG_STRAT_TCP;
|
||||
} else if (strcmp(optarg, "ip") == 0) {
|
||||
config.fragmentation_strategy = FRAG_STRAT_IP;
|
||||
sect_config->fragmentation_strategy = FRAG_STRAT_IP;
|
||||
} else if (strcmp(optarg, "none") == 0) {
|
||||
config.fragmentation_strategy = FRAG_STRAT_NONE;
|
||||
sect_config->fragmentation_strategy = FRAG_STRAT_NONE;
|
||||
} else {
|
||||
goto invalid_opt;
|
||||
}
|
||||
@@ -249,9 +307,9 @@ int parse_args(int argc, char *argv[]) {
|
||||
break;
|
||||
case OPT_FRAG_SNI_FAKED:
|
||||
if (strcmp(optarg, "1") == 0) {
|
||||
config.frag_sni_faked = 1;
|
||||
sect_config->frag_sni_faked = 1;
|
||||
} else if (strcmp(optarg, "0") == 0) {
|
||||
config.frag_sni_faked = 0;
|
||||
sect_config->frag_sni_faked = 0;
|
||||
} else {
|
||||
goto invalid_opt;
|
||||
}
|
||||
@@ -259,9 +317,9 @@ int parse_args(int argc, char *argv[]) {
|
||||
break;
|
||||
case OPT_FRAG_SNI_REVERSE:
|
||||
if (strcmp(optarg, "1") == 0) {
|
||||
config.frag_sni_reverse = 1;
|
||||
sect_config->frag_sni_reverse = 1;
|
||||
} else if (strcmp(optarg, "0") == 0) {
|
||||
config.frag_sni_reverse = 0;
|
||||
sect_config->frag_sni_reverse = 0;
|
||||
} else {
|
||||
goto invalid_opt;
|
||||
}
|
||||
@@ -269,9 +327,9 @@ int parse_args(int argc, char *argv[]) {
|
||||
break;
|
||||
case OPT_FRAG_MIDDLE_SNI:
|
||||
if (strcmp(optarg, "1") == 0) {
|
||||
config.frag_middle_sni = 1;
|
||||
sect_config->frag_middle_sni = 1;
|
||||
} else if (strcmp(optarg, "0") == 0) {
|
||||
config.frag_middle_sni = 0;
|
||||
sect_config->frag_middle_sni = 0;
|
||||
} else {
|
||||
goto invalid_opt;
|
||||
}
|
||||
@@ -283,19 +341,19 @@ int parse_args(int argc, char *argv[]) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.frag_sni_pos = num;
|
||||
sect_config->frag_sni_pos = num;
|
||||
break;
|
||||
case OPT_FAKING_STRATEGY:
|
||||
if (strcmp(optarg, "randseq") == 0) {
|
||||
config.faking_strategy = FAKE_STRAT_RAND_SEQ;
|
||||
sect_config->faking_strategy = FAKE_STRAT_RAND_SEQ;
|
||||
} else if (strcmp(optarg, "ttl") == 0) {
|
||||
config.faking_strategy = FAKE_STRAT_TTL;
|
||||
sect_config->faking_strategy = FAKE_STRAT_TTL;
|
||||
} else if (strcmp(optarg, "tcp_check") == 0) {
|
||||
config.faking_strategy = FAKE_STRAT_TCP_CHECK;
|
||||
sect_config->faking_strategy = FAKE_STRAT_TCP_CHECK;
|
||||
} else if (strcmp(optarg, "pastseq") == 0) {
|
||||
config.faking_strategy = FAKE_STRAT_PAST_SEQ;
|
||||
sect_config->faking_strategy = FAKE_STRAT_PAST_SEQ;
|
||||
} else if (strcmp(optarg, "md5sum") == 0) {
|
||||
config.faking_strategy = FAKE_STRAT_TCP_MD5SUM;
|
||||
sect_config->faking_strategy = FAKE_STRAT_TCP_MD5SUM;
|
||||
} else {
|
||||
goto invalid_opt;
|
||||
}
|
||||
@@ -307,7 +365,7 @@ int parse_args(int argc, char *argv[]) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.faking_ttl = num;
|
||||
sect_config->faking_ttl = num;
|
||||
break;
|
||||
case OPT_FAKE_SEQ_OFFSET:
|
||||
num = parse_numeric_option(optarg);
|
||||
@@ -315,13 +373,13 @@ int parse_args(int argc, char *argv[]) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.fakeseq_offset = num;
|
||||
sect_config->fakeseq_offset = num;
|
||||
break;
|
||||
case OPT_FAKE_SNI:
|
||||
if (strcmp(optarg, "1") == 0) {
|
||||
config.fake_sni = 1;
|
||||
sect_config->fake_sni = 1;
|
||||
} else if (strcmp(optarg, "0") == 0) {
|
||||
config.fake_sni = 0;
|
||||
sect_config->fake_sni = 0;
|
||||
} else {
|
||||
goto invalid_opt;
|
||||
}
|
||||
@@ -333,15 +391,15 @@ int parse_args(int argc, char *argv[]) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.fake_sni_seq_len = num;
|
||||
sect_config->fake_sni_seq_len = num;
|
||||
break;
|
||||
case OPT_FAKE_SNI_TYPE:
|
||||
if (strcmp(optarg, "default") == 0) {
|
||||
config.fake_sni_type = FAKE_PAYLOAD_DEFAULT;
|
||||
sect_config->fake_sni_type = FAKE_PAYLOAD_DEFAULT;
|
||||
} else if (strcmp(optarg, "random") == 0) {
|
||||
config.fake_sni_type = FAKE_PAYLOAD_RANDOM;
|
||||
sect_config->fake_sni_type = FAKE_PAYLOAD_RANDOM;
|
||||
} else if (strcmp(optarg, "custom") == 0) {
|
||||
config.fake_sni_type = FAKE_PAYLOAD_CUSTOM;
|
||||
sect_config->fake_sni_type = FAKE_PAYLOAD_CUSTOM;
|
||||
} else {
|
||||
goto invalid_opt;
|
||||
}
|
||||
@@ -368,8 +426,8 @@ int parse_args(int argc, char *argv[]) {
|
||||
sscanf(custom_hex_fake + (i << 1), "%2hhx", custom_buf + i);
|
||||
}
|
||||
|
||||
config.fake_custom_pkt_sz = custom_len;
|
||||
config.fake_custom_pkt = (char *)custom_buf;
|
||||
sect_config->fake_custom_pkt_sz = custom_len;
|
||||
sect_config->fake_custom_pkt = (char *)custom_buf;
|
||||
}
|
||||
break;
|
||||
case OPT_FK_WINSIZE:
|
||||
@@ -378,66 +436,37 @@ int parse_args(int argc, char *argv[]) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.fk_winsize = num;
|
||||
sect_config->fk_winsize = num;
|
||||
break;
|
||||
case OPT_SYNFAKE:
|
||||
if (strcmp(optarg, "1") == 0) {
|
||||
config.synfake = 1;
|
||||
} else if (strcmp(optarg, "0") == 0) {
|
||||
config.synfake = 0;
|
||||
} else {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
break;
|
||||
case OPT_SYNFAKE_LEN:
|
||||
num = parse_numeric_option(optarg);
|
||||
if (errno != 0 || num < 0) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.synfake_len = num;
|
||||
break;
|
||||
case OPT_SEG2DELAY:
|
||||
num = parse_numeric_option(optarg);
|
||||
if (errno != 0 || num < 0) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.seg2_delay = num;
|
||||
sect_config->seg2_delay = num;
|
||||
break;
|
||||
case OPT_THREADS:
|
||||
num = parse_numeric_option(optarg);
|
||||
if (errno != 0 || num < 0 || num > MAX_THREADS) {
|
||||
case OPT_QUIC_DROP:
|
||||
sect_config->quic_drop = 1;
|
||||
break;
|
||||
case OPT_SNI_DETECTION:
|
||||
if (strcmp(optarg, "parse") == 0) {
|
||||
sect_config->sni_detection = SNI_DETECTION_PARSE;
|
||||
} else if (strcmp(optarg, "brute") == 0) {
|
||||
sect_config->sni_detection = SNI_DETECTION_BRUTE;
|
||||
} else {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.threads = num;
|
||||
break;
|
||||
case OPT_QUEUE_NUM:
|
||||
num = parse_numeric_option(optarg);
|
||||
if (errno != 0 || num < 0) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.queue_start_num = num;
|
||||
break;
|
||||
case OPT_PACKET_MARK:
|
||||
num = parse_numeric_option(optarg);
|
||||
if (errno != 0 || num < 0) {
|
||||
goto invalid_opt;
|
||||
}
|
||||
|
||||
config.mark = num;
|
||||
break;
|
||||
|
||||
default:
|
||||
goto error;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// out:
|
||||
errno = 0;
|
||||
return 0;
|
||||
stop_exec:
|
||||
@@ -453,68 +482,6 @@ error:
|
||||
}
|
||||
|
||||
void print_welcome() {
|
||||
switch (config.fragmentation_strategy) {
|
||||
case FRAG_STRAT_TCP:
|
||||
printf("Using TCP segmentation\n");
|
||||
break;
|
||||
case FRAG_STRAT_IP:
|
||||
printf("Using IP fragmentation\n");
|
||||
break;
|
||||
default:
|
||||
printf("SNI fragmentation is disabled\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (config.seg2_delay) {
|
||||
printf("Some outgoing googlevideo request segments will be delayed for %d ms as of seg2_delay define\n", config.seg2_delay);
|
||||
}
|
||||
|
||||
if (config.fake_sni) {
|
||||
printf("Fake SNI will be sent before each target client hello\n");
|
||||
} else {
|
||||
printf("Fake SNI is disabled\n");
|
||||
}
|
||||
|
||||
if (config.frag_sni_reverse) {
|
||||
printf("Fragmentation Client Hello will be reversed\n");
|
||||
}
|
||||
|
||||
if (config.frag_sni_faked) {
|
||||
printf("Fooling packets will be sent near the original Client Hello\n");
|
||||
}
|
||||
|
||||
if (config.fake_sni_seq_len > 1) {
|
||||
printf("Faking sequence of length %d will be built as fake sni\n", config.fake_sni_seq_len);
|
||||
}
|
||||
|
||||
switch (config.faking_strategy) {
|
||||
case FAKE_STRAT_TTL:
|
||||
printf("TTL faking strategy will be used with TTL %d\n", config.faking_ttl);
|
||||
break;
|
||||
case FAKE_STRAT_RAND_SEQ:
|
||||
printf("Random seq faking strategy will be used\n");
|
||||
printf("Fake seq offset set to %u\n", config.fakeseq_offset);
|
||||
break;
|
||||
case FAKE_STRAT_TCP_CHECK:
|
||||
printf("TCP checksum faking strategy will be used\n");
|
||||
break;
|
||||
case FAKE_STRAT_PAST_SEQ:
|
||||
printf("Past seq faking strategy will be used\n");
|
||||
break;
|
||||
case FAKE_STRAT_TCP_MD5SUM:
|
||||
printf("md5sum faking strategy will be used\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (config.fk_winsize) {
|
||||
printf("Response TCP window will be set to %d with the appropriate scale\n", config.fk_winsize);
|
||||
}
|
||||
|
||||
if (config.synfake) {
|
||||
printf("Fake SYN payload will be sent with each TCP request SYN packet\n");
|
||||
}
|
||||
|
||||
|
||||
if (config.use_gso) {
|
||||
printf("GSO is enabled\n");
|
||||
}
|
||||
@@ -524,18 +491,88 @@ void print_welcome() {
|
||||
} else {
|
||||
printf("IPv6 is disabled\n");
|
||||
}
|
||||
|
||||
printf("Detected %d config sections\n", config.custom_configs_len + 1);
|
||||
printf("The sections will be processed in ordred they goes in this output");
|
||||
|
||||
if (config.quic_drop) {
|
||||
printf("All QUIC packets will be dropped\n");
|
||||
ITER_CONFIG_SECTIONS(section) {
|
||||
int section_number = CONFIG_SECTION_NUMBER(section);
|
||||
printf("Section #%d\n", section_number);
|
||||
|
||||
switch (section->fragmentation_strategy) {
|
||||
case FRAG_STRAT_TCP:
|
||||
printf("Using TCP segmentation\n");
|
||||
break;
|
||||
case FRAG_STRAT_IP:
|
||||
printf("Using IP fragmentation\n");
|
||||
break;
|
||||
default:
|
||||
printf("SNI fragmentation is disabled\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (section->seg2_delay) {
|
||||
printf("Some outgoing googlevideo request segments will be delayed for %d ms as of seg2_delay define\n", section->seg2_delay);
|
||||
}
|
||||
|
||||
if (section->fake_sni) {
|
||||
printf("Fake SNI will be sent before each target client hello\n");
|
||||
} else {
|
||||
printf("Fake SNI is disabled\n");
|
||||
}
|
||||
|
||||
if (section->frag_sni_reverse) {
|
||||
printf("Fragmentation Client Hello will be reversed\n");
|
||||
}
|
||||
|
||||
if (section->frag_sni_faked) {
|
||||
printf("Fooling packets will be sent near the original Client Hello\n");
|
||||
}
|
||||
|
||||
if (section->fake_sni_seq_len > 1) {
|
||||
printf("Faking sequence of length %d will be built as fake sni\n", section->fake_sni_seq_len);
|
||||
}
|
||||
|
||||
switch (section->faking_strategy) {
|
||||
case FAKE_STRAT_TTL:
|
||||
printf("TTL faking strategy will be used with TTL %d\n", section->faking_ttl);
|
||||
break;
|
||||
case FAKE_STRAT_RAND_SEQ:
|
||||
printf("Random seq faking strategy will be used\n");
|
||||
printf("Fake seq offset set to %u\n", section->fakeseq_offset);
|
||||
break;
|
||||
case FAKE_STRAT_TCP_CHECK:
|
||||
printf("TCP checksum faking strategy will be used\n");
|
||||
break;
|
||||
case FAKE_STRAT_PAST_SEQ:
|
||||
printf("Past seq faking strategy will be used\n");
|
||||
break;
|
||||
case FAKE_STRAT_TCP_MD5SUM:
|
||||
printf("md5sum faking strategy will be used\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (section->fk_winsize) {
|
||||
printf("Response TCP window will be set to %d with the appropriate scale\n", section->fk_winsize);
|
||||
}
|
||||
|
||||
if (section->synfake) {
|
||||
printf("Fake SYN payload will be sent with each TCP request SYN packet\n");
|
||||
}
|
||||
|
||||
if (section->quic_drop) {
|
||||
printf("All QUIC packets will be dropped\n");
|
||||
}
|
||||
|
||||
if (section->sni_detection == SNI_DETECTION_BRUTE) {
|
||||
printf("Server Name Extension will be parsed in the bruteforce mode\n");
|
||||
}
|
||||
|
||||
if (section->all_domains) {
|
||||
printf("All Client Hello will be targetted by youtubeUnblock!\n");
|
||||
} else {
|
||||
printf("Target sni domains: %s\n", section->domains_str);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.sni_detection == SNI_DETECTION_BRUTE) {
|
||||
printf("Server Name Extension will be parsed in the bruteforce mode\n");
|
||||
}
|
||||
|
||||
if (config.all_domains) {
|
||||
printf("All Client Hello will be targetted by youtubeUnblock!\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user