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.
* coingecko.com for price data API
* explorer.myhush.org for explorer links
* explorer.hush.is for explorer links
* 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
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>
<string>logo.icns</string>
<key>CFBundleIdentifier</key>
<string>com.myhush.silentdragon</string>
<string>com.hush.silentdragon</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>

2
res/silentdragon_bg.ts

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

4
res/silentdragon_de.ts

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

4
res/silentdragon_es.ts

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

4
res/silentdragon_fi.ts

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

4
res/silentdragon_fil.ts

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

4
res/silentdragon_fr.ts

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

4
res/silentdragon_hr.ts

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

4
res/silentdragon_id.ts

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

4
res/silentdragon_it.ts

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

4
res/silentdragon_nl.ts

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

4
res/silentdragon_pt.ts

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

4
res/silentdragon_ro.ts

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

4
res/silentdragon_ru.ts

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

4
res/silentdragon_sr.ts

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

2
res/silentdragon_template.ts

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

4
res/silentdragon_tr.ts

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

4
res/silentdragon_uk.ts

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

2
res/silentdragon_zh.ts

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

13
src/connection.cpp

@ -202,7 +202,7 @@ void ConnectionLoader::createZcashConf() {
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 << "rpcuser=hush\n";
out << "rpcpassword=" % randomPassword() << "\n";
@ -232,16 +232,7 @@ void ConnectionLoader::createZcashConf() {
void ConnectionLoader::downloadParams(std::function<void(void)> cb) {
main->logger->write("Adding params to download queue");
// 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);
main->logger->write("Bad juju");
}
void ConnectionLoader::doNextDownload(std::function<void(void)> cb) {

21
src/mainwindow.cpp

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

2
src/mainwindow.h

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

6
src/mainwindow.ui

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

4
src/sendtab.cpp

@ -776,9 +776,10 @@ QString MainWindow::doSendTxValidations(Tx tx) {
}
for (auto toAddr : tx.toAddrs) {
//TODO: diff errors for completely invalid vs transparent? Educate.
if (!Settings::isValidAddress(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
@ -788,7 +789,6 @@ QString MainWindow::doSendTxValidations(Tx tx) {
}
}
return QString();
}

4
src/settings.cpp

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

6
src/settings.ui

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

13
src/websockets.cpp

@ -1,6 +1,5 @@
// Copyright 2019-2020 Hush developers
#include "websockets.h"
#include "rpc.h"
#include "settings.h"
#include "ui_mobileappconnector.h"
@ -28,7 +27,7 @@ WSServer::WSServer(quint16 port, bool debug, QObject *parent) :
m_mainWindow = (MainWindow *) parent;
if (m_pWebSocketServer->listen(QHostAddress::AnyIPv4, port)) {
if (m_debug)
qDebug() << "Echoserver listening on port" << port;
qDebug() << "SD WebSocketServer listening on port" << port;
connect(m_pWebSocketServer, &QWebSocketServer::newConnection,
this, &WSServer::onNewConnection);
connect(m_pWebSocketServer, &QWebSocketServer::closed, this, &WSServer::closed);
@ -37,7 +36,7 @@ WSServer::WSServer(quint16 port, bool debug, QObject *parent) :
WSServer::~WSServer()
{
qDebug() << "Closing websocket server";
qDebug() << "Closing WebsocketServer";
m_pWebSocketServer->close();
qDeleteAll(m_clients.begin(), m_clients.end());
qDebug() << "Deleted all websocket clients";
@ -45,7 +44,7 @@ WSServer::~WSServer()
void WSServer::onNewConnection()
{
qDebug() << "Websocket server: new connection";
qDebug() << "WebsocketServer: new connection";
QWebSocket *pSocket = m_pWebSocketServer->nextPendingConnection();
connect(pSocket, &QWebSocket::textMessageReceived, this, &WSServer::processTextMessage);
@ -121,7 +120,9 @@ void ws_error() {
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
//m_webSocket->ignoreSslErrors();
@ -131,7 +132,7 @@ void WormholeClient::connect() {
qDebug() << "Wormhole::connect";
delete m_webSocket;
m_webSocket = new QWebSocket();
QUrl wormhole = QUrl("wss://wormhole.myhush.org:443");
QUrl wormhole = QUrl("wss://wormhole.hush.is:443");
if (m_webSocket) {
QObject::connect(m_webSocket, &QWebSocket::connected, this, &WormholeClient::onConnected);

Loading…
Cancel
Save