Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
Version 1.0 Rc 1
Browse files Browse the repository at this point in the history
修复隧道启动器崩溃的 Bug、上传 API  辅助模块源代码(无法编译),进入发布候选期(https://baike.baidu.com/item/RC%E7%89%88%E6%9C%AC
  • Loading branch information
Zhiyuan36 authored Jan 23, 2023
1 parent 76dceab commit efb9162
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 9 deletions.
12 changes: 7 additions & 5 deletions FrpAuxiliaryApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,13 @@ int main()
cout << "Don't have .\\Temp\\, mkdiring...\n";
_mkdir("Temp");
}
cout << "Copying...\nCmd return:";
system("copy Frpc.exe .\\Temp\\FRPC_TEMP");
cout << "Renameing...\n";
system(("rename .\\Temp\\FRPC_TEMP " + id + ".exe").c_str());
cout << "Starting Frpc...\nThis log will be delete!";
if (!file(".\\Temp\\" + id + ".exe"))
{
cout << "Copying...\nCmd return:";
system("copy Frpc.exe .\\Temp\\FRPC_TEMP");
cout << "Renameing...\n";
system(("rename .\\Temp\\FRPC_TEMP " + id + ".exe").c_str());
}
freopen_s(&FilePointer, (".\\Logs\\" + id + ".log").c_str(), "w", stdout); // 打开文件
system((".\\Temp\\" + id + " -u" + token + " -p" + id).c_str()); // 启动隧道
//system("del /f /s /q Frp-Settings.ini");
Expand Down
132 changes: 132 additions & 0 deletions LoCyanFrpMSApp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?php
namespace app\controller;

use think\facade\Request;
use think\facade\Db;

class LoCyanFrpMSApp {
public function Information(){
$data = [
"announcement" => "这里是公告,还没写完qwq"
];
return json($data);
}
public function Frpc_update(){
if (Request::get("version") == null) { // 检查 Frpc 版本 版本对的上就不需要更新,对不上就要更新
$data = [
"status" => -1,
"message" => "信息不完整"
];
return json($data);
} else {
if (Request::get("version") == "V0.46.1Plus"){
$data = [
"status" => 0,
"needupdate" => 0
];
return json($data);
} else {
$data = [
"status" => 0,
"needupdate" => 1,
"important" => 1,
"version" => "V0.46.1Plus",
"download_url" => "https://download.locyan.cn/d/LoCyanFrpMSApp/LoCyanFrp/V0.46.1Plus.exe"
];
return json($data);
}
}
}
public function AuxiliaryApp_update(){
if (Request::get("version") == null) { // 检查 Core 版本 版本对的上就不需要更新,对不上就要更新
$data = [
"status" => -1,
"message" => "信息不完整"
];
return json($data);
} else {
if (Request::get("version") == "V2.1"){
$data = [
"status" => 0,
"needupdate" => 0
];
return json($data);
} else {
$data = [
"status" => 0,
"needupdate" => 1,
"version" => "V2.1",
"download_url" => "https://download.locyan.cn/d/LoCyanFrpMSApp/AuxiliaryApp/V2.1.exe"
];
return json($data);
}
}
}
public function MSApp_update(){
if (Request::get("version") == null) { // 检查 MSApp 版本 版本对的上就不需要更新,对不上就要更新
$data = [
"status" => -1,
"message" => "信息不完整"
];
return json($data);
} else {
if (Request::get("version") == "Version 1.0 Rc 1"){
$data = [
"status" => 0,
"needupdate" => 0
];
return json($data);
} else {
$data = [
"status" => 0,
"important" => 0,
"needupdate" => 1,
"version" => "Version 1.0 Rc 1",
"download_url" => "https://download.locyan.cn/d/LoCyanFrpMSApp/MSApp/Version%201.0%20Rc%201.exe"
];
return json($data);
}
}
}
public function GetServerList(){
$rs = Db::table("nodes")->select()->toArray();
echo(count($rs) . " ");
foreach ($rs as $r){
echo($r["id"] . " " . $r["name"] . " " . $r["hostname"] . " " . $r["ip"] . " ");
}
return;
}
public function GetTunnelList(){
$http = new \app\common\Http;
$username = Request::get("username");
$rs = Db::table("proxies")->where("username", $username)->select()->toArray();
echo(count($rs) . " ");
foreach ($rs as $r){
// 获取主机名
$rs = Db::table("nodes")->where("id", $r["node"])->find();
// 是否压缩
if ($r["use_compression"] == "true"){
$uc = "1";
} else {
$uc = "0";
}

// 是否加密
if ($r["use_encryption"] == "true"){
$ue = "1";
} else {
$ue = "0";
}

// 是否存在域名
if ($r["proxy_type"] != "http" && $r["proxy_type"] != "https"){
$domain_S = "0";
echo ($r["id"] . " " . $r["proxy_name"] . " " . $r["local_port"] . " " . $r["remote_port"] . " " . $r["proxy_type"] . " " . $r["node"] . " " . $uc . " " . $ue . " " . $domain_S . " " . $r["local_ip"] . " ");
} else {
$domain_S = "1";
echo ($r["id"] . " " . $r["proxy_name"] . " " . $r["local_port"] . " " . $r["remote_port"] . " " . $r["proxy_type"] . " " . $r["node"] . " " . $uc . " " . $ue . " " . $domain_S . " " . str_replace('["', "", str_replace('"]', "", $r["domain"])) . " " . $r["local_ip"] . " ");
}
}
return;
}
}
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
### 编译

* Visual Studio(安装 C++ 与 C)
* [LoCyanFrp API](https://github.com/Daiyangcheng/LoCyanFrpAPI)
* **[LoCyanFrp API](https://github.com/Daiyangcheng/LoCyanFrpAPI)**

编译 LoCyanFrpMSApp.cpp 与 Core.py ,均编译完成后放在同一目录下,运行 LoCyanFrpMSApp.exe
编译 LoCyanFrpMSApp.cpp 与 rpAuxiliaryApp.cpp ,均编译完成后放在同一目录下,运行 LoCyanFrpMSApp.exe

### 更新方向

Expand All @@ -42,7 +42,6 @@
#### Indev 版本更新方向:

* **$\color{green}{登录模块}$**
* **$\color{green}{Core.exe 下载模块}$**
* **$\color{green}{隧道管理模块}$**
* **$\color{green}{隧道启动模块}$**
* **$\color{green}{隧道启动辅助模块}$**
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

以下为还在**进行安全更新与维护**的版本

- [X] Version 1.0 Rc 1
- [X] Indev 3.6
- [X] Indev 3.5

### 如果发现安全漏洞或 Bug

Expand Down

0 comments on commit efb9162

Please sign in to comment.