Feature: Support download payload from http(s) server

This commit is contained in:
yuanyuanxiang
2026-01-17 23:10:01 +01:00
parent 1611ddd869
commit 13a09e8451
10 changed files with 9559 additions and 7 deletions

View File

@@ -481,6 +481,10 @@ CMy2015RemoteDlg::~CMy2015RemoteDlg()
MemoryFreeLibrary(m_tinyDLL);
m_tinyDLL = NULL;
}
if (m_FileServer) {
m_FileServer->Stop();
SAFE_DELETE(m_FileServer);
}
}
void CMy2015RemoteDlg::DoDataExchange(CDataExchange* pDX)
@@ -1150,6 +1154,12 @@ BOOL CMy2015RemoteDlg::OnInitDialog()
THIS_CFG.SetStr("settings", "PwdHash", GetPwdHash());
THIS_CFG.SetStr("settings", "MasterHash", GetMasterHash());
UPDATE_SPLASH(16, "正在启动下载服务...");
m_FileServer = new FileDownloadServer(THIS_CFG.GetInt("settings", "FileSvrPort", 80));
if (!m_FileServer->Start()) {
THIS_APP->MessageBoxA("下载服务启动失败,可能是端口被占用了。", "提示");
}
UPDATE_SPLASH(20, "正在初始化文件上传模块...");
int ret = InitFileUpload(GetHMAC(), 64, 50, Logf);
g_hKeyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, AfxGetInstanceHandle(), 0);