diff --git a/src/english.qm b/src/english.qm new file mode 100644 index 0000000..cd74b29 Binary files /dev/null and b/src/english.qm differ diff --git a/src/english.ts b/src/english.ts new file mode 100644 index 0000000..dbdc5d0 --- /dev/null +++ b/src/english.ts @@ -0,0 +1,236 @@ + + + + + About + + Dialog + + + + <html><head/><body><p align="center"><span style=" font-size:10pt; font-weight:600;">GoodByeDPI GUI</span></p><p align="center">Geliştirici (Developer): <span style=" font-weight:600;">hex4d0r</span></p><p align="center"><span style=" text-decoration: underline;">Kaynak Kod</span> (Source Code)</p><p align="center"><a href="https://github.com/hex4d0r/GUI-for-GoodbyeDPI"><span style=" text-decoration: underline; color:#007af4;">GitHub</span></a></p><p align="center">Bağış(Support)</p><p align="center"><a href="https://www.patreon.com/hex4d0r"><span style=" text-decoration: underline; color:#007af4;">Patreon</span></a></p><p align="center">Credits</p><p align="center"><a href="https://github.com/ValdikSS/GoodbyeDPI"><span style=" text-decoration: underline; color:#007af4;">ValdikSS/GoodByeDPI</span></a></p></body></html> + + + + TextLabel + + + + + MainWindow + + Başlat + Start + + + Durdur + Stop + + + Parametre Listesi + Parameter List + + + Ayarlar + Settings + + + Hakkında + About + + + Arka planda çalışıyor. + Working in background. + + + Başlatıldı. + Started. + + + [-] Durduruldu + [-] Stopped + + + [+] Başlatıldı +[+] PID: + [+] Started +[+] PID: + + + MainWindow + + + + Log + + + + all_dnsredir (Tavsiye Edilen) + all_dnsredir (Recommended) + + + + Settings + + Parametre Ayarları + Parameter Settings + + + Hazır Parametre Kullan + Use Quick Parameters + + + Özel Parametre Kullan + Use Custom Parameters + + + Parametreler + Parameters + + + Parametre 1 + Parameter 1 + + + Parametre 2 + Parameter 2 + + + Hizli Ayarlar + Quick Settings + + + Hazir ayarlar + Default Settings + + + Hizli ayarlari aktif et + Enable Quick Settings + + + Çalışma Ayarları + Software Settings + + + Çalışma Saatleri Ayarla (Sonraki guncellemede gelecek.) + Schedule Autostart (Will be implemented in next update) + + + Sistem Tepsisine Küçült + Minimize to Tray + + + Başlangıçta Otomatik Çalıştır + Add Startup + + + Çalışma Saatleri + Schedule Times + + + Bildirimleri Kapat + Disable Notifications + + + Form + + + + [-p] block passive DPI + + + + [-r] replace host with hoSt + + + + [-s] remove space between host header and its value + + + + [-m] mix Host header case (test.com -> tEsT.cOm) + + + + [-f] set HTTP fragmentation to value: + + + + [-k] enable HTTP persistent (keep-alive) fragmentation and set it to value: + + + + [-n] do not wait for first segment ACK when -k is enabled + + + + [-e] set HTTPS fragmentation to value: + + + + [-a] additional space between Method and Request-URI (enables -s, may break sites) + + + + [-w] try to find and parse HTTP traffic on all processed ports (not only on port 80) + + + + [--port] additional TCP port to perform fragmentation on (and HTTP tricks with -w): + + + + [--ip-id] handle additional IP ID (decimal, drop redirects and TCP RSTs with this ID): + + + + [--dns-addr] redirect UDP DNS requests to the supplied IP address (experimental): + + + + 208.67.220.220 + + + + [--dns-port] redirect UDP DNS requests to the supplied port (53 by default) + + + + [--dnsv6-addr] redirect UDPv6 DNS requests to the supplied IPv6 address (experimental): + + + + 2a02:6b8::feed:0ff + + + + [--dnsv6-port] redirect UDPv6 DNS requests to the supplied port (53 by default) + + + + [--blacklist] perform HTTP tricks only to host names and subdomains from + supplied text file. This option can be supplied multiple times. + + + + [-1] -p -r -s -f 2 -k 2 -n -e 2 (most compatible mode, default) + + + + [-3] -p -r -s -e 40 (better speed for HTTP and HTTPS) + + + + [-2] -p -r -s -f 2 -k 2 -n -e 40 (better speed for HTTPS yet still compatible) + + + + [-4] -p -r -s (best speed) + + + + HH:mm + + + + diff --git a/src/main.cpp b/src/main.cpp index 1ba1d4e..07d59cb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2,10 +2,23 @@ #include #include #include +#include +#include int main(int argc, char *argv[]) { QApplication a(argc, argv); + + QString systemLang = QLocale::languageToString(QLocale::system().language()); + + QTranslator t; + + if(systemLang != "Turkish") + { + t.load(":/english.qm"); + a.installTranslator(&t); + } + MainWindow w(a.arguments()); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4302281..e014648 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -87,7 +87,7 @@ MainWindow::MainWindow(QStringList arguments, QWidget *parent) : ui->comboParametre->addItem("russia_blacklist", QVariant("-1 --blacklist blacklist.txt")); ui->comboParametre->addItem("russia_blacklist_dnsredir", QVariant("-1 --dns-addr 1.1.1.1 --dns-port 1253 --dnsv6-addr 2a02:6b8::feed:0ff --dnsv6-port 1253 --blacklist blacklist.txt")); ui->comboParametre->addItem("all", QVariant("-1")); - ui->comboParametre->addItem("all_dnsredir (Tavsiye Edilen)", QVariant("-1 --dns-addr 1.1.1.1 --dns-port 1253 --dnsv6-addr 2a02:6b8::feed:0ff --dnsv6-port 1253")); + ui->comboParametre->addItem(tr("all_dnsredir (Tavsiye Edilen)"), QVariant("-1 --dns-addr 1.1.1.1 --dns-port 1253 --dnsv6-addr 2a02:6b8::feed:0ff --dnsv6-port 1253")); ui->comboParametre->addItem("all_dnsredir_hardcore", QVariant("-1 -a -m --dns-addr 1.1.1.1 --dns-port 1253 --dnsv6-addr 2a02:6b8::feed:0ff --dnsv6-port 1253")); ui->comboParametre->setCurrentIndex(3); @@ -113,6 +113,8 @@ MainWindow::MainWindow(QStringList arguments, QWidget *parent) : hideAction->setEnabled(false); showAction->setEnabled(true); } + + connect(proc, &QProcess::errorOccurred, this, &MainWindow::catchError); } MainWindow::~MainWindow() @@ -135,7 +137,7 @@ void MainWindow::closeEvent(QCloseEvent *event) { qDebug() << "Message will shown"; QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(QSystemTrayIcon::Information); - trayIcon->showMessage("GoodByeDPI GUI", "Arka planda çalışıyor.", icon, 4000); + trayIcon->showMessage("GoodByeDPI GUI", tr("Arka planda çalışıyor."), icon, 1000); } } else @@ -148,8 +150,16 @@ void MainWindow::procStart() { proc->setArguments(prepareParameters(ui->comboParametre->isEnabled())); //ui->debugArea->appendPlainText("[*] " + ui->comboParametre->currentText()); - proc->start(QDir::currentPath() + "/goodbyedpi/goodbyedpi.exe", QProcess::ReadWrite); + //ui->debugArea->appendPlainText("Exe Path: " + QDir::currentPath() + "/goodbyedpi/goodbyedpi.exe"); + proc->start(QDir::currentPath() + "/goodbyedpi/goodbyedpi.exe", QProcess::ReadOnly); proc->waitForStarted(1000); + + if(!settings->value("System/disableNotifications").toBool() && !this->isVisible()) + { + qDebug() << "Message will shown"; + QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(QSystemTrayIcon::Information); + trayIcon->showMessage("GoodByeDPI GUI", tr("Başlatıldı."), icon, 1000); + } } void MainWindow::procStop() @@ -182,7 +192,7 @@ void MainWindow::handleState() { if(proc->state() == QProcess::NotRunning) { - ui->debugArea->appendPlainText("[-] Durduruldu"); + ui->debugArea->appendPlainText(tr("[-] Durduruldu")); ui->btnStart->setEnabled(true); ui->btnStop->setEnabled(false); trayMenu->actions().at(1)->setEnabled(false); @@ -190,7 +200,7 @@ void MainWindow::handleState() } else if(proc->state() == QProcess::Running) { - ui->debugArea->appendPlainText("[+] Başlatıldı\n[+] PID:" + QString::number(proc->processId()) + "\n"); + ui->debugArea->appendPlainText(tr("[+] Başlatıldı\n[+] PID:") + QString::number(proc->processId()) + "\n"); ui->btnStart->setEnabled(false); ui->btnStop->setEnabled(true); trayMenu->actions().at(0)->setEnabled(false); @@ -330,3 +340,8 @@ QStringList MainWindow::prepareParameters(bool isComboParametreEnabled) } } + +void MainWindow::catchError(QProcess::ProcessError err) +{ + ui->debugArea->appendPlainText(proc->errorString()); +} diff --git a/src/mainwindow.h b/src/mainwindow.h index 0d1eb83..2f8bf3f 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -40,6 +40,8 @@ public slots: QStringList prepareParameters(bool isComboParametreEnabled); + void catchError(QProcess::ProcessError err); + private: Ui::MainWindow *ui; diff --git a/src/res.qrc b/src/res.qrc index 4210e76..0b8b6e9 100644 --- a/src/res.qrc +++ b/src/res.qrc @@ -1,5 +1,7 @@ - + + english.qm + images/info-button.png images/play-button.png