mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2025-01-15 19:15:17 +00:00
Do not hide sni domains with tls disabled
This commit is contained in:
parent
71c105a900
commit
40e1101d68
53
src/args.c
53
src/args.c
@ -825,22 +825,6 @@ static size_t print_config_section(const struct section_config_t *section, char
|
||||
|
||||
if (section->tls_enabled) {
|
||||
print_cnf_buf("--tls=enabled");
|
||||
if (section->all_domains) {
|
||||
print_cnf_buf("--sni-domains=all");
|
||||
} else if (section->sni_domains != NULL) {
|
||||
print_cnf_raw("--sni-domains=");
|
||||
for (struct domains_list *sne = section->sni_domains; sne != NULL; sne = sne->next) {
|
||||
print_cnf_raw("%s,", sne->domain_name);
|
||||
}
|
||||
print_cnf_raw(" ");
|
||||
}
|
||||
if (section->exclude_sni_domains != NULL) {
|
||||
print_cnf_raw("--exclude-domains=");
|
||||
for (struct domains_list *sne = section->exclude_sni_domains; sne != NULL; sne = sne->next) {
|
||||
print_cnf_raw("%s,", sne->domain_name);
|
||||
}
|
||||
print_cnf_raw(" ");
|
||||
}
|
||||
|
||||
switch(section->fragmentation_strategy) {
|
||||
case FRAG_STRAT_IP:
|
||||
@ -897,22 +881,39 @@ static size_t print_config_section(const struct section_config_t *section, char
|
||||
|
||||
}
|
||||
|
||||
switch(section->sni_detection) {
|
||||
case SNI_DETECTION_BRUTE:
|
||||
print_cnf_buf("--sni-detection=brute");
|
||||
break;
|
||||
case SNI_DETECTION_PARSE:
|
||||
print_cnf_buf("--sni-detection=parse");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
print_cnf_buf("--seg2delay=%d", section->seg2_delay);
|
||||
}
|
||||
} else {
|
||||
print_cnf_buf("--tls=disabled");
|
||||
}
|
||||
|
||||
if (section->all_domains) {
|
||||
print_cnf_buf("--sni-domains=all");
|
||||
} else if (section->sni_domains != NULL) {
|
||||
print_cnf_raw("--sni-domains=");
|
||||
for (struct domains_list *sne = section->sni_domains; sne != NULL; sne = sne->next) {
|
||||
print_cnf_raw("%s,", sne->domain_name);
|
||||
}
|
||||
print_cnf_raw(" ");
|
||||
}
|
||||
if (section->exclude_sni_domains != NULL) {
|
||||
print_cnf_raw("--exclude-domains=");
|
||||
for (struct domains_list *sne = section->exclude_sni_domains; sne != NULL; sne = sne->next) {
|
||||
print_cnf_raw("%s,", sne->domain_name);
|
||||
}
|
||||
print_cnf_raw(" ");
|
||||
}
|
||||
|
||||
switch(section->sni_detection) {
|
||||
case SNI_DETECTION_BRUTE:
|
||||
print_cnf_buf("--sni-detection=brute");
|
||||
break;
|
||||
case SNI_DETECTION_PARSE:
|
||||
print_cnf_buf("--sni-detection=parse");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (section->synfake) {
|
||||
print_cnf_buf("--synfake=1");
|
||||
print_cnf_buf("--synfake-len=%d", section->synfake_len);
|
||||
|
Loading…
Reference in New Issue
Block a user