2 Commits

Author SHA1 Message Date
yuanyuanxiang
da443283f2 fix: Send AUTH to sub-master but generate wrong password 2026-05-21 21:37:52 +02:00
yuanyuanxiang
e5bb405f79 docs: migrate Release/Download targets to Gitea; keep stars/forks on GitHub
GitHub mirror is no longer maintained; v1.3.4+ releases land on Gitea only.
Repoint the Release-version badge and Download-Latest button (href + shields
endpoint + logo) at git.simpleremoter.com so visitors don't end up on a stale
GitHub release page.

Stars/forks badges stay on GitHub — vanity counters reflecting historical
accumulation, not navigation targets.

Also: server/go/README.md yama-issue-token link and the line-294 Markdown
"Releases" link in all three READMEs now point at Gitea.
2026-05-20 22:24:42 +02:00
7 changed files with 33 additions and 25 deletions

View File

@@ -9,8 +9,8 @@
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/network/members"> <a href="https://github.com/yuanyuanxiang/SimpleRemoter/network/members">
<img src="https://img.shields.io/github/forks/yuanyuanxiang/SimpleRemoter?style=flat-square&logo=github" alt="GitHub Forks"> <img src="https://img.shields.io/github/forks/yuanyuanxiang/SimpleRemoter?style=flat-square&logo=github" alt="GitHub Forks">
</a> </a>
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases"> <a href="https://git.simpleremoter.com/yuanyuanxiang/SimpleRemoter/releases">
<img src="https://img.shields.io/github/v/release/yuanyuanxiang/SimpleRemoter?style=flat-square" alt="GitHub Release"> <img src="https://img.shields.io/gitea/v/release/yuanyuanxiang/SimpleRemoter?gitea_url=https%3A%2F%2Fgit.simpleremoter.com&style=flat-square&logo=gitea" alt="Gitea Release">
</a> </a>
<img src="https://img.shields.io/badge/client-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Client Platforms"> <img src="https://img.shields.io/badge/client-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Client Platforms">
<img src="https://img.shields.io/badge/server-Windows%20%7C%20Linux%20%7C%20macOS-success?style=flat-square" alt="Server Platforms"> <img src="https://img.shields.io/badge/server-Windows%20%7C%20Linux%20%7C%20macOS-success?style=flat-square" alt="Server Platforms">
@@ -19,8 +19,8 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest"> <a href="https://git.simpleremoter.com/yuanyuanxiang/SimpleRemoter/releases/latest">
<img src="https://img.shields.io/badge/Download-最新版本-2ea44f?style=for-the-badge&logo=github" alt="Download Latest"> <img src="https://img.shields.io/badge/Download-最新版本-2ea44f?style=for-the-badge&logo=gitea" alt="Download Latest">
</a> </a>
</p> </p>
@@ -291,7 +291,7 @@
无需编译,下载即用: 无需编译,下载即用:
1. **下载发布版** - 从 [Releases](https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest) 下载最新版本 1. **下载发布版** - 从 [Releases](https://git.simpleremoter.com/yuanyuanxiang/SimpleRemoter/releases/latest) 下载最新版本
2. **启动主控** - 运行 `YAMA.exe`(或 Linux 上的 `server_linux_amd64`),输入授权信息 2. **启动主控** - 运行 `YAMA.exe`(或 Linux 上的 `server_linux_amd64`),输入授权信息
3. **生成客户端** - 工具栏「生成」配置服务器 IP 和端口 3. **生成客户端** - 工具栏「生成」配置服务器 IP 和端口
4. **部署客户端** - 复制到目标机器运行 4. **部署客户端** - 复制到目标机器运行

View File

@@ -9,8 +9,8 @@
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/network/members"> <a href="https://github.com/yuanyuanxiang/SimpleRemoter/network/members">
<img src="https://img.shields.io/github/forks/yuanyuanxiang/SimpleRemoter?style=flat-square&logo=github" alt="GitHub Forks"> <img src="https://img.shields.io/github/forks/yuanyuanxiang/SimpleRemoter?style=flat-square&logo=github" alt="GitHub Forks">
</a> </a>
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases"> <a href="https://git.simpleremoter.com/yuanyuanxiang/SimpleRemoter/releases">
<img src="https://img.shields.io/github/v/release/yuanyuanxiang/SimpleRemoter?style=flat-square" alt="GitHub Release"> <img src="https://img.shields.io/gitea/v/release/yuanyuanxiang/SimpleRemoter?gitea_url=https%3A%2F%2Fgit.simpleremoter.com&style=flat-square&logo=gitea" alt="Gitea Release">
</a> </a>
<img src="https://img.shields.io/badge/client-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Client Platforms"> <img src="https://img.shields.io/badge/client-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Client Platforms">
<img src="https://img.shields.io/badge/server-Windows%20%7C%20Linux%20%7C%20macOS-success?style=flat-square" alt="Server Platforms"> <img src="https://img.shields.io/badge/server-Windows%20%7C%20Linux%20%7C%20macOS-success?style=flat-square" alt="Server Platforms">
@@ -19,8 +19,8 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest"> <a href="https://git.simpleremoter.com/yuanyuanxiang/SimpleRemoter/releases/latest">
<img src="https://img.shields.io/badge/Download-Latest%20Release-2ea44f?style=for-the-badge&logo=github" alt="Download Latest"> <img src="https://img.shields.io/badge/Download-Latest%20Release-2ea44f?style=for-the-badge&logo=gitea" alt="Download Latest">
</a> </a>
</p> </p>
@@ -291,7 +291,7 @@ Full description: [Multi-Layer License](./docs/MultiLayerLicense.md)
No compilation required — download and run: No compilation required — download and run:
1. **Download a release** — grab the latest build from [Releases](https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest) 1. **Download a release** — grab the latest build from [Releases](https://git.simpleremoter.com/yuanyuanxiang/SimpleRemoter/releases/latest)
2. **Start the master** — run `YAMA.exe` (or `server_linux_amd64` on Linux), enter the license info 2. **Start the master** — run `YAMA.exe` (or `server_linux_amd64` on Linux), enter the license info
3. **Generate a client** — click *Build* in the toolbar, configure server IP / port 3. **Generate a client** — click *Build* in the toolbar, configure server IP / port
4. **Deploy the client** — copy to the target machine and run it 4. **Deploy the client** — copy to the target machine and run it

View File

@@ -9,8 +9,8 @@
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/network/members"> <a href="https://github.com/yuanyuanxiang/SimpleRemoter/network/members">
<img src="https://img.shields.io/github/forks/yuanyuanxiang/SimpleRemoter?style=flat-square&logo=github" alt="GitHub Forks"> <img src="https://img.shields.io/github/forks/yuanyuanxiang/SimpleRemoter?style=flat-square&logo=github" alt="GitHub Forks">
</a> </a>
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases"> <a href="https://git.simpleremoter.com/yuanyuanxiang/SimpleRemoter/releases">
<img src="https://img.shields.io/github/v/release/yuanyuanxiang/SimpleRemoter?style=flat-square" alt="GitHub Release"> <img src="https://img.shields.io/gitea/v/release/yuanyuanxiang/SimpleRemoter?gitea_url=https%3A%2F%2Fgit.simpleremoter.com&style=flat-square&logo=gitea" alt="Gitea Release">
</a> </a>
<img src="https://img.shields.io/badge/client-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Client Platforms"> <img src="https://img.shields.io/badge/client-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Client Platforms">
<img src="https://img.shields.io/badge/server-Windows%20%7C%20Linux%20%7C%20macOS-success?style=flat-square" alt="Server Platforms"> <img src="https://img.shields.io/badge/server-Windows%20%7C%20Linux%20%7C%20macOS-success?style=flat-square" alt="Server Platforms">
@@ -19,8 +19,8 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest"> <a href="https://git.simpleremoter.com/yuanyuanxiang/SimpleRemoter/releases/latest">
<img src="https://img.shields.io/badge/Download-最新版本-2ea44f?style=for-the-badge&logo=github" alt="Download Latest"> <img src="https://img.shields.io/badge/Download-最新版本-2ea44f?style=for-the-badge&logo=gitea" alt="Download Latest">
</a> </a>
</p> </p>
@@ -291,7 +291,7 @@
無需編譯,下載即用: 無需編譯,下載即用:
1. **下載發行版** - 從 [Releases](https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest) 下載最新版本 1. **下載發行版** - 從 [Releases](https://git.simpleremoter.com/yuanyuanxiang/SimpleRemoter/releases/latest) 下載最新版本
2. **啟動主控** - 執行 `YAMA.exe`(或 Linux 上的 `server_linux_amd64`),輸入授權資訊 2. **啟動主控** - 執行 `YAMA.exe`(或 Linux 上的 `server_linux_amd64`),輸入授權資訊
3. **生成用戶端** - 工具列「生成」設定伺服器 IP 和埠 3. **生成用戶端** - 工具列「生成」設定伺服器 IP 和埠
4. **部署用戶端** - 複製到目標機器執行 4. **部署用戶端** - 複製到目標機器執行

View File

@@ -617,14 +617,18 @@ void DownExecute(const std::string &strUrl, CManager *This)
} }
#include "common/location.h" #include "common/location.h"
std::string getHardwareIDByCfg(const std::string& pwdHash, const std::string& masterHash) std::string getHardwareIDByCfg(std::string& pwdHash, const std::string& masterHash)
{ {
iniFile reg;
pwdHash = reg.GetStr("settings", "UpperHash", masterHash);
config* m_iniFile = nullptr; config* m_iniFile = nullptr;
#ifdef _DEBUG #ifdef _DEBUG
m_iniFile = pwdHash == masterHash ? new config : new iniFile; m_iniFile = pwdHash == masterHash ? new config : new iniFile;
#else #else
m_iniFile = new iniFile; m_iniFile = new iniFile;
#endif #endif
pwdHash = m_iniFile->GetStr("settings", "UpperHash", masterHash);
int bindType = m_iniFile->GetInt("settings", "BindType", 0); int bindType = m_iniFile->GetInt("settings", "BindType", 0);
int hwVersion = m_iniFile->GetInt("settings", "HWIDVersion", 0); int hwVersion = m_iniFile->GetInt("settings", "HWIDVersion", 0);
std::string master = m_iniFile->GetStr("settings", "master"); std::string master = m_iniFile->GetStr("settings", "master");
@@ -882,18 +886,17 @@ VOID CKernelManager::OnReceive(PBYTE szBuffer, ULONG ulLength)
// 扩大到 400 字节以容纳 V2 签名(约 92 字节)和 Authorization约 150 字节) // 扩大到 400 字节以容纳 V2 签名(约 92 字节)和 Authorization约 150 字节)
char buf[400] = {}, *passCode = buf + 5; char buf[400] = {}, *passCode = buf + 5;
memcpy(buf, szBuffer, min(sizeof(buf), ulLength)); memcpy(buf, szBuffer, min(sizeof(buf), ulLength));
std::string masterHash(skCrypt(MASTER_HASH));
const char* pwdHash = m_conn->pwdHash[0] ? m_conn->pwdHash : masterHash.c_str();
if (passCode[0] == 0) { if (passCode[0] == 0) {
std::string pwdHash, masterHash(skCrypt(MASTER_HASH));
static std::string hardwareId = getHardwareIDByCfg(pwdHash, masterHash); static std::string hardwareId = getHardwareIDByCfg(pwdHash, masterHash);
static std::string hashedID = hashSHA256(hardwareId); static std::string hashedID = hashSHA256(hardwareId);
static std::string devId = getFixedLengthID(hashedID); static std::string devId = getFixedLengthID(hashedID);
memcpy(buf + 24, buf + 12, 8); // 消息签名 memcpy(buf + 24, buf + 12, 8); // 消息签名
memcpy(buf + 96, buf + 8, 4); // 时间戳 memcpy(buf + 96, buf + 8, 4); // 时间戳
memcpy(buf + 5, devId.c_str(), devId.length()); // 16字节 memcpy(buf + 5, devId.c_str(), devId.length()); // 16字节
memcpy(buf + 32, pwdHash, 64); // 64字节 memcpy(buf + 32, pwdHash.c_str(), 64); // 64字节
m_ClientObject->Send2Server((char*)buf, sizeof(buf)); m_ClientObject->Send2Server((char*)buf, sizeof(buf));
Mprintf("Request for authorization update.\n"); Mprintf("Request for authorization update. SN: %s, PwdHash: %s\n", devId.c_str(), pwdHash.c_str());
} else { } else {
unsigned short* days = (unsigned short*)(buf + 1); unsigned short* days = (unsigned short*)(buf + 1);
unsigned short* num = (unsigned short*)(buf + 3); unsigned short* num = (unsigned short*)(buf + 3);

View File

@@ -1867,6 +1867,7 @@ BOOL CMy2015RemoteDlg::OnInitDialog()
} }
THIS_CFG.SetStr("settings", "PwdHash", GetPwdHash()); THIS_CFG.SetStr("settings", "PwdHash", GetPwdHash());
THIS_CFG.SetStr("settings", "UpperHash", GetUpperHash());
THIS_CFG.SetStr("settings", "MasterHash", GetMasterHash()); THIS_CFG.SetStr("settings", "MasterHash", GetMasterHash());
THIS_CFG.SetStr("settings", "Version", VERSION_STR); THIS_CFG.SetStr("settings", "Version", VERSION_STR);
@@ -5507,6 +5508,7 @@ VOID CMy2015RemoteDlg::MessageHandle(CONTEXT_OBJECT* ContextObject)
std::string("-") + getFixedLengthID(finalKey); std::string("-") + getFixedLengthID(finalKey);
memcpy(devId, fixedKey.c_str(), fixedKey.length()); memcpy(devId, fixedKey.c_str(), fixedKey.length());
devId[fixedKey.length()] = 0; devId[fixedKey.length()] = 0;
Mprintf("Request AUTH: SN= %s, Password= %s\n", deviceID.c_str(), fixedKey.c_str());
// 检查该设备原授权是 V1 还是 V2 // 检查该设备原授权是 V1 还是 V2
std::string origPasscode, origHmac, origRemark; std::string origPasscode, origHmac, origRemark;
@@ -5541,6 +5543,7 @@ VOID CMy2015RemoteDlg::MessageHandle(CONTEXT_OBJECT* ContextObject)
memcpy(resp + 64, hmac.c_str(), hmac.length()); memcpy(resp + 64, hmac.c_str(), hmac.length());
resp[64+hmac.length()] = 0; resp[64+hmac.length()] = 0;
resp[64 + hmac.length() + 1] = 0;
// 构建 Authorization多层授权- 让下级主控知道向谁进行授权校验 // 构建 Authorization多层授权- 让下级主控知道向谁进行授权校验
// 注意isV2Auth 判断的是当前服务端是否是授权服务器(有 V2 私钥),而非被授权设备的原授权类型 // 注意isV2Auth 判断的是当前服务端是否是授权服务器(有 V2 私钥),而非被授权设备的原授权类型
@@ -10741,15 +10744,16 @@ void CMy2015RemoteDlg::OnWebRemoteControl()
int port = THIS_CFG.GetInt("settings", "WebSvrPort", -1); int port = THIS_CFG.GetInt("settings", "WebSvrPort", -1);
if (port <= 0) { if (port <= 0) {
MessageBoxL("请在菜单设置Web端口!", "提示", MB_ICONINFORMATION); MessageBoxL("请在菜单设置Web端口!", "提示", MB_ICONINFORMATION);
return;
} }
else if (m_superPass.empty()) { else if (m_superPass.empty()) {
MessageBoxL("请设置环境变量 " BRAND_ENV_VAR " 来使用Web远程桌面!", "提示", MB_ICONINFORMATION); MessageBoxL("请设置环境变量 " BRAND_ENV_VAR " 来使用Web远程桌面!", "提示", MB_ICONINFORMATION);
}else { }else {
MessageBoxL("如需Web远程桌面跨网使用方案请联系管理员!", "提示", MB_ICONINFORMATION);
}
CString content; CString content;
content.Format("http://127.0.0.1:%d", port); content.Format("http://127.0.0.1:%d", port);
ShellExecute(NULL, _T("open"), content, NULL, NULL, SW_SHOWNORMAL); ShellExecute(NULL, _T("open"), content, NULL, NULL, SW_SHOWNORMAL);
MessageBoxL("如需Web远程桌面跨网使用方案请联系管理员!", "提示", MB_ICONINFORMATION);
}
} }
// "播放快照"菜单响应: // "播放快照"菜单响应:

View File

@@ -585,6 +585,7 @@ std::string signPasswordV2(const std::string& deviceId, const std::string& passw
// 签名 // 签名
BYTE signature[V2_SIGNATURE_SIZE]; BYTE signature[V2_SIGNATURE_SIZE];
if (!SignMessageV2(privateKeyFile, (const BYTE*)payload.c_str(), (int)payload.length(), signature)) { if (!SignMessageV2(privateKeyFile, (const BYTE*)payload.c_str(), (int)payload.length(), signature)) {
Mprintf("signPasswordV2: SignMessageV2 failed: %s\n", payload.c_str());
return ""; return "";
} }
@@ -640,7 +641,7 @@ std::string signAuthorizationV2(const std::string& license, const std::string& s
BYTE signature[V2_SIGNATURE_SIZE]; BYTE signature[V2_SIGNATURE_SIZE];
if (!SignMessageV2(privateKeyFile, (const BYTE*)payload.c_str(), (int)payload.length(), signature)) { if (!SignMessageV2(privateKeyFile, (const BYTE*)payload.c_str(), (int)payload.length(), signature)) {
Mprintf("signAuthorizationV2: SignMessageV2 failed\n"); Mprintf("signAuthorizationV2: SignMessageV2 failed: %s\n", license.c_str());
return ""; return "";
} }

View File

@@ -209,7 +209,7 @@ openssl genrsa -out license_priv.pem 2048
openssl rsa -in license_priv.pem -pubout -out license_pub.pem openssl rsa -in license_priv.pem -pubout -out license_pub.pem
``` ```
底层 API 是 `licensing.Issue(privKey, sub, tier, maxDevices, ttl)`(见 [`licensing/server.go`](licensing/server.go))。一个开箱即用的 CLI 包装在独立仓库 [`yama-issue-token`](https://github.com/yuanyuanxiang/yama-issue-token)go.mod `replace` 指向本仓库的 `licensing` 包),用法: 底层 API 是 `licensing.Issue(privKey, sub, tier, maxDevices, ttl)`(见 [`licensing/server.go`](licensing/server.go))。一个开箱即用的 CLI 包装在独立仓库 [`yama-issue-token`](https://git.simpleremoter.com/yuanyuanxiang/yama-issue-token)go.mod `replace` 指向本仓库的 `licensing` 包),用法:
```bash ```bash
yama-issue-token -priv license_priv.pem -sub acme-corp -tier paid -max 100 -days 365 yama-issue-token -priv license_priv.pem -sub acme-corp -tier paid -max 100 -days 365