diff --git a/src/configs/outbounds/shadowsocks.cpp b/src/configs/outbounds/shadowsocks.cpp index 3ceb974..dc09426 100644 --- a/src/configs/outbounds/shadowsocks.cpp +++ b/src/configs/outbounds/shadowsocks.cpp @@ -109,6 +109,10 @@ namespace Configs { BuildResult shadowsocks::Build() { + if (plugin.contains(";")) { + plugin_opts = SubStrAfter(plugin, ";"); + plugin = SubStrBefore(plugin, ";"); + } QJsonObject object; object["type"] = "shadowsocks"; mergeJsonObjects(object, outbound::Build().object); diff --git a/src/ui/profile/edit_shadowsocks.cpp b/src/ui/profile/edit_shadowsocks.cpp index 265d0d5..bde5005 100644 --- a/src/ui/profile/edit_shadowsocks.cpp +++ b/src/ui/profile/edit_shadowsocks.cpp @@ -16,6 +16,10 @@ void EditShadowSocks::onStart(std::shared_ptr _ent) { this->ent = _ent; auto outbound = this->ent->ShadowSocks(); + if (outbound->plugin.contains(";")) { + outbound->plugin_opts = SubStrAfter(outbound->plugin, ";"); + outbound->plugin = SubStrBefore(outbound->plugin, ";"); + } ui->method->setCurrentText(outbound->method); ui->uot->setCurrentIndex(outbound->uot); ui->password->setText(outbound->password);