Browse Source

ch-ch-changes

pull/3/head
Duke Leto 3 years ago
parent
commit
b4cf171515
  1. 4
      README.md
  2. 2
      res/Info.plist
  3. 2
      res/silentdragon_bg.ts
  4. 4
      res/silentdragon_de.ts
  5. 4
      res/silentdragon_es.ts
  6. 4
      res/silentdragon_fi.ts
  7. 4
      res/silentdragon_fil.ts
  8. 4
      res/silentdragon_fr.ts
  9. 4
      res/silentdragon_hr.ts
  10. 4
      res/silentdragon_id.ts
  11. 4
      res/silentdragon_it.ts
  12. 4
      res/silentdragon_nl.ts
  13. 4
      res/silentdragon_pt.ts
  14. 4
      res/silentdragon_ro.ts
  15. 4
      res/silentdragon_ru.ts
  16. 4
      res/silentdragon_sr.ts
  17. 2
      res/silentdragon_template.ts
  18. 4
      res/silentdragon_tr.ts
  19. 4
      res/silentdragon_uk.ts
  20. 2
      res/silentdragon_zh.ts
  21. 13
      src/connection.cpp
  22. 21
      src/mainwindow.cpp
  23. 2
      src/mainwindow.h
  24. 6
      src/mainwindow.ui
  25. 4
      src/sendtab.cpp
  26. 4
      src/settings.cpp
  27. 6
      src/settings.ui
  28. 13
      src/websockets.cpp

4
README.md

@ -26,9 +26,9 @@ SilentDragon contacts a few different external websites to get various
bits of data. bits of data.
* coingecko.com for price data API * coingecko.com for price data API
* explorer.myhush.org for explorer links * explorer.hush.is for explorer links
* dexstats.info for address utilities * dexstats.info for address utilities
* wormhole.myhush.org for Wormhole services * wormhole.hush.is for Wormhole services
This means your IP address is known to these servers. Enable Tor setting This means your IP address is known to these servers. Enable Tor setting
in SilentDragon to prevent this, or better yet, use TAILS: https://tails.boum.org/ in SilentDragon to prevent this, or better yet, use TAILS: https://tails.boum.org/

2
res/Info.plist

@ -9,7 +9,7 @@
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>logo.icns</string> <string>logo.icns</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>com.myhush.silentdragon</string> <string>com.hush.silentdragon</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>

2
res/silentdragon_bg.ts

@ -469,7 +469,7 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

4
res/silentdragon_de.ts

@ -266,8 +266,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>Discord von &amp;Hush</translation> <translation>Telegram von &amp;Hush</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_es.ts

@ -256,8 +256,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_fi.ts

@ -259,8 +259,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_fil.ts

@ -470,8 +470,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>Discord ng Hush</translation> <translation>Telegram ng Hush</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_fr.ts

@ -257,8 +257,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>Discord</translation> <translation>Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_hr.ts

@ -469,8 +469,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_id.ts

@ -473,8 +473,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Discord hush</translation> <translation>&amp;Telegram hush</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_it.ts

@ -260,8 +260,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_nl.ts

@ -220,8 +220,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_pt.ts

@ -256,8 +256,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_ro.ts

@ -473,8 +473,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>Hush Discord</translation> <translation>Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_ru.ts

@ -510,8 +510,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_sr.ts

@ -469,8 +469,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

2
res/silentdragon_template.ts

@ -424,7 +424,7 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1453"/> <location filename="../src/mainwindow.ui" line="1453"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

4
res/silentdragon_tr.ts

@ -246,8 +246,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

4
res/silentdragon_uk.ts

@ -510,8 +510,8 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation>&amp;Hush Discord</translation> <translation>&amp;Hush Telegram</translation>
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1605"/> <location filename="../src/mainwindow.ui" line="1605"/>

2
res/silentdragon_zh.ts

@ -413,7 +413,7 @@
</message> </message>
<message> <message>
<location filename="../src/mainwindow.ui" line="1600"/> <location filename="../src/mainwindow.ui" line="1600"/>
<source>&amp;Hush Discord</source> <source>&amp;Hush Telegram</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>

