minor ui improvement

This commit is contained in:
arm64v8a
2023-05-22 12:32:37 +09:00
parent 68fecb7669
commit f18d1c97e9
9 changed files with 69 additions and 40 deletions

View File

@@ -602,7 +602,7 @@ namespace NekoGui {
// mux common
auto needMux = ent->type == "vmess" || ent->type == "trojan" || ent->type == "vless" || ent->type == "shadowsocks";
needMux &= !dataStore->mux_protocol.isEmpty() && dataStore->mux_concurrency > 0;
needMux &= dataStore->mux_concurrency > 0;
if (stream != nullptr) {
if (IS_NEKO_BOX) {

View File

@@ -63,7 +63,7 @@ namespace NekoGui_fmt {
tls["reality"] = QJsonObject{
{"enabled", true},
{"public_key", reality_pbk},
{"short_id", reality_sid},
{"short_id", reality_sid.split(",")[0]},
};
}
outbound->insert("tls", tls);

View File

@@ -433,6 +433,14 @@ For NekoBox, this rewrites the underlying(localhost) DNS in VPN mode, normal mod
<source>Confirm</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Server support is required</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Reality short id. Accept only one value.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DialogFirstSetup</name>
@@ -889,6 +897,10 @@ This needs to be run NekoBox with administrator privileges.</source>
<source>Plugin</source>
<translation>پلاگین</translation>
</message>
<message>
<source>Server support is required</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditSocksHttp</name>

View File

@@ -433,6 +433,14 @@ For NekoBox, this rewrites the underlying(localhost) DNS in VPN mode, normal mod
<source>Confirm</source>
<translation></translation>
</message>
<message>
<source>Server support is required</source>
<translation></translation>
</message>
<message>
<source>Reality short id. Accept only one value.</source>
<translation>Reality short id. </translation>
</message>
</context>
<context>
<name>DialogFirstSetup</name>
@@ -891,6 +899,10 @@ This needs to be run NekoBox with administrator privileges.</source>
<source>Plugin</source>
<translation></translation>
</message>
<message>
<source>Server support is required</source>
<translation></translation>
</message>
</context>
<context>
<name>EditSocksHttp</name>

View File

@@ -62,10 +62,10 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
ui->groupBox_http->hide();
ui->inbound_socks_port_l->setText(ui->inbound_socks_port_l->text().replace("Socks", "Mixed (SOCKS+HTTP)"));
ui->log_level->addItems(QString("trace debug info warn error fatal panic").split(" "));
ui->mux_protocol->addItems({"", "h2mux", "smux", "yamux"});
ui->mux_protocol->addItems({"h2mux", "smux", "yamux"});
} else {
ui->log_level->addItems({"debug", "info", "warning", "none"});
ui->mux_protocol->addItems({"", "mux.cool"});
ui->mux_protocol->hide();
}
refresh_auth();

View File

@@ -114,13 +114,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="hide_console">
<property name="text">
<string>Hide Console</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="single_core">
<property name="toolTip">
@@ -132,6 +125,13 @@ This needs to be run NekoBox with administrator privileges.</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="hide_console">
<property name="text">
<string>Hide Console</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -212,8 +212,8 @@ This needs to be run NekoBox with administrator privileges.</string>
<tabstop>vpn_ipv6</tabstop>
<tabstop>strict_route</tabstop>
<tabstop>fake_dns</tabstop>
<tabstop>hide_console</tabstop>
<tabstop>single_core</tabstop>
<tabstop>hide_console</tabstop>
<tabstop>vpn_rule_cidr</tabstop>
<tabstop>vpn_rule_process</tabstop>
<tabstop>whitelist_mode</tabstop>

View File

@@ -160,29 +160,29 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="apply_to_group">
<property name="text">
<string>Apply settings to this group</string>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
<widget class="QPushButton" name="apply_to_group">
<property name="text">
<string>Apply settings to this group</string>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
@@ -327,6 +327,9 @@
</item>
<item row="3" column="0">
<widget class="QLabel" name="multiplex_l">
<property name="toolTip">
<string>Server support is required</string>
</property>
<property name="text">
<string>Multiplex</string>
</property>
@@ -572,6 +575,9 @@ security (QUIC)</string>
</item>
<item row="2" column="0">
<widget class="QLabel" name="reality_sid_l">
<property name="toolTip">
<string>Reality short id. Accept only one value.</string>
</property>
<property name="text">
<string notr="true">Reality Sid</string>
</property>

View File

@@ -162,15 +162,13 @@
<string notr="true">v2ray-plugin</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">ssr</string>
</property>
</item>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="uot">
<property name="toolTip">
<string>Server support is required</string>
</property>
<property name="text">
<string notr="true">UDP over TCP</string>
</property>

View File

@@ -97,6 +97,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
if (NekoGui::dataStore->log_level == "warning") NekoGui::dataStore->log_level = "info";
if (!Preset::SingBox::DomainStrategy.contains(NekoGui::dataStore->routing->domain_strategy)) NekoGui::dataStore->routing->domain_strategy = "";
if (!Preset::SingBox::DomainStrategy.contains(NekoGui::dataStore->routing->outbound_domain_strategy)) NekoGui::dataStore->routing->outbound_domain_strategy = "";
if (NekoGui::dataStore->mux_protocol.isEmpty()) NekoGui::dataStore->mux_protocol = "h2mux";
//
if (QDir("dashboard").count() == 0) {
QDir().mkdir("dashboard");