Do not hide sni domains with tls disabled

This commit is contained in:
Vadim Vetrov 2025-01-04 19:27:12 +03:00
parent 71c105a900
commit 40e1101d68
No known key found for this signature in database
GPG Key ID: E8A308689D7A73A5

View File

@ -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);