13
src/connection.cpp

@ -202,7 +202,7 @@ void ConnectionLoader::createZcashConf() {
QTextStream out(&file); QTextStream out(&file);
out << "# Autogenerated by Hush SilentDragon https://myhush.org\n"; out << "# Autogenerated by Hush SilentDragon https://hush.is\n";
out << "server=1\n"; out << "server=1\n";
out << "rpcuser=hush\n"; out << "rpcuser=hush\n";
out << "rpcpassword=" % randomPassword() << "\n"; out << "rpcpassword=" % randomPassword() << "\n";
@ -232,16 +232,7 @@ void ConnectionLoader::createZcashConf() {
void ConnectionLoader::downloadParams(std::function<void(void)> cb) { void ConnectionLoader::downloadParams(std::function<void(void)> cb) {
main->logger->write("Adding params to download queue"); main->logger->write("Bad juju");
// Add all the files to the download queue
downloadQueue = new QQueue<QUrl>();
client = new QNetworkAccessManager(main);
//Currently we fallback to this in rare edgecases, it's not normally executed
downloadQueue->enqueue(QUrl("https://z.cash/downloads/sapling-output.params"));
downloadQueue->enqueue(QUrl("https://z.cash/downloads/sapling-spend.params"));
doNextDownload(cb);
} }
void ConnectionLoader::doNextDownload(std::function<void(void)> cb) { void ConnectionLoader::doNextDownload(std::function<void(void)> cb) {

21
src/mainwindow.cpp

@ -48,16 +48,11 @@ MainWindow::MainWindow(QWidget *parent) :
// Settings editor // Settings editor
setupSettingsModal(); setupSettingsModal();
// Set up exit action // Set up actions
QObject::connect(ui->actionExit, &QAction::triggered, this, &MainWindow::close); QObject::connect(ui->actionExit, &QAction::triggered, this, &MainWindow::close);
// Set up feedback action
QObject::connect(ui->actionDonate, &QAction::triggered, this, &MainWindow::donate); QObject::connect(ui->actionDonate, &QAction::triggered, this, &MainWindow::donate);
QObject::connect(ui->actionTelegram, &QAction::triggered, this, &MainWindow::telegram);
QObject::connect(ui->actionDiscord, &QAction::triggered, this, &MainWindow::discord);
QObject::connect(ui->actionReportBug, &QAction::triggered, this, &MainWindow::reportbug); QObject::connect(ui->actionReportBug, &QAction::triggered, this, &MainWindow::reportbug);
QObject::connect(ui->actionWebsite, &QAction::triggered, this, &MainWindow::website); QObject::connect(ui->actionWebsite, &QAction::triggered, this, &MainWindow::website);
// Set up check for updates action // Set up check for updates action
@ -579,18 +574,18 @@ void MainWindow::addressBook() {
AddressBook::open(this); AddressBook::open(this);
} }
void MainWindow::discord() { void MainWindow::telegram() {
QString url = "https://myhush.org/discord/"; QString url = "https://hush.is/tg";
QDesktopServices::openUrl(QUrl(url)); QDesktopServices::openUrl(QUrl(url));
} }
void MainWindow::reportbug() { void MainWindow::reportbug() {
QString url = "https://github.com/MyHush/SilentDragon/issues/new"; QString url = "https://git.hush.is/hush/SilentDragon/issues/new";
QDesktopServices::openUrl(QUrl(url)); QDesktopServices::openUrl(QUrl(url));
} }
void MainWindow::website() { void MainWindow::website() {
QString url = "https://myhush.org"; QString url = "https://hush.is";
QDesktopServices::openUrl(QUrl(url)); QDesktopServices::openUrl(QUrl(url));
} }
@ -608,9 +603,7 @@ void MainWindow::donate() {
ui->tabWidget->setCurrentIndex(1); ui->tabWidget->setCurrentIndex(1);
} }
/** // Validate an address
* Validate an address
*/
void MainWindow::validateAddress() { void MainWindow::validateAddress() {
// Make sure everything is up and running // Make sure everything is up and running
if (!getRPC() || !getRPC()->getConnection()) if (!getRPC() || !getRPC()->getConnection())

2
src/mainwindow.h

@ -117,7 +117,7 @@ private:
void donate(); void donate();
void website(); void website();
void discord(); void telegram();
void reportbug(); void reportbug();
void addressBook(); void addressBook();
void postToZBoard(); void postToZBoard();

6
src/mainwindow.ui

@ -1540,7 +1540,7 @@
<string>&amp;Help</string> <string>&amp;Help</string>
</property> </property>
<addaction name="actionDonate"/> <addaction name="actionDonate"/>
<addaction name="actionDiscord"/> <addaction name="actionTelegram"/>
<addaction name="actionWebsite"/> <addaction name="actionWebsite"/>
<addaction name="actionCheck_for_Updates"/> <addaction name="actionCheck_for_Updates"/>
<addaction name="actionReportBug"/> <addaction name="actionReportBug"/>
@ -1595,9 +1595,9 @@
<string>&amp;Send Duke Feedback</string> <string>&amp;Send Duke Feedback</string>
</property> </property>
</action> </action>
<action name="actionDiscord"> <action name="actionTelegram">
<property name="text"> <property name="text">
<string>&amp;Hush Discord</string> <string>&amp;Hush Telegram</string>
</property> </property>
</action> </action>
<action name="actionWebsite"> <action name="actionWebsite">

4
src/sendtab.cpp

@ -776,9 +776,10 @@ QString MainWindow::doSendTxValidations(Tx tx) {
} }
for (auto toAddr : tx.toAddrs) { for (auto toAddr : tx.toAddrs) {
//TODO: diff errors for completely invalid vs transparent? Educate.
if (!Settings::isValidAddress(toAddr.addr)) { if (!Settings::isValidAddress(toAddr.addr)) {
QString addr = (toAddr.addr.length() > 100 ? toAddr.addr.left(100) + "..." : toAddr.addr); QString addr = (toAddr.addr.length() > 100 ? toAddr.addr.left(100) + "..." : toAddr.addr);
return QString(tr("Recipient Address ")) % addr % tr(" is Invalid"); return QString(tr("Extreme Privacy! ")) % addr % tr(" is transparent. You must send to a zaddr.");
} }
// This technically shouldn't be possible, but issue #62 seems to have discovered a bug // This technically shouldn't be possible, but issue #62 seems to have discovered a bug
@ -788,7 +789,6 @@ QString MainWindow::doSendTxValidations(Tx tx) {
} }
} }
return QString(); return QString();
} }

