mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-17 20:44:38 +03:00
Add shadowsocks uot option (#560)
This commit is contained in:
@@ -8,6 +8,8 @@ EditShadowSocks::EditShadowSocks(QWidget *parent) : QWidget(parent),
|
||||
ui->setupUi(this);
|
||||
if (IS_NEKO_BOX) {
|
||||
ui->method->addItems({"2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305"});
|
||||
} else {
|
||||
ui->uot->hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +22,7 @@ void EditShadowSocks::onStart(QSharedPointer<NekoRay::ProxyEntity> _ent) {
|
||||
auto bean = this->ent->ShadowSocksBean();
|
||||
|
||||
ui->method->setCurrentText(bean->method);
|
||||
ui->uot->setChecked(bean->uot);
|
||||
ui->password->setText(bean->password);
|
||||
auto ssPlugin = bean->plugin.split(";");
|
||||
if (!ssPlugin.empty()) {
|
||||
@@ -33,10 +36,11 @@ bool EditShadowSocks::onEnd() {
|
||||
|
||||
bean->method = ui->method->currentText();
|
||||
bean->password = ui->password->text();
|
||||
bean->uot = ui->uot->isChecked();
|
||||
bean->plugin = ui->plugin->currentText();
|
||||
if (!bean->plugin.isEmpty()) {
|
||||
bean->plugin += ";" + ui->plugin_opts->text();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user