feat: custom config

This commit is contained in:
arm64v8a
2023-04-09 14:00:08 +09:00
parent caca5a59f6
commit 8a0b8554b1
7 changed files with 54 additions and 17 deletions

View File

@@ -56,6 +56,13 @@ void EditCustom::onStart(QSharedPointer<NekoRay::ProxyEntity> _ent) {
" \"type\": \"socks\",\n"
" // ...\n"
"}");
} else if (preset_core == "internal-full") {
preset_command = preset_config = "";
ui->config_simple->setPlaceholderText(
"{\n"
" \"inbounds\": [],\n"
" \"outbounds\": []\n"
"}");
}
// load core ui
@@ -78,9 +85,13 @@ void EditCustom::onStart(QSharedPointer<NekoRay::ProxyEntity> _ent) {
}
// custom internal
if (preset_core == "internal") {
if (preset_core == "internal" || preset_core == "internal-full") {
ui->core->hide();
ui->core_l->setText(tr("Outbound JSON, please read the documentation."));
if (preset_core == "internal") {
ui->core_l->setText(tr("Outbound JSON, please read the documentation."));
} else {
ui->core_l->setText(tr("Please fill the complete config."));
}
ui->w_ext1->hide();
ui->w_ext2->hide();
}