diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 41a3fb8..6bae621 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -16,10 +16,6 @@ assignees: Mythologyli + [ZJU Connect 多合一客户端](https://www.cc98.org/topic/5704061) + [使用 ZJU Connect 代替 EasyConnect 提升你的 RVPN 体验](https://www.cc98.org/topic/5521873) + [端口转发、定时保活、自动选线、密码保存](https://www.cc98.org/topic/5570875) -+ 如果你的问题与配合 ZJU Rule 有关,请确保你已阅读过: - + [使用 Clash+ZJU Rule](https://www.cc98.org/topic/5257184) - + [Clash+ZJU Rule 的常见问题与解决方案](https://www.cc98.org/topic/5677200) - + [ZJU Rule Github](https://github.com/Mythologyli/ZJU-Rule) 说明及 [Issues](https://github.com/Mythologyli/ZJU-Rule/issues?q=is%3Aissue) + 你已搜索过现有的 [Issues](https://github.com/Mythologyli/ZJU-Connect-for-Windows/issues?q=is%3Aissue) 并且未发现重复 + 如果你的问题与 EasyConnect 有关且你**不在**使用 ZJU RVPN,请前往 [zju-connect](https://github.com/Mythologyli/zju-connect) 报告 + 如果你确信你的问题与 [zju-web-login](https://github.com/Mythologyli/zju-web-login) 或 [zju-connect](https://github.com/Mythologyli/zju-connect) 有关,欢迎直接前往相应的项目报告 diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index b0c9ba5..876679c 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -14,10 +14,6 @@ assignees: Mythologyli + [ZJU Connect 多合一客户端](https://www.cc98.org/topic/5704061) + [使用 ZJU Connect 代替 EasyConnect 提升你的 RVPN 体验](https://www.cc98.org/topic/5521873) + [端口转发、定时保活、自动选线、密码保存](https://www.cc98.org/topic/5570875) -+ 如果你的建议与配合 ZJU Rule 有关,请确保你已阅读过: - + [使用 Clash+ZJU Rule](https://www.cc98.org/topic/5257184) - + [Clash+ZJU Rule 的常见问题与解决方案](https://www.cc98.org/topic/5677200) - + [ZJU Rule Github](https://github.com/Mythologyli/ZJU-Rule) 说明及 [Issues](https://github.com/Mythologyli/ZJU-Rule/issues?q=is%3Aissue) + 你已搜索过现有的 [Issues](https://github.com/Mythologyli/ZJU-Connect-for-Windows/issues?q=is%3Aissue) 并且未发现重复 + 如果你的建议与 EasyConnect 有关且你**不在**使用 ZJU RVPN,请前往 [zju-connect](https://github.com/Mythologyli/zju-connect) 报告 + 如果你确信你的建议与 [zju-web-login](https://github.com/Mythologyli/zju-web-login) 或 [zju-connect](https://github.com/Mythologyli/zju-connect) 有关,欢迎直接前往相应的项目提交功能请求 diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f63363..64525bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,27 +23,17 @@ add_executable(ZJUConnectForWindows WIN32 l2tpmode.cpp webloginmode.cpp zjuconnectmode.cpp - mainwindow.h - QrCodeGenerator/qrcodegenerator.cpp - QrCodeGenerator/qrcodegenerator.h - QrCodeGenerator/qrcodegen/qrcodegen.h - QrCodeGenerator/qrcodegen/qrcodegen.cpp zjuconnectcontroller/zjuconnectcontroller.cpp - zjuconnectcontroller/zjuconnectcontroller.h - zjurulewindow/zjurulewindow.cpp - zjurulewindow/zjurulewindow.h portforwardingwindow/portforwardingwindow.cpp - portforwardingwindow/portforwardingwindow.h settingwindow/settingwindow.cpp - settingwindow/settingwindow.h networkdetector/networkdetector.cpp - networkdetector/networkdetector.h utils/utils.cpp - utils/utils.h resource.qrc ${CMAKE_CURRENT_SOURCE_DIR}/resource/icon.rc ) +add_subdirectory(QrCodeGenerator) + set(QAPPLICATION_CLASS QApplication CACHE STRING "Inheritance class for SingleApplication") add_subdirectory(singleapplication) @@ -55,6 +45,7 @@ target_link_libraries(ZJUConnectForWindows Qt::Network Qt::Svg SingleApplication::SingleApplication + QrCodeGenerator wininet rasapi32 ) diff --git a/QrCodeGenerator/CMakeLists.txt b/QrCodeGenerator/CMakeLists.txt new file mode 100644 index 0000000..5b1d350 --- /dev/null +++ b/QrCodeGenerator/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.0) +project(QrCodeGenerator) + +set(CMAKE_CXX_STANDARD 17) + +find_package(Qt6 COMPONENTS + Core + Gui + Svg + REQUIRED +) + +add_library(QrCodeGenerator STATIC + QrCodeGenerator.cpp + qrcodegen/qrcodegen.cpp +) + +target_link_libraries(QrCodeGenerator + Qt6::Core + Qt6::Gui + Qt6::Svg +) diff --git a/mainwindow.cpp b/mainwindow.cpp index 21e7e3d..68c758c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -363,15 +363,6 @@ MainWindow::MainWindow(QWidget *parent) : } }); - // 高级-ZJU Rule - connect(ui->zjuRuleAction, &QAction::triggered, - [&]() - { - zjuRuleWindow = new ZjuRuleWindow(this); - zjuRuleWindow->setSocks5Port(QString::number(settings->value("ZJUConnect/Socks5Port", 1080).toInt())); - zjuRuleWindow->show(); - }); - // 帮助-清除系统代理 connect(ui->disableProxyAction, &QAction::triggered, [&]() diff --git a/mainwindow.h b/mainwindow.h index f0acb2e..a3e2ee4 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -8,7 +8,6 @@ #include #include -#include "zjurulewindow/zjurulewindow.h" #include "portforwardingwindow/portforwardingwindow.h" #include "zjuconnectcontroller/zjuconnectcontroller.h" #include "networkdetector/networkdetector.h" @@ -77,7 +76,6 @@ public slots: QObject *diagnosisContext; - ZjuRuleWindow *zjuRuleWindow; SettingWindow *settingWindow; QString mode; diff --git a/mainwindow.ui b/mainwindow.ui index dedc2f8..caeb67f 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -277,7 +277,6 @@ Windows Version: Windows 11 - @@ -296,11 +295,6 @@ Windows Version: Windows 11 退出 - - - ZJU Rule - - 设置 diff --git a/settingwindow/settingwindow.ui b/settingwindow/settingwindow.ui index 90bfceb..5e8a317 100644 --- a/settingwindow/settingwindow.ui +++ b/settingwindow/settingwindow.ui @@ -524,9 +524,6 @@ - - 配合 ZJU Rule 使用时建议勾选 - 代理全部流量 diff --git a/zjuconnectmode.cpp b/zjuconnectmode.cpp index 49a1f6a..5457198 100644 --- a/zjuconnectmode.cpp +++ b/zjuconnectmode.cpp @@ -161,7 +161,7 @@ void MainWindow::setModeToZjuConnect() QMessageBox messageBox(this); messageBox.setWindowTitle("警告"); messageBox.setText( - "当前已存在系统代理配置\n如您正在使用代理工具,推荐使用高级-ZJU Rule\n是否覆盖当前系统代理配置?" + "当前已存在系统代理配置\n是否覆盖当前系统代理配置?" ); messageBox.addButton(QMessageBox::Yes)->setText("是"); diff --git a/zjurulewindow/zjurulewindow.cpp b/zjurulewindow/zjurulewindow.cpp deleted file mode 100644 index 2569c8c..0000000 --- a/zjurulewindow/zjurulewindow.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include - -#include "zjurulewindow.h" - -ZjuRuleWindow::ZjuRuleWindow(QWidget *parent) : - QWidget(parent), - ui(new Ui::ZjuRuleWindow) -{ - ui->setupUi(this); - - setWindowIcon(QIcon(QPixmap(":/resource/icon.png").scaled( - 512, 512, Qt::KeepAspectRatio, Qt::SmoothTransformation - ))); - - setWindowFlag(Qt::Window); - setWindowModality(Qt::WindowModal); - setAttribute(Qt::WA_DeleteOnClose); -} - -ZjuRuleWindow::~ZjuRuleWindow() -{ - delete ui; -} - -void ZjuRuleWindow::setSocks5Port(const QString &port) -{ - QString socks5Url = QString("tg://socks?server=127.0.0.1&port=") + - port + - "&remarks=ZJU Connect"; - - ui->socks5LineEdit->setText(socks5Url); -} diff --git a/zjurulewindow/zjurulewindow.h b/zjurulewindow/zjurulewindow.h deleted file mode 100644 index f217e2c..0000000 --- a/zjurulewindow/zjurulewindow.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef ZJURULEWINDOW_H -#define ZJURULEWINDOW_H - -#include -#include "ui_zjurulewindow.h" - -namespace Ui -{ - class ZjuRuleWindow; -} - -class ZjuRuleWindow : public QWidget -{ -Q_OBJECT - -public: - explicit ZjuRuleWindow(QWidget *parent = nullptr); - - ~ZjuRuleWindow() override; - - void setSocks5Port(const QString &port); - -private: - Ui::ZjuRuleWindow *ui; -}; - -#endif //ZJURULEWINDOW_H diff --git a/zjurulewindow/zjurulewindow.ui b/zjurulewindow/zjurulewindow.ui deleted file mode 100644 index 506c03c..0000000 --- a/zjurulewindow/zjurulewindow.ui +++ /dev/null @@ -1,59 +0,0 @@ - - - ZjuRuleWindow - - - - 0 - 0 - 440 - 166 - - - - ZJU Rule - - - - - - - - - - 0 - 0 - - - - <html><head/><body><p>使用 RVPN 时,你可以将此订阅链接和你的机场订阅同时添加到 <a href="https://zjurule.xyz"><span style=" text-decoration: underline; color:#0000ff;">ZJU Rule</span></a> 中:</p></body></html> - - - true - - - - - - - - - - - 0 - 0 - - - - <html><head/><body><p>添加后,在 Clash 中将 ZJU 相关分组设置为 ZJU Connect</p><p>此后,可以在不影响 Clash 原有功能的同时使用 RVPN</p><p>注意在使用此功能时,不要在 ZJU Connect 中设置系统代理!</p><p>不明白 ZJU Rule 是什么?请访问<a href="https://www.cc98.org/topic/5257184"><span style=" text-decoration: underline; color:#0000ff;">这个帖子</span></a></p></body></html> - - - true - - - - - - - -