4
src/settings.cpp

@ -35,8 +35,8 @@ void Settings::setAllowFetchPrices(bool allow) {
Explorer Settings::getExplorer() { Explorer Settings::getExplorer() {
// Load from the QT Settings. // Load from the QT Settings.
QSettings s; QSettings s;
//TODO: make it easy for people to use other explorers like komodod.com //TODO: make it easy for people to use other explorers
QString explorer = "https://explorer.myhush.org"; QString explorer = "https://explorer.hush.is";
auto txExplorerUrl = s.value("explorer/txExplorerUrl", explorer + "/tx/").toString(); auto txExplorerUrl = s.value("explorer/txExplorerUrl", explorer + "/tx/").toString();
auto addressExplorerUrl = s.value("explorer/addressExplorerUrl", explorer + "/address/").toString(); auto addressExplorerUrl = s.value("explorer/addressExplorerUrl", explorer + "/address/").toString();

6
src/settings.ui

@ -615,7 +615,7 @@
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">https://explorer.myhush.org/tx/</string> <string notr="true">https://explorer.hush.is/tx/</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_15"> <widget class="QLabel" name="label_15">
@ -641,7 +641,7 @@
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">https://explorer.myhush.org/address/</string> <string notr="true">https://explorer.hush.is/address/</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="label_16"> <widget class="QLabel" name="label_16">
@ -693,7 +693,7 @@
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string notr="true">https://explorer.testnet.myhush.org/address/</string> <string notr="true">https://explorer.testnet.hush.is/address/</string>
</property> </property>
</widget> </widget>
</widget> </widget>

13
src/websockets.cpp

@ -1,6 +1,5 @@
// Copyright 2019-2020 Hush developers // Copyright 2019-2020 Hush developers
#include "websockets.h" #include "websockets.h"
#include "rpc.h" #include "rpc.h"
#include "settings.h" #include "settings.h"
#include "ui_mobileappconnector.h" #include "ui_mobileappconnector.h"
@ -28,7 +27,7 @@ WSServer::WSServer(quint16 port, bool debug, QObject *parent) :
m_mainWindow = (MainWindow *) parent; m_mainWindow = (MainWindow *) parent;
if (m_pWebSocketServer->listen(QHostAddress::AnyIPv4, port)) { if (m_pWebSocketServer->listen(QHostAddress::AnyIPv4, port)) {
if (m_debug) if (m_debug)
qDebug() << "Echoserver listening on port" << port; qDebug() << "SD WebSocketServer listening on port" << port;
connect(m_pWebSocketServer, &QWebSocketServer::newConnection, connect(m_pWebSocketServer, &QWebSocketServer::newConnection,
this, &WSServer::onNewConnection); this, &WSServer::onNewConnection);
connect(m_pWebSocketServer, &QWebSocketServer::closed, this, &WSServer::closed); connect(m_pWebSocketServer, &QWebSocketServer::closed, this, &WSServer::closed);
@ -37,7 +36,7 @@ WSServer::WSServer(quint16 port, bool debug, QObject *parent) :
WSServer::~WSServer() WSServer::~WSServer()
{ {
qDebug() << "Closing websocket server"; qDebug() << "Closing WebsocketServer";
m_pWebSocketServer->close(); m_pWebSocketServer->close();
qDeleteAll(m_clients.begin(), m_clients.end()); qDeleteAll(m_clients.begin(), m_clients.end());
qDebug() << "Deleted all websocket clients"; qDebug() << "Deleted all websocket clients";
@ -45,7 +44,7 @@ WSServer::~WSServer()
void WSServer::onNewConnection() void WSServer::onNewConnection()
{ {
qDebug() << "Websocket server: new connection"; qDebug() << "WebsocketServer: new connection";
QWebSocket *pSocket = m_pWebSocketServer->nextPendingConnection(); QWebSocket *pSocket = m_pWebSocketServer->nextPendingConnection();
connect(pSocket, &QWebSocket::textMessageReceived, this, &WSServer::processTextMessage); connect(pSocket, &QWebSocket::textMessageReceived, this, &WSServer::processTextMessage);
@ -121,7 +120,9 @@ void ws_error() {
void WormholeClient::sslerrors(const QList<QSslError> &) void WormholeClient::sslerrors(const QList<QSslError> &)
{ {
qDebug() << "SSL errors occurred!"; //TODO: give more details. We only get semi-useful data and some errors
// should be ignored
qDebug() << "SSL errors occurred, lulz!";
//TODO: don't do this in prod //TODO: don't do this in prod
//m_webSocket->ignoreSslErrors(); //m_webSocket->ignoreSslErrors();
@ -131,7 +132,7 @@ void WormholeClient::connect() {
qDebug() << "Wormhole::connect"; qDebug() << "Wormhole::connect";
delete m_webSocket; delete m_webSocket;
m_webSocket = new QWebSocket(); m_webSocket = new QWebSocket();
QUrl wormhole = QUrl("wss://wormhole.myhush.org:443"); QUrl wormhole = QUrl("wss://wormhole.hush.is:443");
if (m_webSocket) { if (m_webSocket) {
QObject::connect(m_webSocket, &QWebSocket::connected, this, &WormholeClient::onConnected); QObject::connect(m_webSocket, &QWebSocket::connected, this, &WormholeClient::onConnected);

Loading…
Cancel
Save