This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修复隧道启动器崩溃的 Bug、上传 API 辅助模块源代码(无法编译),进入发布候选期(https://baike.baidu.com/item/RC%E7%89%88%E6%9C%AC)
- Loading branch information
Showing
4 changed files
with
142 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
|
||
以下为还在**进行安全更新与维护**的版本 | ||
|
||
- [X] Version 1.0 Rc 1 | ||
- [X] Indev 3.6 | ||
- [X] Indev 3.5 | ||
|
||
### 如果发现安全漏洞或 Bug | ||
|
||
|