mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
Fix shadowsocks edit
This commit is contained in:
parent
808c060a25
commit
c2238d3c2c
@ -19,11 +19,8 @@ void EditShadowSocks::onStart(std::shared_ptr<Configs::ProxyEntity> _ent) {
|
|||||||
ui->method->setCurrentText(outbound->method);
|
ui->method->setCurrentText(outbound->method);
|
||||||
ui->uot->setCurrentIndex(outbound->uot);
|
ui->uot->setCurrentIndex(outbound->uot);
|
||||||
ui->password->setText(outbound->password);
|
ui->password->setText(outbound->password);
|
||||||
auto ssPlugin = outbound->plugin.split(";");
|
ui->plugin->setCurrentText(outbound->plugin);
|
||||||
if (!ssPlugin.empty()) {
|
ui->plugin_opts->setText(outbound->plugin_opts);
|
||||||
ui->plugin->setCurrentText(ssPlugin[0]);
|
|
||||||
ui->plugin_opts->setText(SubStrAfter(outbound->plugin, ";"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditShadowSocks::onEnd() {
|
bool EditShadowSocks::onEnd() {
|
||||||
@ -33,9 +30,7 @@ bool EditShadowSocks::onEnd() {
|
|||||||
outbound->password = ui->password->text();
|
outbound->password = ui->password->text();
|
||||||
outbound->uot = ui->uot->currentIndex();
|
outbound->uot = ui->uot->currentIndex();
|
||||||
outbound->plugin = ui->plugin->currentText();
|
outbound->plugin = ui->plugin->currentText();
|
||||||
if (!outbound->plugin.isEmpty()) {
|
outbound->plugin_opts = ui->plugin_opts->text();
|
||||||
outbound->plugin += ";" + ui->plugin_opts->text();
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user