Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix listen IP address on Workstation/Gateway setups #102

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/libtego/source/core/UserIdentity.cpp
Expand Up @@ -111,6 +111,13 @@ void UserIdentity::setupService(const QString& serviceID)
QHostAddress address = QHostAddress::LocalHost;
quint16 port = 0;

// If Ricochet is running on a different machine than Tor (i.e.
// Workstation/Gateway setup), then listen on 0.0.0.0 as per this spec:
// http://www.dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion/wiki/Dev/Whonix_friendly_applications_best_practices#Listen_Interface
if (QFile::exists("/usr/share/anon-ws-base-files/workstation")) {
address = QHostAddress::AnyIPv4;
}

m_incomingServer = new QTcpServer(this);
if (!m_incomingServer->listen(address, port)) {
// XXX error case
Expand Down