Update StreamSettingsWidget.cpp

This commit is contained in:
DuckSoft 2020-02-18 05:37:51 +08:00 committed by GitHub
parent 92128bb0fb
commit 0160bdda58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,19 +18,17 @@ void StreamSettingsWidget::SetStreamObject(StreamSettingsObject sso)
stream = sso;
//
transportCombo->setCurrentText(stream.network);
// TLS
tlsCB->setChecked(stream.security == "tls");
serverNameTxt->setText(stream.tlsSettings.serverName);
allowInsecureCB->setChecked(stream.tlsSettings.allowInsecure);
alpnTxt->setPlainText(stream.tlsSettings.alpn.join(NEWLINE));
// TCP
tcpHeaderTypeCB->setCurrentText(stream.tcpSettings.header.type);
tcpRequestTxt->setPlainText(StructToJsonString(stream.tcpSettings.header.request));
tcpRespTxt->setPlainText(StructToJsonString(stream.tcpSettings.header.response));
// HTTP
QString allHosts;
for (auto host : stream.httpSettings.host) {
allHosts = allHosts + host + "\r\n";
}
httpHostTxt->setPlainText(allHosts);
httpHostTxt->setPlainText(stream.httpSettings.host.join(NEWLINE));
httpPathTxt->setText(stream.httpSettings.path);
// WS
wsPathTxt->setText(stream.wsSettings.path);