mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-20 02:00:55 +07:00
fix: propagate tun2socks FailedToStart in XrayProtocol
This commit is contained in:
@@ -182,6 +182,19 @@ ErrorCode XrayProtocol::startTun2Socks()
|
||||
m_tun2socksProcess->setProgram(PermittedProcess::Tun2Socks);
|
||||
m_tun2socksProcess->setArguments({ "-device", QString("tun://%1").arg(m_tunName), "-proxy", proxyUrl });
|
||||
|
||||
connect(
|
||||
m_tun2socksProcess.data(), &IpcProcessInterfaceReplica::errorOccurred, this,
|
||||
[this](QProcess::ProcessError error) {
|
||||
if (error != QProcess::FailedToStart) {
|
||||
// Other errors are reported via the finished signal or are transient.
|
||||
return;
|
||||
}
|
||||
qCritical() << "Tun2socks failed to start";
|
||||
stop();
|
||||
setLastError(ErrorCode::Tun2SockExecutableMissing);
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
|
||||
connect(
|
||||
m_tun2socksProcess.data(), &IpcProcessInterfaceReplica::readyReadStandardError, this,
|
||||
[this]() {
|
||||
|
||||
Reference in New Issue
Block a user