Add disable_log for naive

This commit is contained in:
arm64v8a
2023-09-05 11:07:39 +09:00
parent 0fd9ea25ab
commit 26637883a1
7 changed files with 46 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ namespace NekoGui_fmt {
proxy_url.setPort(connect_port);
proxy_url.setHost(domain_address);
result.arguments += "--log";
if (!disable_log) result.arguments += "--log";
result.arguments += "--listen=socks://127.0.0.1:" + Int2String(socks_port);
result.arguments += "--proxy=" + proxy_url.toString(QUrl::FullyEncoded);
if (domain_address != connect_address)

View File

@@ -13,6 +13,8 @@ namespace NekoGui_fmt {
QString certificate = "";
int insecure_concurrency = 0;
bool disable_log = false;
NaiveBean() : AbstractBean(0) {
_add(new configItem("username", &username, itemType::string));
_add(new configItem("password", &password, itemType::string));
@@ -21,6 +23,7 @@ namespace NekoGui_fmt {
_add(new configItem("sni", &sni, itemType::string));
_add(new configItem("certificate", &certificate, itemType::string));
_add(new configItem("insecure_concurrency", &insecure_concurrency, itemType::integer));
_add(new configItem("disable_log", &disable_log, itemType::boolean));
};
QString DisplayCoreType() override { return "Naive"; };

View File

@@ -885,6 +885,14 @@ This needs to be run NekoBox with administrator privileges.</source>
<source>Insecure concurrency</source>
<translation>همزمانی ناامن</translation>
</message>
<message>
<source>Disable logs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn on this option if your connection is lost after a while</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditQUIC</name>

View File

@@ -892,6 +892,14 @@ https://matsuridayo.github.io/n-configuration/#vpn-tun</translation>
<source>Insecure concurrency</source>
<translation></translation>
</message>
<message>
<source>Disable logs</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Turn on this option if your connection is lost after a while</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditQUIC</name>

View File

@@ -893,6 +893,14 @@ This needs to be run NekoBox with administrator privileges.</source>
<source>Insecure concurrency</source>
<translation></translation>
</message>
<message>
<source>Disable logs</source>
<translation></translation>
</message>
<message>
<source>Turn on this option if your connection is lost after a while</source>
<translation></translation>
</message>
</context>
<context>
<name>EditQUIC</name>

View File

@@ -24,6 +24,7 @@ void EditNaive::onStart(std::shared_ptr<NekoGui::ProxyEntity> _ent) {
P_LOAD_STRING(sni);
P_C_LOAD_STRING(certificate);
P_LOAD_INT(insecure_concurrency);
P_LOAD_BOOL(disable_log);
}
bool EditNaive::onEnd() {
@@ -36,6 +37,7 @@ bool EditNaive::onEnd() {
P_SAVE_STRING(sni);
P_C_SAVE_STRING(certificate);
P_SAVE_INT(insecure_concurrency);
P_SAVE_BOOL(disable_log);
return true;
}

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>525</width>
<height>304</height>
</rect>
</property>
<property name="windowTitle">
@@ -103,6 +103,20 @@
<item row="6" column="1">
<widget class="MyLineEdit" name="insecure_concurrency"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Disable logs</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="disable_log">
<property name="text">
<string>Turn on this option if your connection is lost after a while</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>