mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2026-01-01 07:29:03 +08:00
feat: Add routing profile clone
This commit is contained in:
parent
52bf297a18
commit
e825810a11
@ -237,7 +237,7 @@ For NekoBox, this rewrites the underlying(localhost) DNS in Tun Mode, normal mod
|
||||
</message>
|
||||
<message>
|
||||
<source><html><head/><body><p>Remove the currently generated rule-sets so that they can be regenerated</p></body></html></source>
|
||||
<translation> <translation><html><head/><body><p>移除当前生成的规则集,以便重新生成</p></body></html></translation></translation>
|
||||
<translation><html><head/><body><p>移除当前生成的规则集,以便重新生成</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remove Generated Rule-sets</source>
|
||||
@ -716,7 +716,6 @@ when set, domain destinations are resolved to IP before connect,
|
||||
also if the connection cannot be established with the current address family (ipv4, ipv6), a fallback connection is created shortly after, with the other address family.</source>
|
||||
<translation>outbound.domain_strategy
|
||||
设置后,域名目的地在连接前解析为 IP。如果无法通过当前地址(IPv4、IPv6)建立连接,则会在稍后使用另一地址创建备用连接。</translation>
|
||||
</message>
|
||||
</message>
|
||||
<message>
|
||||
<source>Outbound Domain Strategy</source>
|
||||
|
||||
@ -159,6 +159,17 @@ void DialogManageRoutes::on_new_route_clicked() {
|
||||
});
|
||||
}
|
||||
|
||||
void DialogManageRoutes::on_clone_route_clicked() {
|
||||
auto idx = ui->route_profiles->currentRow();
|
||||
if (idx < 0) return;
|
||||
|
||||
auto chainCopy = std::make_shared<NekoGui::RoutingChain>(*chainList[idx]);
|
||||
chainCopy->name = chainCopy->name + " clone";
|
||||
chainCopy->id = -1;
|
||||
chainList.append(chainCopy);
|
||||
reloadProfileItems();
|
||||
}
|
||||
|
||||
void DialogManageRoutes::on_edit_route_clicked() {
|
||||
auto idx = ui->route_profiles->currentRow();
|
||||
if (idx < 0) return;
|
||||
|
||||
@ -40,6 +40,8 @@ public slots:
|
||||
|
||||
void on_new_route_clicked();
|
||||
|
||||
void on_clone_route_clicked();
|
||||
|
||||
void on_edit_route_clicked();
|
||||
|
||||
void on_delete_route_clicked();
|
||||
|
||||
@ -414,6 +414,13 @@ For more information, see the document "Configuration/DNS".</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clone_route">
|
||||
<property name="text">
|
||||
<string>Clone</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="edit_route">
|
||||
<property name="text">
|
||||
@ -449,7 +456,7 @@ For more information, see the document "Configuration/DNS".</string>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user