├── LICENSE ├── README.md └── src ├── GuiForGoodByeDpi.pro ├── about.cpp ├── about.h ├── about.ui ├── guiforgoodbyedpi.exe.manifest ├── guiforgoodbyedpi.rc ├── icon.ico ├── images ├── icon.ico ├── icon.png ├── info-button.png ├── play-button.png ├── settings-gears-button.png ├── settings.png └── stop-button.png ├── lang_en.qm ├── lang_en.ts ├── lang_ko.qm ├── lang_ko.ts ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h ├── mainwindow.ui ├── res.qrc ├── service_remove.cmd ├── settings.cpp ├── settings.h └── settings.ui /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 hex4d0r 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GUI For GoodByeDPI 2 | 3 | 4 | # Download 5 | [Releases](https://github.com/Include-sys/GUI-for-GoodbyeDPI/releases) 6 | 7 | 8 | 9 | > You need to install Microsoft VC++ 2017 in order to use GUI For GoodbyeDPI 10 | 11 | > Link: [MSVC++ 2017](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) 12 | 13 | ## Warning 14 | For save custom parameters to save you need to close Settings window first then start. You can check whether app does work properly or not in Log section. Feel free to report issues. 15 | 16 | ## Settings 17 | You don't need to configure any option, custom parameters are optinal.It's recommended to change your Windows DNS while using GUI For GoodbyeDPI. 18 | 19 | ## Compilation of GUI For GoodbyeDPI 20 | In latest release I used Qt 5.12 for compile but you can use any Qt 5.x version. I compiled without an issue with MSVC 2017 32Bit and 64Bit compilers. You can also use MinGW compilers as well. 21 | 22 | Compile GoodbyeDPI Yourself(Not Translated Yet) 23 | > [Google Docs](https://docs.google.com/document/d/1LMGmFVu17NKItqTpJKGKXMhX58xWcCJPezddCo73e7c/edit?usp=sharing) 24 | 25 | 26 | ## ToDo Features 27 | 28 | | Feature | Improvement | 29 | | -- | --| 30 | | Installer |Reimplementation of Parameter System| 31 | | Updater |Better Error Handling| 32 | | Changing System DNS(maybe Dnscrypt)|Improvement on Interface | 33 | -------------------------------------------------------------------------------- /src/GuiForGoodByeDpi.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2018-03-28T22:06:28 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | CONFIG += c++11 9 | 10 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 11 | 12 | TARGET = GuiForGoodByeDpi 13 | TEMPLATE = app 14 | 15 | # The following define makes your compiler emit warnings if you use 16 | # any feature of Qt which has been marked as deprecated (the exact warnings 17 | # depend on your compiler). Please consult the documentation of the 18 | # deprecated API in order to know how to port your code away from it. 19 | DEFINES += QT_DEPRECATED_WARNINGS 20 | 21 | # You can also make your code fail to compile if you use deprecated APIs. 22 | # In order to do so, uncomment the following line. 23 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 24 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 25 | 26 | 27 | #Adming Rights and Setting ICON 28 | win32-msvc* { 29 | RC_ICONS = images/icon.ico 30 | CONFIG += embed_manifest_exe 31 | QMAKE_LFLAGS_WINDOWS += /MANIFESTUAC:level=\'requireAdministrator\' 32 | } 33 | 34 | win32-g++ { 35 | RC_FILE = guiforgoodbyedpi.rc 36 | } 37 | 38 | SOURCES += \ 39 | main.cpp \ 40 | mainwindow.cpp \ 41 | settings.cpp \ 42 | about.cpp 43 | 44 | HEADERS += \ 45 | mainwindow.h \ 46 | settings.h \ 47 | about.h 48 | 49 | FORMS += \ 50 | mainwindow.ui \ 51 | settings.ui \ 52 | about.ui 53 | 54 | RESOURCES += \ 55 | res.qrc 56 | -------------------------------------------------------------------------------- /src/about.cpp: -------------------------------------------------------------------------------- 1 | #include "about.h" 2 | #include "ui_about.h" 3 | #include 4 | 5 | About::About(QWidget *parent) : 6 | QDialog(parent), 7 | ui(new Ui::About) 8 | { 9 | ui->setupUi(this); 10 | setWindowFlags(Qt::MSWindowsFixedSizeDialogHint); 11 | setWindowTitle("Hakkında"); 12 | setWindowIcon(QIcon(":/images/images/info-button.png")); 13 | 14 | QPixmap pix(":/images/images/icon.png"); 15 | ui->iconLabel->setPixmap(pix); 16 | ui->iconLabel->setScaledContents(true); 17 | ui->iconLabel->setSizePolicy( QSizePolicy::Ignored, QSizePolicy::Ignored ); 18 | 19 | ui->aboutLabel->setTextFormat(Qt::RichText); 20 | ui->aboutLabel->setTextInteractionFlags(Qt::TextBrowserInteraction); 21 | ui->aboutLabel->setOpenExternalLinks(true); 22 | 23 | } 24 | 25 | About::~About() 26 | { 27 | delete ui; 28 | } 29 | -------------------------------------------------------------------------------- /src/about.h: -------------------------------------------------------------------------------- 1 | #ifndef ABOUT_H 2 | #define ABOUT_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui { 8 | class About; 9 | } 10 | 11 | class About : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | explicit About(QWidget *parent = nullptr); 17 | ~About(); 18 | 19 | private: 20 | Ui::About *ui; 21 | }; 22 | 23 | #endif // ABOUT_H 24 | -------------------------------------------------------------------------------- /src/about.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | About 4 | 5 | 6 | 7 | 0 8 | 0 9 | 318 10 | 500 11 | 12 | 13 | 14 | 15 | 300 16 | 340 17 | 18 | 19 | 20 | 21 | 318 22 | 500 23 | 24 | 25 | 26 | Dialog 27 | 28 | 29 | 30 | 31 | 32 | 33 | 16777215 34 | 300 35 | 36 | 37 | 38 | <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;">include</span></p><p align="center"><span style=" text-decoration: underline;">Kaynak Kod</span> (Source Code)</p><p align="center"><a href="https://github.com/include-sys/GUI-for-GoodbyeDPI"><span style=" text-decoration: underline; color:#007af4;">GitHub</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> 39 | 40 | 41 | Qt::AlignCenter 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 0 50 | 0 51 | 52 | 53 | 54 | 55 | 256 56 | 256 57 | 58 | 59 | 60 | 61 | 256 62 | 256 63 | 64 | 65 | 66 | TextLabel 67 | 68 | 69 | Qt::AlignCenter 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/guiforgoodbyedpi.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GoodbyeDPI GPU 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/guiforgoodbyedpi.rc: -------------------------------------------------------------------------------- 1 | 1 24 "guiforgoodbyedpi.exe.manifest" 2 | id ICON "images/icon.ico" 3 | -------------------------------------------------------------------------------- /src/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/icon.ico -------------------------------------------------------------------------------- /src/images/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/images/icon.ico -------------------------------------------------------------------------------- /src/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/images/icon.png -------------------------------------------------------------------------------- /src/images/info-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/images/info-button.png -------------------------------------------------------------------------------- /src/images/play-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/images/play-button.png -------------------------------------------------------------------------------- /src/images/settings-gears-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/images/settings-gears-button.png -------------------------------------------------------------------------------- /src/images/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/images/settings.png -------------------------------------------------------------------------------- /src/images/stop-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/images/stop-button.png -------------------------------------------------------------------------------- /src/lang_en.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/lang_en.qm -------------------------------------------------------------------------------- /src/lang_en.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About 6 | 7 | Dialog 8 | 9 | 10 | 11 | <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> 12 | 13 | 14 | 15 | TextLabel 16 | 17 | 18 | 19 | 20 | MainWindow 21 | 22 | Başlat 23 | Start 24 | 25 | 26 | Durdur 27 | Stop 28 | 29 | 30 | Parametre Listesi 31 | Parameter List 32 | 33 | 34 | Ayarlar 35 | Settings 36 | 37 | 38 | Hakkında 39 | About 40 | 41 | 42 | Arka planda çalışıyor. 43 | Working in background. 44 | 45 | 46 | Başlatıldı. 47 | Started. 48 | 49 | 50 | [-] Durduruldu 51 | [-] Stopped 52 | 53 | 54 | [+] Başlatıldı 55 | [+] PID: 56 | [+] Started 57 | [+] PID: 58 | 59 | 60 | MainWindow 61 | 62 | 63 | 64 | Log 65 | 66 | 67 | 68 | all_dnsredir (Tavsiye Edilen) 69 | all_dnsredir (Recommended) 70 | 71 | 72 | Gizle 73 | Hide 74 | 75 | 76 | Göster 77 | Show 78 | 79 | 80 | Çıkış 81 | Exit 82 | 83 | 84 | 85 | Settings 86 | 87 | Parametre Ayarları 88 | Parameter Settings 89 | 90 | 91 | Hazır Parametre Kullan 92 | Use Quick Parameters 93 | 94 | 95 | Özel Parametre Kullan 96 | Use Custom Parameters 97 | 98 | 99 | Parametreler 100 | Parameters 101 | 102 | 103 | Parametre 1 104 | Parameter 1 105 | 106 | 107 | Parametre 2 108 | Parameter 2 109 | 110 | 111 | Hizli Ayarlar 112 | Quick Settings 113 | 114 | 115 | Hazir ayarlar 116 | Default Settings 117 | 118 | 119 | Hizli ayarlari aktif et 120 | Enable Quick Settings 121 | 122 | 123 | Çalışma Ayarları 124 | Software Settings 125 | 126 | 127 | Çalışma Saatleri Ayarla (Sonraki guncellemede gelecek.) 128 | Schedule Autostart (Will be implemented in next update) 129 | 130 | 131 | Sistem Tepsisine Küçült 132 | Minimize to Tray 133 | 134 | 135 | Başlangıçta Otomatik Çalıştır 136 | Add Startup 137 | 138 | 139 | Çalışma Saatleri 140 | Schedule Times 141 | 142 | 143 | Bildirimleri Kapat 144 | Disable Notifications 145 | 146 | 147 | Form 148 | 149 | 150 | 151 | [-p] block passive DPI 152 | 153 | 154 | 155 | [-r] replace host with hoSt 156 | 157 | 158 | 159 | [-s] remove space between host header and its value 160 | 161 | 162 | 163 | [-m] mix Host header case (test.com -> tEsT.cOm) 164 | 165 | 166 | 167 | [-f] set HTTP fragmentation to value: 168 | 169 | 170 | 171 | [-k] enable HTTP persistent (keep-alive) fragmentation and set it to value: 172 | 173 | 174 | 175 | [-n] do not wait for first segment ACK when -k is enabled 176 | 177 | 178 | 179 | [-e] set HTTPS fragmentation to value: 180 | 181 | 182 | 183 | [-a] additional space between Method and Request-URI (enables -s, may break sites) 184 | 185 | 186 | 187 | [-w] try to find and parse HTTP traffic on all processed ports (not only on port 80) 188 | 189 | 190 | 191 | [--port] additional TCP port to perform fragmentation on (and HTTP tricks with -w): 192 | 193 | 194 | 195 | [--ip-id] handle additional IP ID (decimal, drop redirects and TCP RSTs with this ID): 196 | 197 | 198 | 199 | [--dns-addr] redirect UDP DNS requests to the supplied IP address (experimental): 200 | 201 | 202 | 203 | 208.67.220.220 204 | 205 | 206 | 207 | [--dns-port] redirect UDP DNS requests to the supplied port (53 by default) 208 | 209 | 210 | 211 | [--dnsv6-addr] redirect UDPv6 DNS requests to the supplied IPv6 address (experimental): 212 | 213 | 214 | 215 | 2a02:6b8::feed:0ff 216 | 217 | 218 | 219 | [--dnsv6-port] redirect UDPv6 DNS requests to the supplied port (53 by default) 220 | 221 | 222 | 223 | [--blacklist] perform HTTP tricks only to host names and subdomains from 224 | supplied text file. This option can be supplied multiple times. 225 | 226 | 227 | 228 | [-1] -p -r -s -f 2 -k 2 -n -e 2 (most compatible mode, default) 229 | 230 | 231 | 232 | [-3] -p -r -s -e 40 (better speed for HTTP and HTTPS) 233 | 234 | 235 | 236 | [-2] -p -r -s -f 2 -k 2 -n -e 40 (better speed for HTTPS yet still compatible) 237 | 238 | 239 | 240 | [-4] -p -r -s (best speed) 241 | 242 | 243 | 244 | HH:mm 245 | 246 | 247 | 248 | 249 | -------------------------------------------------------------------------------- /src/lang_ko.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Include-sys/GUI-for-GoodbyeDPI/6ad4c9dfc1b6a622a354f973baeeeb722fb780ed/src/lang_ko.qm -------------------------------------------------------------------------------- /src/lang_ko.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | About 6 | 7 | 8 | Dialog 9 | 10 | 11 | 12 | 13 | <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> 14 | 15 | 16 | 17 | 18 | TextLabel 19 | 20 | 21 | 22 | 23 | MainWindow 24 | 25 | 26 | MainWindow 27 | 28 | 29 | 30 | 31 | 32 | Başlat 33 | 시작 34 | 35 | 36 | 37 | 38 | Durdur 39 | 중지 40 | 41 | 42 | 43 | Parametre Listesi 44 | 인자 목록 45 | 46 | 47 | 48 | Log 49 | 50 | 51 | 52 | 53 | 54 | Ayarlar 55 | 설정 56 | 57 | 58 | 59 | 60 | Hakkında 61 | 정보 62 | 63 | 64 | 65 | Gizle 66 | 숨기기 67 | 68 | 69 | 70 | Göster 71 | 보이기 72 | 73 | 74 | 75 | Çıkış 76 | 나가기 77 | 78 | 79 | 80 | all_dnsredir (Tavsiye Edilen) 81 | all_dnsredir (추천) 82 | 83 | 84 | 85 | Arka planda çalışıyor. 86 | 백그라운드에서 동작. 87 | 88 | 89 | 90 | Başlatıldı. 91 | 시작함. 92 | 93 | 94 | 95 | [-] Durduruldu 96 | [-] 멈춤 97 | 98 | 99 | 100 | [+] Başlatıldı 101 | [+] PID: 102 | [+] Started 103 | [+] PID: 104 | 105 | 106 | 107 | Settings 108 | 109 | 110 | Form 111 | 112 | 113 | 114 | 115 | Parametre Ayarları 116 | 인자 설정 117 | 118 | 119 | 120 | Hazır Parametre Kullan 121 | 빠른 인자 사용 122 | 123 | 124 | 125 | Özel Parametre Kullan 126 | 커스텀 인자 사용 127 | 128 | 129 | 130 | Parametreler 131 | 인자들 132 | 133 | 134 | 135 | Parametre 1 136 | 인자 1 137 | 138 | 139 | 140 | [-p] block passive DPI 141 | 142 | 143 | 144 | 145 | [-r] replace host with hoSt 146 | 147 | 148 | 149 | 150 | [-s] remove space between host header and its value 151 | 152 | 153 | 154 | 155 | [-m] mix Host header case (test.com -> tEsT.cOm) 156 | 157 | 158 | 159 | 160 | [-f] set HTTP fragmentation to value: 161 | 162 | 163 | 164 | 165 | [-k] enable HTTP persistent (keep-alive) fragmentation and set it to value: 166 | 167 | 168 | 169 | 170 | [-n] do not wait for first segment ACK when -k is enabled 171 | 172 | 173 | 174 | 175 | [-e] set HTTPS fragmentation to value: 176 | 177 | 178 | 179 | 180 | [-a] additional space between Method and Request-URI (enables -s, may break sites) 181 | 182 | 183 | 184 | 185 | [-w] try to find and parse HTTP traffic on all processed ports (not only on port 80) 186 | 187 | 188 | 189 | 190 | [--port] additional TCP port to perform fragmentation on (and HTTP tricks with -w): 191 | 192 | 193 | 194 | 195 | [--ip-id] handle additional IP ID (decimal, drop redirects and TCP RSTs with this ID): 196 | 197 | 198 | 199 | 200 | Parametre 2 201 | 인자 2 202 | 203 | 204 | 205 | [--dns-addr] redirect UDP DNS requests to the supplied IP address (experimental): 206 | 207 | 208 | 209 | 210 | 208.67.220.220 211 | 212 | 213 | 214 | 215 | [--dns-port] redirect UDP DNS requests to the supplied port (53 by default) 216 | 217 | 218 | 219 | 220 | [--dnsv6-addr] redirect UDPv6 DNS requests to the supplied IPv6 address (experimental): 221 | 222 | 223 | 224 | 225 | 2a02:6b8::feed:0ff 226 | 227 | 228 | 229 | 230 | [--dnsv6-port] redirect UDPv6 DNS requests to the supplied port (53 by default) 231 | 232 | 233 | 234 | 235 | [--blacklist] perform HTTP tricks only to host names and subdomains from 236 | supplied text file. This option can be supplied multiple times. 237 | 238 | 239 | 240 | 241 | Hizli Ayarlar 242 | 간편 설정 243 | 244 | 245 | 246 | Hazir ayarlar 247 | 기본 설정 248 | 249 | 250 | 251 | [-1] -p -r -s -f 2 -k 2 -n -e 2 (most compatible mode, default) 252 | 253 | 254 | 255 | 256 | [-3] -p -r -s -e 40 (better speed for HTTP and HTTPS) 257 | 258 | 259 | 260 | 261 | [-2] -p -r -s -f 2 -k 2 -n -e 40 (better speed for HTTPS yet still compatible) 262 | 263 | 264 | 265 | 266 | [-4] -p -r -s (best speed) 267 | 268 | 269 | 270 | 271 | Hizli ayarlari aktif et 272 | 간편 설정 켜기 273 | 274 | 275 | 276 | Çalışma Ayarları 277 | 소프트웨어 설정 278 | 279 | 280 | 281 | Çalışma Saatleri Ayarla (Sonraki guncellemede gelecek.) 282 | 자동시작 스케줄 (다음 업데이트에 추가 예정) 283 | 284 | 285 | 286 | Sistem Tepsisine Küçült 287 | 트레이로 최소화 288 | 289 | 290 | 291 | Başlangıçta Otomatik Çalıştır 292 | 부팅시 시작 293 | 294 | 295 | 296 | Çalışma Saatleri 297 | 시간 설정 298 | 299 | 300 | 301 | 302 | HH:mm 303 | 304 | 305 | 306 | 307 | Bildirimleri Kapat 308 | 알림 끄기 309 | 310 | 311 | 312 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | QApplication a(argc, argv); 11 | 12 | QString systemLang = QLocale::languageToString(QLocale::system().language()); 13 | 14 | QTranslator t; 15 | 16 | if(systemLang == "Turkish") 17 | { 18 | 19 | } 20 | 21 | else if (systemLang == "Korean") 22 | { 23 | t.load(":/lang_ko.qm"); 24 | a.installTranslator(&t); 25 | } 26 | 27 | else 28 | { 29 | t.load(":/lang_en.qm"); 30 | a.installTranslator(&t); 31 | } 32 | 33 | MainWindow w(a.arguments()); 34 | 35 | 36 | QStringList argList = a.arguments(); 37 | QString argument = argList.join(","); 38 | 39 | bool silent = argument.contains("-silent"); 40 | 41 | if(!silent) 42 | { 43 | w.show(); 44 | } 45 | 46 | 47 | return a.exec(); 48 | } 49 | -------------------------------------------------------------------------------- /src/mainwindow.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwindow.h" 2 | #include "ui_mainwindow.h" 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | MainWindow::MainWindow(QStringList arguments, QWidget *parent) : 14 | QMainWindow(parent), 15 | ui(new Ui::MainWindow), 16 | tmpDir(new QTemporaryDir()), 17 | settings(new QSettings("HexOpenSource", "GBDPI-GUI", this)), 18 | trayIcon(new QSystemTrayIcon(this)), 19 | trayMenu(new QMenu(this)), 20 | hideAction(new QAction(tr("Gizle"), this)), 21 | showAction(new QAction(tr("Göster"), this)), 22 | closeAction(new QAction(tr("Çıkış"), this)), 23 | startAction(new QAction(QIcon(":/images/images/play-button.png"), tr("Başlat"), this)), 24 | stopAction(new QAction(QIcon(":/images/images/stop-button.png"), tr("Durdur"), this)), 25 | settingsAction(new QAction(QIcon(":/images/images/settings-gears-button.png"), tr("Ayarlar"), this)), 26 | proc(new QProcess(this)), 27 | ayarlar(new Settings()) 28 | 29 | 30 | { 31 | ui->setupUi(this); 32 | setWindowTitle("GoodByeDPI GUI"); 33 | setWindowIcon(QIcon(":/images/images/icon.ico")); 34 | 35 | trayIcon->setIcon(QIcon(":/images/images/icon.ico")); 36 | trayIcon->setToolTip("GoodByeDPI GUI by include"); 37 | 38 | ui->labelParameters->setWordWrap(true); 39 | 40 | //For using lambda functions with traymenu 41 | auto& traymn = trayMenu; 42 | 43 | //Setting traymenu actions. 44 | connect(startAction, &QAction::triggered, this, &MainWindow::procStart); 45 | connect(stopAction, &QAction::triggered, this, &MainWindow::procStop); 46 | connect(closeAction, &QAction::triggered, [this](){ 47 | QCoreApplication::quit(); 48 | }); 49 | connect(hideAction, &QAction::triggered, [this, traymn](){ 50 | this->hide(); 51 | traymn->actions().at(5)->setEnabled(false); 52 | traymn->actions().at(4)->setEnabled(true); 53 | }); 54 | connect(settingsAction, &QAction::triggered, this, &MainWindow::onActionAyarlar); 55 | connect(showAction, &QAction::triggered, [this, traymn](){ 56 | this->show(); 57 | traymn->actions().at(5)->setEnabled(true); 58 | traymn->actions().at(4)->setEnabled(false); 59 | }); 60 | 61 | QList actionList; 62 | actionList << startAction << stopAction << settingsAction << showAction << hideAction << closeAction; 63 | 64 | trayMenu->addActions(actionList); 65 | trayMenu->insertSeparator(showAction); 66 | 67 | trayIcon->setContextMenu(trayMenu); 68 | trayIcon->show(); 69 | //Set false Stop and Hide actions 70 | trayMenu->actions().at(4)->setEnabled(false); 71 | trayMenu->actions().at(1)->setEnabled(false); 72 | 73 | connect(ui->actionAyarlar, &QAction::triggered, this, &MainWindow::onActionAyarlar); 74 | connect(ui->actionAbout, &QAction::triggered, this, &MainWindow::onActionAbout); 75 | 76 | //Checking if default parameters enabled or not due to enable/disable parameters combo box. 77 | if(!settings->value("Parametre/defaultParam").toBool()) 78 | { 79 | ui->comboParametre->setEnabled(false); 80 | } 81 | 82 | //Capturing state of default parameters checkbox for enable/disable parameters combo box. 83 | connect(ayarlar, &Settings::defaultParamStateChanged, this, &MainWindow::onDefaultParamCheckState, Qt::QueuedConnection); 84 | 85 | connect(ui->btnStart, &QPushButton::clicked, this, &MainWindow::procStart); 86 | connect(ui->btnStop, &QPushButton::clicked, this, &MainWindow::procStop); 87 | connect(proc, &QProcess::stateChanged, this, &MainWindow::handleState); 88 | 89 | ui->comboParametre->addItem("russia_blacklist", QVariant("-1 --blacklist blacklist.txt")); 90 | 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")); 91 | ui->comboParametre->addItem("all", QVariant("-1")); 92 | 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")); 93 | 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")); 94 | 95 | ui->comboParametre->setCurrentIndex(3); 96 | 97 | ui->btnStop->setEnabled(false); 98 | 99 | connect(ui->comboParametre, QOverload::of(&QComboBox::currentIndexChanged), [this]() 100 | { 101 | prepareParameters(true); 102 | }); 103 | 104 | //Capturing ouput of goodbyedpi.exe 105 | connect(proc, &QProcess::readyReadStandardOutput, this, &MainWindow::processOutput); 106 | connect(proc, &QProcess::readyReadStandardError, this, &MainWindow::processError); 107 | 108 | if(settings->value("Parametre/defaultParam").toBool()) 109 | prepareParameters(true); 110 | else 111 | prepareParameters(false); 112 | 113 | if(!this->isVisible()) 114 | { 115 | hideAction->setEnabled(false); 116 | showAction->setEnabled(true); 117 | } 118 | 119 | connect(proc, &QProcess::errorOccurred, this, &MainWindow::catchError); 120 | } 121 | 122 | MainWindow::~MainWindow() 123 | { 124 | delete ui; 125 | proc->kill(); 126 | } 127 | 128 | void MainWindow::closeEvent(QCloseEvent *event) 129 | { 130 | //qDebug() << settings->value("System/systemTray").toString(); 131 | if(settings->value("System/systemTray").toString() == "true" && (this->isTopLevel() || this->isVisible())) 132 | { 133 | event->ignore(); 134 | this->hide(); 135 | trayMenu->actions().at(4)->setEnabled(true); 136 | trayMenu->actions().at(5)->setEnabled(false); 137 | 138 | if(!settings->value("System/disableNotifications").toBool()) 139 | { 140 | qDebug() << "Message will shown"; 141 | QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(QSystemTrayIcon::Information); 142 | trayIcon->showMessage("GoodByeDPI GUI", tr("Arka planda çalışıyor."), icon, 1000); 143 | } 144 | } 145 | else 146 | { 147 | ayarlar->close(); 148 | } 149 | } 150 | 151 | void MainWindow::procStart() 152 | { 153 | //proc->setArguments(prepareParameters(ui->comboParametre->isEnabled())); 154 | //ui->debugArea->appendPlainText("\"" + QDir::currentPath() + QString("/goodbyedpi/goodbyedpi.exe\"") + " " +prepareParameters(ui->comboParametre->isEnabled()).join(" ")); 155 | //It's only way GoodbyeDPI works, because no matter what I try, It crashes with different arguments except "-1" If I use argument list method like start(program, arglist, mode) 156 | //I have to add manual "(quotes) for PATHs that contains space, because It start function tries to execute it like command prompt and you can't use space char at command prompt. 157 | 158 | 159 | if(info->productVersion() != "7") 160 | { 161 | proc->start("\"" + QDir::currentPath() + QString("/goodbyedpi/goodbyedpi.exe\"") + " " +prepareParameters(ui->comboParametre->isEnabled()).join(" "), QProcess::ReadOnly); 162 | 163 | } 164 | else { 165 | proc->setArguments(prepareParameters(ui->comboParametre->isEnabled())); 166 | proc->setProgram(QDir::currentPath() + QString("/goodbyedpi/goodbyedpi.exe")); 167 | proc->start(QProcess::ReadOnly); 168 | } 169 | 170 | proc->waitForStarted(1000); 171 | 172 | if(!settings->value("System/disableNotifications").toBool() && !this->isVisible()) 173 | { 174 | qDebug() << "Message will shown"; 175 | QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::MessageIcon(QSystemTrayIcon::Information); 176 | trayIcon->showMessage("GoodByeDPI GUI", tr("Başlatıldı."), icon, 1000); 177 | } 178 | } 179 | 180 | void MainWindow::procStop() 181 | { 182 | proc->close(); 183 | proc->waitForFinished(2000); 184 | QProcess::execute(":/service_remove.cmd"); 185 | } 186 | 187 | void MainWindow::processOutput() 188 | { 189 | proc->setReadChannel(QProcess::StandardOutput); 190 | QString output = proc->readAllStandardOutput(); 191 | 192 | if(!output.isEmpty()) 193 | { 194 | QString prettyOutput = QString::fromStdString(output.toStdString()); 195 | prettyOutput.replace(",", "\n"); 196 | ui->debugArea->appendPlainText(prettyOutput); 197 | } 198 | } 199 | 200 | void MainWindow::processError() 201 | { 202 | proc->setReadChannel(QProcess::StandardError); 203 | QString errout = proc->readAllStandardError(); 204 | if(!errout.isEmpty()) 205 | { 206 | ui->debugArea->appendPlainText(proc->errorString()); 207 | } 208 | } 209 | void MainWindow::handleState() 210 | { 211 | if(proc->state() == QProcess::NotRunning) 212 | { 213 | ui->debugArea->appendPlainText(tr("[-] Durduruldu")); 214 | ui->btnStart->setEnabled(true); 215 | ui->btnStop->setEnabled(false); 216 | trayMenu->actions().at(1)->setEnabled(false); 217 | trayMenu->actions().at(0)->setEnabled(true); 218 | } 219 | else if(proc->state() == QProcess::Running) 220 | { 221 | ui->debugArea->appendPlainText(tr("[+] Başlatıldı\n[+] PID:") + QString::number(proc->processId()) + "\n"); 222 | ui->btnStart->setEnabled(false); 223 | ui->btnStop->setEnabled(true); 224 | trayMenu->actions().at(0)->setEnabled(false); 225 | trayMenu->actions().at(1)->setEnabled(true); 226 | } 227 | } 228 | 229 | void MainWindow::onActionAyarlar() 230 | { 231 | ayarlar->show(); 232 | } 233 | 234 | void MainWindow::onActionAbout() 235 | { 236 | hakkinda.exec(); 237 | } 238 | 239 | void MainWindow::onDefaultParamCheckState(Qt::CheckState state) 240 | { 241 | if(state == Qt::Checked) 242 | { 243 | ui->comboParametre->setEnabled(true); 244 | prepareParameters(true); 245 | } 246 | else 247 | { 248 | ui->comboParametre->setEnabled(false); 249 | prepareParameters(false); 250 | } 251 | 252 | } 253 | 254 | QStringList MainWindow::prepareParameters(bool isComboParametreEnabled) 255 | { 256 | QStringList defaultparameters; 257 | QStringList customParameters; 258 | QStringList quickParameters; 259 | QStringList param2Box; 260 | QStringList param1Box; 261 | 262 | //PARAMBOX1 263 | if(settings->value("Parametre/paramP").toBool()) 264 | param1Box << "-p"; 265 | if(settings->value("Parametre/paramR").toBool()) 266 | param1Box << "-r"; 267 | if(settings->value("Parametre/paramS").toBool()) 268 | param1Box << "-s"; 269 | if(settings->value("Parametre/paramM").toBool()) 270 | param1Box << "-m"; 271 | if(settings->value("Parametre/paramF").toString() != "false") 272 | param1Box << settings->value("Parametre/paramF").toString(); 273 | if(settings->value("Parametre/paramK").toString() != "false") 274 | param1Box << settings->value("Parametre/paramK").toString(); 275 | if(settings->value("Parametre/paramN").toBool()) 276 | param1Box << "-n"; 277 | if(settings->value("Parametre/paramE").toString() != "false") 278 | param1Box << settings->value("Parametre/paramE").toString(); 279 | if(settings->value("Parametre/paramA").toBool()) 280 | param1Box << "-a"; 281 | if(settings->value("Parametre/paramW").toBool()) 282 | param1Box << "-w"; 283 | if(settings->value("Parametre/paramPort").toString() != "false") 284 | param1Box << settings->value("Parametre/paramPort").toString(); 285 | if(settings->value("Parametre/paramIpId").toString() != "false") 286 | param1Box << settings->value("Parametre/paramIpId").toString(); 287 | 288 | //PARAMBOX2 289 | if(settings->value("Parametre/paramDnsAddr").toString() != "false") 290 | param2Box << settings->value("Parametre/paramDnsAddr").toString(); 291 | if(settings->value("Parametre/paramDnsPort").toString() != "false") 292 | param2Box << settings->value("Parametre/paramDnsPort").toString(); 293 | if(settings->value("Parametre/paramDnsPort").toString() != "false") 294 | param2Box << settings->value("Parametre/paramDnsPort").toString(); 295 | if(settings->value("Parametre/paramDnsv6Addr").toString() != "false") 296 | param2Box << settings->value("Parametre/paramDnsv6Addr").toString(); 297 | if(settings->value("Parametre/paramDnsv6Port").toString() != "false") 298 | param2Box << settings->value("Parametre/paramDnsv6Port").toString(); 299 | if(settings->value("Parametre/paramBlacklist").toString() != "false") 300 | param2Box << "--blacklist blacklist.txt"; 301 | 302 | //QUICKSETTINGS 303 | if(settings->value("Parametre/paramQuick").toString() == "-1") 304 | quickParameters << "-p -r -s -f 2 -k 2 -n -e 2" << param2Box; 305 | if(settings->value("Parametre/paramQuick").toString() == "-2") 306 | quickParameters << "-p -r -s -f 2 -k 2 -n -e 40" << param2Box; 307 | else if(settings->value("Parametre/paramQuick").toString() == "-3") 308 | quickParameters << "-p -r -s -e 40" << param2Box; 309 | else if(settings->value("Parametre/paramQuick").toString() == "-4") 310 | quickParameters << "-p -r -s" << param2Box; 311 | 312 | //DEFAULTPARAMETERS 313 | switch (ui->comboParametre->currentIndex()) { 314 | case 0: 315 | defaultparameters << "-1 --blacklist blacklist.txt"; 316 | break; 317 | case 1: 318 | defaultparameters << "-1 --dns-addr 1.1.1.1 --dns-port 1253 --blacklist blacklist.txt"; 319 | break; 320 | case 2: 321 | defaultparameters << "-1"; 322 | break; 323 | case 3: 324 | defaultparameters << "-1 --dns-addr 1.1.1.1 --dns-port 1253"; 325 | break; 326 | case 4: 327 | defaultparameters << "-1 -a -m --dns-addr 1.1.1.1 --dns-port 1253"; 328 | } 329 | 330 | //CUSTOMPARAMETERS 331 | customParameters << param1Box << param2Box; 332 | 333 | //UPDATE Parameter Label 334 | if(isComboParametreEnabled) 335 | { 336 | ui->labelParameters->setText("goodbyedpi.exe " + defaultparameters.join(" ")); 337 | return defaultparameters; 338 | } 339 | else if(settings->value("Parametre/customParam").toString() == "true" && settings->value("Parametre/quickSettings").toString() == "false") 340 | { 341 | ui->labelParameters->setText("goodbyedpi.exe " + customParameters.join(" ")); 342 | return customParameters; 343 | } 344 | else if(settings->value("Parametre/customParam").toString() == "false" && settings->value("Parametre/quickSettings").toString() == "false") 345 | { 346 | ui->labelParameters->setText("goodbyedpi.exe"); 347 | return QStringList(); 348 | } 349 | else if(settings->value("Parametre/customParam").toString() == "true" && settings->value("Parametre/quickSettings").toString() == "true") 350 | { 351 | ui->labelParameters->setText("goodbyedpi.exe" + quickParameters.join(" ")); 352 | return QStringList(); 353 | } 354 | else 355 | { 356 | ui->labelParameters->setText("goodbyedpi.exe " + quickParameters.join(" ")); 357 | return quickParameters; 358 | } 359 | 360 | } 361 | 362 | void MainWindow::catchError(QProcess::ProcessError err) 363 | { 364 | ui->debugArea->appendPlainText(proc->errorString()); 365 | } 366 | -------------------------------------------------------------------------------- /src/mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include "settings.h" 12 | #include "about.h" 13 | 14 | namespace Ui { 15 | class MainWindow; 16 | } 17 | 18 | class MainWindow : public QMainWindow 19 | { 20 | Q_OBJECT 21 | 22 | public: 23 | explicit MainWindow(QStringList, QWidget *parent = 0); 24 | ~MainWindow(); 25 | 26 | protected: 27 | void closeEvent(QCloseEvent *event) override; 28 | 29 | public slots: 30 | void procStart(); 31 | void procStop(); 32 | 33 | void processOutput(); 34 | void processError(); 35 | void handleState(); 36 | 37 | void onActionAyarlar(); 38 | void onActionAbout(); 39 | 40 | void onDefaultParamCheckState(Qt::CheckState state); 41 | 42 | QStringList prepareParameters(bool isComboParametreEnabled); 43 | 44 | void catchError(QProcess::ProcessError err); 45 | 46 | private: 47 | Ui::MainWindow *ui; 48 | 49 | QSysInfo *info; 50 | QTemporaryDir *tmpDir; 51 | QSettings *settings; 52 | 53 | QSystemTrayIcon *trayIcon; 54 | QMenu *trayMenu; 55 | 56 | QAction *hideAction; 57 | QAction *showAction; 58 | QAction *closeAction; 59 | QAction *startAction; 60 | QAction *stopAction; 61 | QAction *settingsAction; 62 | 63 | QProcess *proc; 64 | 65 | QStringList args; 66 | 67 | Settings *ayarlar; 68 | About hakkinda; 69 | 70 | enum ParameterList{ 71 | russia_blacklist, 72 | russia_blacklist_dnsredir, 73 | all, 74 | all_dnsredir, 75 | all_dnsredir_hardcore 76 | }; 77 | }; 78 | 79 | #endif // MAINWINDOW_H 80 | -------------------------------------------------------------------------------- /src/mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 395 10 | 500 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Başlat 24 | 25 | 26 | 27 | 28 | 29 | 30 | Durdur 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | Parametre Listesi 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | Qt::PlainText 52 | 53 | 54 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | Log 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | false 78 | 79 | 80 | Qt::ToolButtonTextBesideIcon 81 | 82 | 83 | TopToolBarArea 84 | 85 | 86 | false 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | :/images/images/settings-gears-button.png 95 | 96 | 97 | 98 | Ayarlar 99 | 100 | 101 | true 102 | 103 | 104 | 105 | 106 | 107 | :/images/images/info-button.png 108 | 109 | 110 | 111 | Hakkında 112 | 113 | 114 | Hakkında 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /src/res.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | lang_ko.qm 4 | lang_en.qm 5 | 6 | 7 | images/info-button.png 8 | images/play-button.png 9 | images/settings-gears-button.png 10 | images/stop-button.png 11 | images/icon.ico 12 | images/icon.png 13 | 14 | 15 | service_remove.cmd 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/service_remove.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | echo This script should be run with administrator privileges. 3 | echo Right click - run as administrator. 4 | echo Press any key if you're running it as administrator. 5 | pause 6 | sc stop "GoodbyeDPI" 7 | sc delete "GoodbyeDPI" 8 | sc stop "WinDivert1.4" 9 | sc delete "WinDivert1.4" 10 | -------------------------------------------------------------------------------- /src/settings.cpp: -------------------------------------------------------------------------------- 1 | #include "settings.h" 2 | #include "ui_settings.h" 3 | 4 | #include 5 | 6 | Settings::Settings(QWidget *parent) : 7 | QWidget(parent), 8 | ui(new Ui::Settings), 9 | ayarR(new QSettings("HexOpenSource", "GBDPI-GUI")), 10 | spinFValue(0), 11 | spinKValue(0), 12 | spinEValue(0), 13 | spinPortValue(0), 14 | lineIpIdValue(""), 15 | lineDnsAddrValue("208.67.220.220"), 16 | spinDnsPortValue(1253), 17 | lineDnsv6AddrValue("2a02:6b8::feed:0ff"), 18 | spinDnsv6PortValue(1253) 19 | { 20 | ui->setupUi(this); 21 | setWindowFlags(Qt::MSWindowsFixedSizeDialogHint); 22 | setWindowIcon(QIcon(":/images/images/settings-gears-button.png")); 23 | setWindowTitle("Ayarlar"); 24 | 25 | //Reference to QSettings for capturing it from lambda function 26 | auto& ayar = ayarR; 27 | 28 | ui->radioQuick1->setChecked(true); 29 | 30 | //Determine if its first run then create or not registry settings 31 | //TODO: Inherit from QSettings and make efficient save/restore/load mechanism. 32 | if(!ayarR->contains("Parametre/defaultParam")) 33 | { 34 | resetSettings(); 35 | } 36 | 37 | //SIGNAL&SLOTS for parameters and inputs change 38 | // TODO: Turn all Checkbox::stateChanged signals to CheckBox::stateChanged 39 | connect(ui->checkDefaultParam, &QCheckBox::stateChanged, this, &Settings::onCheckedDefaultParam); 40 | connect(ui->checkCustomParam, &QCheckBox::stateChanged, this, &Settings::onCheckedCustomParam); 41 | connect(ui->checkQuickSettings, &QCheckBox::stateChanged, this, &Settings::onCheckedQuickSettings); 42 | 43 | connect(ui->spinF, static_cast(&QSpinBox::valueChanged), [this, ayar](){ 44 | if(ui->checkF->checkState() == Qt::Checked){ 45 | spinFValue = ui->spinF->value(); 46 | ayar->setValue("Parametre/paramF", "-f " + QString::number(spinFValue)); 47 | } 48 | }); 49 | connect(ui->spinK, static_cast(&QSpinBox::valueChanged), [this, ayar](){ 50 | if(ui->checkK->checkState() == Qt::Checked){ 51 | spinKValue = ui->spinK->value(); 52 | ayar->setValue("Parametre/paramK", "-k " + QString::number(spinKValue)); 53 | } 54 | }); 55 | connect(ui->spinE, static_cast(&QSpinBox::valueChanged), [this, ayar](){ 56 | if(ui->checkE->checkState() == Qt::Checked){ 57 | spinEValue = ui->spinE->value(); 58 | ayar->setValue("Parametre/paramE", "-e " + QString::number(spinEValue)); 59 | } 60 | }); 61 | connect(ui->spinPort, static_cast(&QSpinBox::valueChanged), [this, ayar](){ 62 | if(ui->checkPort->checkState() == Qt::Checked) 63 | { 64 | spinPortValue = ui->spinPort->value(); 65 | ayar->setValue("Parametre/paramPort", "--port " + QString::number(spinPortValue)); 66 | } 67 | }); 68 | connect(ui->spinDnsPort, static_cast(&QSpinBox::valueChanged), [this, ayar](){ 69 | if(ui->checkDnsPort->checkState() == Qt::Checked) 70 | { 71 | spinDnsPortValue = ui->spinDnsPort->value(); 72 | ayar->setValue("Parametre/paramDnsPort", "--dns-port " + QString::number(spinDnsPortValue)); 73 | } 74 | }); 75 | connect(ui->spinDnsv6Port, static_cast(&QSpinBox::valueChanged), [this, ayar](){ 76 | if(ui->checkDnsv6Port->checkState() == Qt::Checked) 77 | { 78 | spinDnsv6PortValue = ui->spinDnsv6Port->value(); 79 | ayar->setValue("Parametre/paramDnsv6Port", "--dnsv6-port " + QString::number(spinDnsv6PortValue)); 80 | } 81 | }); 82 | 83 | connect(ui->lineIpId, &QLineEdit::textChanged, [this, ayar](){ 84 | if(ui->checkIpId->checkState() == Qt::Checked) 85 | { 86 | lineIpIdValue = ui->lineIpId->text(); 87 | ayar->setValue("Parametre/paramIpId", "--ip-id " + lineIpIdValue); 88 | } 89 | }); 90 | connect(ui->lineDnsAddr, &QLineEdit::textChanged, [this, ayar](){ 91 | if(ui->checkDnsAddr->checkState() == Qt::Checked) 92 | { 93 | lineDnsAddrValue = ui->lineDnsAddr->text(); 94 | ayar->setValue("Parametre/paramDnsAddr", "--dns-addr " + lineDnsAddrValue); 95 | } 96 | }); 97 | connect(ui->lineDnsv6Addr, &QLineEdit::textChanged, [this, ayar](){ 98 | if(ui->checkDnsv6Addr->checkState() == Qt::Checked) 99 | { 100 | lineDnsv6AddrValue = ui->lineDnsv6Addr->text(); 101 | //qDebug() << "1: " + lineDnsv6AddrValue; 102 | ayar->setValue("Parametre/paramDnsv6Addr", "--dnsv6-addr " + lineDnsv6AddrValue); 103 | } 104 | }); 105 | 106 | connect(ui->checkP, &QCheckBox::stateChanged, this, &Settings::onCheckedP); 107 | connect(ui->checkR, &QCheckBox::stateChanged, this, &Settings::onCheckedR); 108 | connect(ui->checkS, &QCheckBox::stateChanged, this, &Settings::onCheckedS); 109 | connect(ui->checkM, &QCheckBox::stateChanged, this, &Settings::onCheckedM); 110 | connect(ui->checkF, &QCheckBox::stateChanged, this, &Settings::onCheckedF); 111 | connect(ui->checkK, &QCheckBox::stateChanged, this, &Settings::onCheckedK); 112 | connect(ui->checkN, &QCheckBox::stateChanged, this, &Settings::onCheckedN); 113 | connect(ui->checkE, &QCheckBox::stateChanged, this, &Settings::onCheckedE); 114 | connect(ui->checkA, &QCheckBox::stateChanged, this, &Settings::onCheckedA); 115 | connect(ui->checkW, &QCheckBox::stateChanged, this, &Settings::onCheckedW); 116 | connect(ui->checkPort, &QCheckBox::stateChanged, this, &Settings::onCheckedPort); 117 | connect(ui->checkIpId, &QCheckBox::stateChanged, this, &Settings::onCheckedIpId); 118 | connect(ui->checkDnsAddr, &QCheckBox::stateChanged, this, &Settings::onCheckedDnsAddr); 119 | connect(ui->checkDnsPort, &QCheckBox::stateChanged, this, &Settings::onCheckedDnsPort); 120 | connect(ui->checkDnsv6Addr, &QCheckBox::stateChanged, this, &Settings::onCheckedDnsv6Addr); 121 | connect(ui->checkDnsv6Port, &QCheckBox::stateChanged, this, &Settings::onCheckedDnsv6Port); 122 | 123 | connect(ui->radioQuick1, &QRadioButton::clicked, this, &Settings::onCheckedRadioQuick1); 124 | connect(ui->radioQuick2, &QRadioButton::clicked, this, &Settings::onCheckedRadioQuick2); 125 | connect(ui->radioQuick3, &QRadioButton::clicked, this, &Settings::onCheckedRadioQuick3); 126 | connect(ui->radioQuick4, &QRadioButton::clicked, this, &Settings::onCheckedRadioQuick4); 127 | 128 | connect(ui->startupBox, &QCheckBox::stateChanged, this, &Settings::onCheckedStartup); 129 | connect(ui->trayBox, &QCheckBox::stateChanged, this, &Settings::onCheckedSystemTray); 130 | connect(ui->notificationBox, &QCheckBox::stateChanged, this, &Settings::onCheckedNotification); 131 | 132 | loadSettings(); 133 | } 134 | 135 | Settings::~Settings() 136 | { 137 | delete ui; 138 | } 139 | 140 | void Settings::closeEvent(QCloseEvent *event) 141 | { 142 | if(this->isVisible() || this->isTopLevel()) 143 | { 144 | event->ignore(); 145 | this->hide(); 146 | } 147 | else 148 | { 149 | } 150 | 151 | emit defaultParamStateChanged(ui->checkDefaultParam->checkState()); 152 | } 153 | 154 | void Settings::onCheckedDefaultParam() 155 | { 156 | if(ui->checkDefaultParam->checkState() == Qt::Checked) 157 | { 158 | ui->paramBox->setEnabled(false); 159 | ui->checkCustomParam->setCheckState(Qt::Unchecked); 160 | ayarR->setValue("Parametre/defaultParam", true); 161 | ayarR->setValue("Parametre/customParam", false); 162 | ayarR->setValue("Parametre/quickSettings", false); 163 | } 164 | else 165 | { 166 | 167 | } 168 | //Capturing change from MainWindow, Thus we can control ComboBox for Parameter List. 169 | emit defaultParamStateChanged(ui->checkDefaultParam->checkState()); 170 | } 171 | 172 | void Settings::onCheckedCustomParam() 173 | { 174 | if(ui->checkCustomParam->checkState() == Qt::Checked) 175 | { 176 | ui->checkDefaultParam->setChecked(Qt::Unchecked); 177 | ui->paramBox->setEnabled(true); 178 | ayarR->setValue("Parametre/customParam", true); 179 | if(ayarR->value("Parametre/quickSettings").toBool()){ 180 | ui->groupQuickSettings->setEnabled(true); 181 | } 182 | else 183 | { 184 | ui->groupQuickSettings->setEnabled(false); 185 | } 186 | ayarR->setValue("Parametre/defaultParam", false); 187 | } 188 | else 189 | { 190 | ui->paramBox->setEnabled(false); 191 | ayarR->setValue("Parametre/customParam", false); 192 | } 193 | emit defaultParamStateChanged(ui->checkDefaultParam->checkState()); 194 | } 195 | 196 | void Settings::onCheckedSystemTray() 197 | { 198 | if(ui->trayBox->checkState() == Qt::Checked) 199 | { 200 | ayarR->setValue("System/systemTray", true); 201 | } 202 | else 203 | { 204 | ayarR->setValue("System/systemTray", false); 205 | } 206 | } 207 | 208 | void Settings::onCheckedStartup() 209 | { 210 | QSettings startup("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings::NativeFormat); 211 | if(ui->startupBox->checkState() == Qt::Checked) 212 | { 213 | QString appPath = QCoreApplication::applicationFilePath(); 214 | appPath.replace("/", "\\"); 215 | startup.setValue("GuiForGoodByeDPI", QString(appPath + " -silent").toStdString().c_str()); 216 | ayarR->setValue("System/systemTray", true); 217 | } 218 | else 219 | { 220 | startup.remove("GuiForGoodByeDPI"); 221 | ayarR->setValue("System/systemTray", false); 222 | } 223 | } 224 | 225 | void Settings::onCheckedSchedule() 226 | { 227 | if(ui->scheduleBox->checkState() == Qt::Checked) 228 | { 229 | ayarR->setValue("System/systemSchedule", true); 230 | ayarR->setValue("System/systemScheduleStart", true); 231 | ayarR->setValue("System/systemScheduleEnd", true); 232 | ayarR->setValue("System/systemScheduleDays", true); 233 | } 234 | else 235 | { 236 | ayarR->setValue("System/systemSchedule", false); 237 | } 238 | } 239 | 240 | void Settings::onCheckedNotification() 241 | { 242 | if(ui->notificationBox->checkState() == Qt::Checked) 243 | { 244 | ayarR->setValue("System/disableNotifications", true); 245 | } 246 | else 247 | { 248 | ayarR->setValue("System/disableNotifications", false); 249 | } 250 | } 251 | 252 | void Settings::onCheckedQuickSettings() 253 | { 254 | if(ui->checkQuickSettings->checkState() == Qt::Checked) 255 | { 256 | ui->groupQuickSettings->setEnabled(true); 257 | ui->param1->setEnabled(false); 258 | ayarR->setValue("Parametre/quickSettings", true); 259 | ayarR->setValue("Parametre/customParam", true); 260 | ayarR->setValue("Parametre/defaultParam", false); 261 | 262 | if(ayarR->value("Parametre/paramQuick").toString() == "-1") 263 | ui->radioQuick1->setChecked(true); 264 | if(ayarR->value("Parametre/paramQuick").toString() == "-2") 265 | ui->radioQuick2->setChecked(true); 266 | if(ayarR->value("Parametre/paramQuick").toString() == "-3") 267 | ui->radioQuick3->setChecked(true); 268 | if(ayarR->value("Parametre/paramQuick").toString() == "-4") 269 | ui->radioQuick4->setChecked(true); 270 | } 271 | else 272 | { 273 | ui->groupQuickSettings->setEnabled(false); 274 | ui->param1->setEnabled(true); 275 | ayarR->setValue("Parametre/quickSettings", false); 276 | } 277 | emit defaultParamStateChanged(ui->checkDefaultParam->checkState()); 278 | } 279 | 280 | void Settings::onCheckedP() 281 | { 282 | if(ui->checkP->checkState() == Qt::Checked) 283 | { 284 | ayarR->setValue("Parametre/paramP", true); 285 | } 286 | else 287 | { 288 | ayarR->setValue("Parametre/paramP", false); 289 | } 290 | } 291 | 292 | void Settings::onCheckedR() 293 | { 294 | if(ui->checkR->checkState() == Qt::Checked) 295 | { 296 | ayarR->setValue("Parametre/paramR", true); 297 | } 298 | else 299 | { 300 | ayarR->setValue("Parametre/paramR", false); 301 | } 302 | } 303 | 304 | void Settings::onCheckedS() 305 | { 306 | if(ui->checkS->checkState() == Qt::Checked) 307 | { 308 | ayarR->setValue("Parametre/paramS", true); 309 | } 310 | else 311 | { 312 | ayarR->setValue("Parametre/paramS", false); 313 | } 314 | } 315 | 316 | void Settings::onCheckedM() 317 | { 318 | if(ui->checkM->checkState() == Qt::Checked) 319 | { 320 | ayarR->setValue("Parametre/paramM", true); 321 | } 322 | else 323 | { 324 | ayarR->setValue("Parametre/paramM", false); 325 | } 326 | } 327 | 328 | void Settings::onCheckedF() 329 | { 330 | if(ui->checkF->checkState() == Qt::Checked) 331 | { 332 | ayarR->setValue("Parametre/paramF", "-f " + QString::number(spinFValue)); 333 | } 334 | else 335 | { 336 | ayarR->setValue("Parametre/paramF", false); 337 | } 338 | } 339 | 340 | void Settings::onCheckedK() 341 | { 342 | if(ui->checkK->checkState() == Qt::Checked) 343 | { 344 | ayarR->setValue("Parametre/paramK", "-k " + QString::number(spinKValue)); 345 | } 346 | else 347 | { 348 | ayarR->setValue("Parametre/paramK", false); 349 | } 350 | } 351 | 352 | void Settings::onCheckedN() 353 | { 354 | if(ui->checkN->checkState() == Qt::Checked) 355 | { 356 | ayarR->setValue("Parametre/paramN", true); 357 | } 358 | else 359 | { 360 | ayarR->setValue("Parametre/paramN", false); 361 | } 362 | } 363 | 364 | void Settings::onCheckedE() 365 | { 366 | if(ui->checkE->checkState() == Qt::Checked) 367 | { 368 | ayarR->setValue("Parametre/paramE", "-e " + QString::number(spinEValue)); 369 | } 370 | else 371 | { 372 | ayarR->setValue("Parametre/paramE", false); 373 | } 374 | } 375 | 376 | void Settings::onCheckedA() 377 | { 378 | if(ui->checkA->checkState() == Qt::Checked) 379 | { 380 | ayarR->setValue("Parametre/paramA", true); 381 | } 382 | else 383 | { 384 | ayarR->setValue("Parametre/paramA", false); 385 | } 386 | } 387 | 388 | void Settings::onCheckedW() 389 | { 390 | if(ui->checkW->checkState() == Qt::Checked) 391 | { 392 | ayarR->setValue("Parametre/paramW", true); 393 | } 394 | else 395 | { 396 | ayarR->setValue("Parametre/paramW", false); 397 | } 398 | } 399 | 400 | void Settings::onCheckedPort() 401 | { 402 | if(ui->checkPort->checkState() == Qt::Checked) 403 | { 404 | ayarR->setValue("Parametre/paramPort", "--port " + QString::number(spinPortValue)); 405 | } 406 | else 407 | { 408 | ayarR->setValue("Parametre/paramPort", false); 409 | } 410 | } 411 | 412 | void Settings::onCheckedIpId() 413 | { 414 | if(ui->checkIpId->checkState() == Qt::Checked) 415 | { 416 | ayarR->setValue("Parametre/paramIpId", "--ip-id " + lineIpIdValue); 417 | } 418 | else 419 | { 420 | ayarR->setValue("Parametre/paramIpId", false); 421 | } 422 | } 423 | 424 | void Settings::onCheckedDnsAddr() 425 | { 426 | if(ui->checkDnsAddr->checkState() == Qt::Checked) 427 | { 428 | ayarR->setValue("Parametre/paramDnsAddr", "--dns-addr " + lineDnsAddrValue); 429 | } 430 | else 431 | { 432 | ayarR->setValue("Parametre/paramDnsAddr", false); 433 | } 434 | } 435 | 436 | void Settings::onCheckedDnsPort() 437 | { 438 | if(ui->checkDnsPort->checkState() == Qt::Checked) 439 | { 440 | ayarR->setValue("Parametre/paramDnsPort", "--dns-port " + QString::number(spinDnsPortValue)); 441 | } 442 | else 443 | { 444 | ayarR->setValue("Parametre/paramDnsPort", false); 445 | } 446 | } 447 | 448 | void Settings::onCheckedDnsv6Addr() 449 | { 450 | if(ui->checkDnsv6Addr->checkState() == Qt::Checked) 451 | { 452 | ayarR->setValue("Parametre/paramDnsv6Addr", "--dnsv6-addr " + lineDnsv6AddrValue); 453 | } 454 | else 455 | { 456 | ayarR->setValue("Parametre/paramDnsv6Addr", false); 457 | } 458 | } 459 | 460 | void Settings::onCheckedDnsv6Port() 461 | { 462 | if(ui->checkDnsv6Port->checkState() == Qt::Checked) 463 | { 464 | ayarR->setValue("Parametre/paramDnsv6Port", "--dnsv6-port " + QString::number(spinDnsv6PortValue)); 465 | } 466 | else 467 | { 468 | ayarR->setValue("Parametre/paramDnsv6Port", false); 469 | } 470 | } 471 | 472 | void Settings::onCheckedBlacklist() 473 | { 474 | if(ui->checkBlacklist->checkState() == Qt::Checked) 475 | { 476 | ayarR->setValue("Parametre/paramBlacklist", true); 477 | } 478 | else 479 | { 480 | ayarR->setValue("Parametre/paramBlacklist", false); 481 | } 482 | } 483 | 484 | void Settings::onCheckedRadioQuick1() 485 | { 486 | ayarR->setValue("Parametre/paramQuick", "-1"); 487 | } 488 | 489 | void Settings::onCheckedRadioQuick2() 490 | { 491 | ayarR->setValue("Parametre/paramQuick", "-2"); 492 | } 493 | 494 | void Settings::onCheckedRadioQuick3() 495 | { 496 | ayarR->setValue("Parametre/paramQuick", "-3"); 497 | } 498 | 499 | void Settings::onCheckedRadioQuick4() 500 | { 501 | ayarR->setValue("Parametre/paramQuick", "-4"); 502 | } 503 | 504 | void Settings::resetSettings() 505 | { 506 | ayarR->clear(); 507 | 508 | ayarR->beginGroup("Parametre"); 509 | ayarR->setValue("defaultParam", true); 510 | ayarR->setValue("customParam", false); 511 | ayarR->setValue("quickSettings", false); 512 | ayarR->setValue("paramP", false); 513 | ayarR->setValue("paramR", false); 514 | ayarR->setValue("paramS", false); 515 | ayarR->setValue("paramF", false); 516 | ayarR->setValue("paramK", false); 517 | ayarR->setValue("paramN", false); 518 | ayarR->setValue("paramE", false); 519 | ayarR->setValue("paramA", false); 520 | ayarR->setValue("paramW", false); 521 | ayarR->setValue("paramPort", false); 522 | ayarR->setValue("paramIpId", false); 523 | ayarR->setValue("paramDnsAddr", false); 524 | ayarR->setValue("paramDnsPort", false); 525 | ayarR->setValue("paramDnsv6Addr", false); 526 | ayarR->setValue("paramDnsv6Port", false); 527 | ayarR->setValue("paramBlacklist", false); 528 | ayarR->setValue("paramQuick", false); 529 | ayarR->endGroup(); 530 | 531 | ayarR->beginGroup("System"); 532 | ayarR->setValue("systemTray", true); 533 | ayarR->setValue("systemStartup", false); 534 | ayarR->setValue("systemSchedule", false); 535 | ayarR->setValue("disableNotifications", false); 536 | ayarR->endGroup(); 537 | } 538 | 539 | /** 540 | * @brief Settings::loadSettings 541 | * 542 | * I aggree with you It's not efficient. 543 | * It's highest priority for me to make it more efficient. 544 | * I don't like hard coded things either :) 545 | * 546 | */ 547 | void Settings::loadSettings() 548 | { 549 | //ayarR->beginGroup("Parametre"); 550 | if(ayarR->value("Parametre/defaultParam").toBool()) 551 | { 552 | ui->checkDefaultParam->setChecked(true); 553 | ui->paramBox->setEnabled(false); 554 | } 555 | else 556 | { 557 | ui->checkDefaultParam->setChecked(false); 558 | } 559 | 560 | if(ayarR->value("Parametre/customParam").toBool()) 561 | { 562 | ui->checkCustomParam->setChecked(true); 563 | ui->paramBox->setEnabled(true); 564 | if(ayarR->value("Parametre/quickSettings").toBool()) 565 | { 566 | ui->checkQuickSettings->setEnabled(true); 567 | ui->param1->setEnabled(false); 568 | } 569 | } 570 | else 571 | { 572 | ui->checkCustomParam->setChecked(false); 573 | ui->paramBox->setEnabled(false); 574 | } 575 | 576 | if(ayarR->value("Parametre/quickSettings").toBool()) 577 | { 578 | ui->checkQuickSettings->setChecked(true); 579 | ui->groupQuickSettings->setEnabled(true); 580 | ui->param1->setEnabled(false); 581 | } 582 | else 583 | { 584 | ui->checkQuickSettings->setChecked(false); 585 | ui->param1->setEnabled(true); 586 | ui->groupQuickSettings->setEnabled(false); 587 | } 588 | 589 | if(ayarR->value("Parametre/paramQuick").toString() != "false") 590 | { 591 | if(ayarR->value("Parametre/paramQuick").toString() == "-1") 592 | ui->radioQuick1->setChecked(true); 593 | else if(ayarR->value("Parametre/paramQuick").toString() == "-2") 594 | ui->radioQuick2->setChecked(true); 595 | else if(ayarR->value("Parametre/paramQuick").toString() == "-3") 596 | ui->radioQuick3->setChecked(true); 597 | else if(ayarR->value("Parametre/paramQuick").toString() == "-4") 598 | ui->radioQuick4->setChecked(true); 599 | 600 | } 601 | 602 | if(ayarR->value("Parametre/paramP").toBool()) 603 | { 604 | ui->checkP->setChecked(true); 605 | } 606 | else 607 | { 608 | ui->checkP->setChecked(false); 609 | } 610 | 611 | if(ayarR->value("Parametre/paramR").toBool()) 612 | { 613 | ui->checkR->setChecked(true); 614 | } 615 | else 616 | { 617 | ui->checkR->setChecked(false); 618 | } 619 | 620 | if(ayarR->value("Parametre/paramS").toBool()) 621 | { 622 | ui->checkS->setChecked(true); 623 | } 624 | else 625 | { 626 | ui->checkS->setChecked(false); 627 | } 628 | 629 | if(ayarR->value("Parametre/paramM").toBool()) 630 | { 631 | ui->checkM->setChecked(true); 632 | } 633 | else 634 | { 635 | ui->checkM->setChecked(false); 636 | } 637 | 638 | if(ayarR->value("Parametre/paramF").toString() != "false") 639 | { 640 | ui->checkF->setChecked(true); 641 | QString tmp = ayarR->value("Parametre/paramF").toString(); 642 | QStringList list = tmp.split(" "); 643 | 644 | ui->spinF->setValue(list.at(1).toInt()); 645 | spinFValue = list.at(1).toInt(); 646 | } 647 | else 648 | { 649 | ui->checkF->setChecked(false); 650 | } 651 | 652 | if(ayarR->value("Parametre/paramK").toString() != "false") 653 | { 654 | ui->checkK->setChecked(true); 655 | QString tmp = ayarR->value("Parametre/paramK").toString(); 656 | QStringList list = tmp.split(" "); 657 | 658 | ui->spinK->setValue(list.at(1).toInt()); 659 | spinKValue = list.at(1).toInt(); 660 | } 661 | else 662 | { 663 | ui->checkF->setChecked(false); 664 | } 665 | 666 | if(ayarR->value("Parametre/paramN").toBool()) 667 | { 668 | ui->checkN->setChecked(true); 669 | } 670 | else 671 | { 672 | ui->checkN->setChecked(false); 673 | } 674 | 675 | if(ayarR->value("Parametre/paramE").toString() != "false") 676 | { 677 | ui->checkE->setChecked(true); 678 | QString tmp = ayarR->value("Parametre/paramE").toString(); 679 | QStringList list = tmp.split(" "); 680 | 681 | ui->spinE->setValue(list.at(1).toInt()); 682 | spinEValue = list.at(1).toInt(); 683 | } 684 | else 685 | { 686 | ui->checkE->setChecked(false); 687 | } 688 | 689 | if(ayarR->value("Parametre/paramA").toBool()) 690 | { 691 | ui->checkA->setChecked(true); 692 | } 693 | else 694 | { 695 | ui->checkA->setChecked(false); 696 | } 697 | 698 | if(ayarR->value("Parametre/paramW").toBool()) 699 | { 700 | ui->checkW->setChecked(true); 701 | } 702 | else 703 | { 704 | ui->checkW->setChecked(false); 705 | } 706 | 707 | if(ayarR->value("Parametre/paramPort").toString() != "false") 708 | { 709 | ui->checkPort->setChecked(true); 710 | QString tmp = ayarR->value("Parametre/paramPort").toString(); 711 | QStringList list = tmp.split(" "); 712 | 713 | ui->spinPort->setValue(list.at(1).toInt()); 714 | spinPortValue = list.at(1).toInt(); 715 | } 716 | else 717 | { 718 | ui->checkPort->setChecked(false); 719 | } 720 | 721 | if(ayarR->value("Parametre/paramIpId").toString() != "false") 722 | { 723 | ui->checkIpId->setChecked(true); 724 | QString tmp = ayarR->value("Parametre/paramIpId").toString(); 725 | QStringList list = tmp.split(" "); 726 | 727 | ui->lineIpId->setText(list.at(1)); 728 | lineIpIdValue = list.at(1); 729 | } 730 | else 731 | { 732 | ui->checkIpId->setChecked(false); 733 | } 734 | 735 | if(ayarR->value("Parametre/paramDnsAddr").toString() != "false") 736 | { 737 | ui->checkDnsAddr->setChecked(true); 738 | QString tmp = ayarR->value("Parametre/paramDnsAddr").toString(); 739 | QStringList list = tmp.split(" "); 740 | 741 | ui->lineDnsAddr->setText(list.at(1)); 742 | lineDnsAddrValue = list.at(1); 743 | } 744 | else 745 | { 746 | ui->checkDnsAddr->setChecked(false); 747 | } 748 | 749 | if(ayarR->value("Parametre/paramDnsPort").toString() != "false") 750 | { 751 | ui->checkDnsPort->setChecked(true); 752 | QString tmp = ayarR->value("Parametre/paramDnsPort").toString(); 753 | QStringList list = tmp.split(" "); 754 | 755 | ui->spinDnsPort->setValue(list.at(1).toInt()); 756 | spinDnsPortValue = list.at(1).toInt(); 757 | } 758 | else 759 | { 760 | ui->checkDnsPort->setChecked(false); 761 | } 762 | 763 | if(ayarR->value("Parametre/paramDnsv6Addr").toString() != "false") 764 | { 765 | ui->checkDnsv6Addr->setChecked(true); 766 | QString tmp = ayarR->value("Parametre/paramDnsv6Addr").toString(); 767 | QStringList list = tmp.split(" "); 768 | 769 | ui->lineDnsv6Addr->setText(list.at(1)); 770 | lineDnsv6AddrValue = list.at(1); 771 | //qDebug() << lineDnsv6AddrValue; 772 | } 773 | else 774 | { 775 | ui->checkDnsv6Addr->setChecked(false); 776 | } 777 | 778 | if(ayarR->value("Parametre/paramDnsv6Port").toString() != "false") 779 | { 780 | ui->checkDnsv6Port->setChecked(true); 781 | QString tmp = ayarR->value("Parametre/paramDnsv6Port").toString(); 782 | QStringList list = tmp.split(" "); 783 | 784 | ui->spinDnsv6Port->setValue(list.at(1).toInt()); 785 | spinDnsv6PortValue = list.at(1).toInt(); 786 | } 787 | else 788 | { 789 | ui->checkDnsv6Port->setChecked(false); 790 | } 791 | 792 | if(ayarR->value("Parametre/paramBlacklist").toBool()) 793 | { 794 | ui->checkBlacklist->setChecked(true); 795 | } 796 | else 797 | { 798 | ui->checkBlacklist->setChecked(false); 799 | } 800 | 801 | if(ayarR->value("System/systemStartup").toBool()) 802 | { 803 | ui->startupBox->setChecked(true); 804 | } 805 | else 806 | { 807 | ui->startupBox->setChecked(false); 808 | } 809 | 810 | if(ayarR->value("System/systemTray").toBool()) 811 | { 812 | ui->trayBox->setChecked(true); 813 | } 814 | else 815 | { 816 | ui->trayBox->setChecked(false); 817 | } 818 | 819 | if(ayarR->value("System/disableNotifications").toBool()) 820 | { 821 | ui->notificationBox->setChecked(true); 822 | } 823 | else 824 | { 825 | ui->notificationBox->setChecked(false); 826 | } 827 | } 828 | -------------------------------------------------------------------------------- /src/settings.h: -------------------------------------------------------------------------------- 1 | #ifndef SETTINGS_H 2 | #define SETTINGS_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Ui { 9 | class Settings; 10 | } 11 | 12 | class Settings : public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit Settings(QWidget *parent = 0); 18 | ~Settings(); 19 | 20 | void ayarKayit(); 21 | 22 | protected: 23 | void closeEvent(QCloseEvent *event) override; 24 | 25 | public slots: 26 | void onCheckedDefaultParam(); 27 | void onCheckedCustomParam(); 28 | void onCheckedSystemTray(); 29 | void onCheckedStartup(); 30 | void onCheckedSchedule(); 31 | void onCheckedNotification(); 32 | 33 | void onCheckedQuickSettings(); 34 | 35 | void onCheckedP(); 36 | void onCheckedR(); 37 | void onCheckedS(); 38 | void onCheckedM(); 39 | void onCheckedF(); 40 | void onCheckedK(); 41 | void onCheckedN(); 42 | void onCheckedE(); 43 | void onCheckedA(); 44 | void onCheckedW(); 45 | void onCheckedPort(); 46 | void onCheckedIpId(); 47 | void onCheckedDnsAddr(); 48 | void onCheckedDnsPort(); 49 | void onCheckedDnsv6Addr(); 50 | void onCheckedDnsv6Port(); 51 | void onCheckedBlacklist(); 52 | 53 | void onCheckedRadioQuick1(); 54 | void onCheckedRadioQuick2(); 55 | void onCheckedRadioQuick3(); 56 | void onCheckedRadioQuick4(); 57 | 58 | void resetSettings(); 59 | void loadSettings(); 60 | 61 | signals: 62 | void defaultParamStateChanged(Qt::CheckState state); 63 | void updateParameters(); 64 | 65 | private: 66 | Ui::Settings *ui; 67 | QSettings *ayarR; 68 | 69 | int spinFValue; 70 | int spinKValue; 71 | int spinEValue; 72 | int spinPortValue; 73 | QString lineIpIdValue; 74 | 75 | QString lineDnsAddrValue; 76 | int spinDnsPortValue; 77 | QString lineDnsv6AddrValue; 78 | int spinDnsv6PortValue; 79 | }; 80 | 81 | #endif // SETTINGS_H 82 | -------------------------------------------------------------------------------- /src/settings.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Settings 4 | 5 | 6 | 7 | 0 8 | 0 9 | 672 10 | 526 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | 21 | 672 22 | 526 23 | 24 | 25 | 26 | 27 | 672 28 | 526 29 | 30 | 31 | 32 | Form 33 | 34 | 35 | 36 | 37 | 38 | 39 | 0 40 | 0 41 | 42 | 43 | 44 | 1 45 | 46 | 47 | 48 | Parametre Ayarları 49 | 50 | 51 | 52 | 53 | 54 | Hazır Parametre Kullan 55 | 56 | 57 | true 58 | 59 | 60 | 61 | 62 | 63 | 64 | Özel Parametre Kullan 65 | 66 | 67 | 68 | 69 | 70 | 71 | true 72 | 73 | 74 | Parametreler 75 | 76 | 77 | 78 | 79 | 80 | true 81 | 82 | 83 | QTabWidget::Rounded 84 | 85 | 86 | 0 87 | 88 | 89 | Qt::ElideRight 90 | 91 | 92 | 93 | Parametre 1 94 | 95 | 96 | 97 | 98 | 99 | [-p] block passive DPI 100 | 101 | 102 | 103 | 104 | 105 | 106 | [-r] replace host with hoSt 107 | 108 | 109 | 110 | 111 | 112 | 113 | [-s] remove space between host header and its value 114 | 115 | 116 | 117 | 118 | 119 | 120 | [-m] mix Host header case (test.com -> tEsT.cOm) 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | [-f] set HTTP fragmentation to value: 130 | 131 | 132 | 133 | 134 | 135 | 136 | 1337 137 | 138 | 139 | 140 | 141 | 142 | 143 | Qt::Horizontal 144 | 145 | 146 | 147 | 40 148 | 20 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | [-k] enable HTTP persistent (keep-alive) fragmentation and set it to value: 161 | 162 | 163 | 164 | 165 | 166 | 167 | 1337 168 | 169 | 170 | 171 | 172 | 173 | 174 | Qt::Horizontal 175 | 176 | 177 | 178 | 40 179 | 20 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | [-n] do not wait for first segment ACK when -k is enabled 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | [-e] set HTTPS fragmentation to value: 199 | 200 | 201 | 202 | 203 | 204 | 205 | 1337 206 | 207 | 208 | 209 | 210 | 211 | 212 | Qt::Horizontal 213 | 214 | 215 | 216 | 40 217 | 20 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | [-a] additional space between Method and Request-URI (enables -s, may break sites) 228 | 229 | 230 | 231 | 232 | 233 | 234 | [-w] try to find and parse HTTP traffic on all processed ports (not only on port 80) 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | [--port] additional TCP port to perform fragmentation on (and HTTP tricks with -w): 244 | 245 | 246 | 247 | 248 | 249 | 250 | 65535 251 | 252 | 253 | 254 | 255 | 256 | 257 | Qt::Horizontal 258 | 259 | 260 | 261 | 40 262 | 20 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | [--ip-id] handle additional IP ID (decimal, drop redirects and TCP RSTs with this ID): 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | Parametre 2 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | [--dns-addr] redirect UDP DNS requests to the supplied IP address (experimental): 296 | 297 | 298 | 299 | 300 | 301 | 302 | 208.67.220.220 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | [--dns-port] redirect UDP DNS requests to the supplied port (53 by default) 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 75 322 | 0 323 | 324 | 325 | 326 | 65535 327 | 328 | 329 | 1253 330 | 331 | 332 | 333 | 334 | 335 | 336 | Qt::Horizontal 337 | 338 | 339 | 340 | 40 341 | 20 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | [--dnsv6-addr] redirect UDPv6 DNS requests to the supplied IPv6 address (experimental): 354 | 355 | 356 | 357 | 358 | 359 | 360 | 2a02:6b8::feed:0ff 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | [--dnsv6-port] redirect UDPv6 DNS requests to the supplied port (53 by default) 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 75 380 | 0 381 | 382 | 383 | 384 | 65535 385 | 386 | 387 | 1253 388 | 389 | 390 | 391 | 392 | 393 | 394 | Qt::Horizontal 395 | 396 | 397 | 398 | 40 399 | 20 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | [--blacklist] perform HTTP tricks only to host names and subdomains from 410 | supplied text file. This option can be supplied multiple times. 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | Hizli Ayarlar 419 | 420 | 421 | 422 | 423 | 424 | Hazir ayarlar 425 | 426 | 427 | 428 | 429 | 430 | [-1] -p -r -s -f 2 -k 2 -n -e 2 (most compatible mode, default) 431 | 432 | 433 | 434 | 435 | 436 | 437 | [-3] -p -r -s -e 40 (better speed for HTTP and HTTPS) 438 | 439 | 440 | 441 | 442 | 443 | 444 | [-2] -p -r -s -f 2 -k 2 -n -e 40 (better speed for HTTPS yet still compatible) 445 | 446 | 447 | 448 | 449 | 450 | 451 | [-4] -p -r -s (best speed) 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | Hizli ayarlari aktif et 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | Çalışma Ayarları 477 | 478 | 479 | 480 | 481 | 482 | Çalışma Saatleri Ayarla (Sonraki guncellemede gelecek.) 483 | 484 | 485 | 486 | 487 | 488 | 489 | Sistem Tepsisine Küçült 490 | 491 | 492 | false 493 | 494 | 495 | 496 | 497 | 498 | 499 | Başlangıçta Otomatik Çalıştır 500 | 501 | 502 | 503 | 504 | 505 | 506 | false 507 | 508 | 509 | Çalışma Saatleri 510 | 511 | 512 | 513 | 514 | 50 515 | 90 516 | 51 517 | 22 518 | 519 | 520 | 521 | HH:mm 522 | 523 | 524 | 525 | 526 | 527 | 170 528 | 100 529 | 51 530 | 22 531 | 532 | 533 | 534 | HH:mm 535 | 536 | 537 | false 538 | 539 | 540 | Qt::LocalTime 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | Bildirimleri Kapat 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | --------------------------------------------------------------------------------