commit
bb07320a68
@ -67,3 +67,5 @@ API_TOKEN=123456
|
||||
|
||||
RECAPTCHA_TOKEN=
|
||||
RECAPTCHA_SECRET=
|
||||
|
||||
REVIEW_TOKEN=
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Server;
|
||||
use App\Support\Frp;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
@ -17,17 +15,6 @@ class ServerController extends Controller
|
||||
public function index()
|
||||
{
|
||||
$servers = Server::all();
|
||||
$servers->toJson();
|
||||
|
||||
foreach ($servers as $server) {
|
||||
try {
|
||||
$serverInfo = (object) (new Frp($server))->serverInfo();
|
||||
$server["traffic_in"] = $serverInfo->total_traffic_in;
|
||||
$server["traffic_out"] = $serverInfo->total_traffic_out;
|
||||
$server["connections"] = $serverInfo->cur_conns;
|
||||
} catch (Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
return $this->success($servers);
|
||||
}
|
||||
|
57
app/Http/Controllers/Review/ReviewController.php
Normal file
57
app/Http/Controllers/Review/ReviewController.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Review;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Tunnel;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ReviewController extends Controller
|
||||
{
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
$this->abortIfNotAdmin($request);
|
||||
$t = Tunnel::query()->paginate(50);
|
||||
|
||||
return $this->success($t);
|
||||
}
|
||||
|
||||
public function update(Request $request, Tunnel $tunnel): JsonResponse
|
||||
{
|
||||
$this->abortIfNotAdmin($request);
|
||||
$request->validate([
|
||||
'locked_reason' => 'nullable|string'
|
||||
]);
|
||||
|
||||
if ($request->get('locked_reason') == "null") {
|
||||
$tunnel->update([
|
||||
'locked_reason' => null
|
||||
]);
|
||||
} else {
|
||||
$tunnel->update([
|
||||
'locked_reason' => $request->get('locked_reason')
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->updated();
|
||||
}
|
||||
|
||||
public function destroy(Request $request, Tunnel $tunnel)
|
||||
{
|
||||
$this->abortIfNotAdmin($request);
|
||||
|
||||
$tunnel->delete();
|
||||
|
||||
return $this->deleted();
|
||||
}
|
||||
|
||||
private function abortIfNotAdmin(Request $request): void
|
||||
{
|
||||
if ($request->bearerToken() == null) {
|
||||
abort(403, "Forbidden");
|
||||
} else if ($request->bearerToken() != config('review.token')) {
|
||||
abort(403, "Forbidden");
|
||||
}
|
||||
}
|
||||
}
|
5
config/review.php
Normal file
5
config/review.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
"token" => env("REVIEW_TOKEN"),
|
||||
];
|
@ -1 +1 @@
|
||||
import{r as l,o as t,c as o,a as e,t as v,j as y,v as w,F as b,e as C,b as p,g as f,l as B}from"./app-f68e4f94.js";import{i as m}from"./http-3b0c5ff6.js";const G=e("div",null,[e("h3",null,"流量充值")],-1),N=e("h5",null,"您要充值多少元的流量?",-1),T=f(" 每 GB 价格: "),U=f(" 元。 "),D={class:"input-group mb-3"},F=e("div",{class:"input-group-append"},[e("span",{class:"input-group-text"},"GB")],-1),M={key:0},j=f("大约 "),E=["textContent"],L=f(" 元。"),P={key:0},R=e("h5",{class:"mt-3"},"您将要使用哪个平台充值?",-1),S=e("p",null,"如果您在选中的平台没有账号,我们将会帮您自动创建一个。",-1),q={class:"form-group form-check"},z=["id","value"],A=["for","textContent"],H={key:1},I=e("h5",{class:"mt-3"},"暂时没有可用的",-1),J=[I],K={key:2},O=e("h5",{class:"mt-3"},"让我们来选择支付方式。",-1),Q=e("p",null,"在支付后,您的流量大概需要数秒钟到账。",-1),W={class:"form-group form-check"},X=["id","value"],Y=["for","textContent"],Z={key:3},$=["disabled","textContent"],ee={key:0},te={key:1,class:"mt-3"},oe=e("h5",null,"完成",-1),ne=e("p",null,"如果您浏览器没有打开新的创建,请点击以下链接来打开。",-1),se=["href"],ie={name:"Charge",setup(le){const g=l(0),u=l([]),i=l(""),r=l({}),d=l(""),c=l(10),h=l(""),_=l(!1);m.get("price").then(s=>{g.value=s.data.price_per_gb}),m.get("providers").then(s=>{u.value=s.data,u.value.length>0&&(i.value=u.value[0],x())});function x(){m.get("providers/"+i.value+"/payments").then(s=>{r.value=s.data,r.value.length>0&&(d.value=r.value[0].name)})}function V(){_.value=!0,m.post("providers/"+i.value+"/charge",{payment:d.value,traffic:c.value}).then(s=>{h.value=s.data.redirect_url,setTimeout(()=>{window.open(h.value,"_blank")})}).finally(()=>{_.value=!1})}return(s,a)=>(t(),o(b,null,[G,e("div",null,[N,e("p",null,[T,e("span",null,v(g.value),1),U]),e("div",D,[y(e("input",{"onUpdate:modelValue":a[0]||(a[0]=n=>c.value=n),autofocus:"",class:"form-control",placeholder:"输入您要的流量 (单位: GB)",type:"number"},null,512),[[w,c.value]]),F]),c.value?(t(),o("div",M,[e("p",null,[j,e("span",{textContent:v(c.value*g.value)},null,8,E),L]),u.value?(t(),o("div",P,[R,S,(t(!0),o(b,null,C(u.value,n=>(t(),o("div",q,[y(e("input",{id:"providers_"+n,"onUpdate:modelValue":a[1]||(a[1]=k=>i.value=k),value:n,class:"form-check-input",name:"provider",type:"radio",onChange:x},null,40,z),[[B,i.value,void 0,{value:!0}]]),e("label",{for:"providers_"+n,class:"form-check-label",textContent:v(n)},null,8,A)]))),256))])):(t(),o("div",H,J)),r.value?(t(),o("div",K,[O,Q,(t(!0),o(b,null,C(r.value,n=>(t(),o("div",W,[y(e("input",{id:"payments_"+n.name,"onUpdate:modelValue":a[2]||(a[2]=k=>d.value=k),value:n.name,class:"form-check-input",name:"payment",type:"radio"},null,8,X),[[B,d.value]]),e("label",{for:"payments_"+n.name,class:"form-check-label",textContent:v(n.title)},null,8,Y)]))),256))])):p("",!0),d.value?(t(),o("div",Z,[e("button",{disabled:_.value,class:"btn btn-primary mt-3",onClick:V,textContent:v(_.value?"请稍后":"立即支付")},null,8,$)])):p("",!0)])):p("",!0)]),_.value?(t(),o("p",ee,"正在创建订单...")):p("",!0),h.value?(t(),o("div",te,[oe,ne,e("a",{href:h.value,class:"link",target:"_blank"},"支付",8,se)])):p("",!0)],64))}};export{ie as default};
|
||||
import{r as l,o as t,c as o,a as e,t as v,j as y,v as w,F as b,e as C,b as p,g as f,l as B}from"./app-6d22deb1.js";import{i as m}from"./http-4cf683c0.js";const G=e("div",null,[e("h3",null,"流量充值")],-1),N=e("h5",null,"您要充值多少元的流量?",-1),T=f(" 每 GB 价格: "),U=f(" 元。 "),D={class:"input-group mb-3"},F=e("div",{class:"input-group-append"},[e("span",{class:"input-group-text"},"GB")],-1),M={key:0},j=f("大约 "),E=["textContent"],L=f(" 元。"),P={key:0},R=e("h5",{class:"mt-3"},"您将要使用哪个平台充值?",-1),S=e("p",null,"如果您在选中的平台没有账号,我们将会帮您自动创建一个。",-1),q={class:"form-group form-check"},z=["id","value"],A=["for","textContent"],H={key:1},I=e("h5",{class:"mt-3"},"暂时没有可用的",-1),J=[I],K={key:2},O=e("h5",{class:"mt-3"},"让我们来选择支付方式。",-1),Q=e("p",null,"在支付后,您的流量大概需要数秒钟到账。",-1),W={class:"form-group form-check"},X=["id","value"],Y=["for","textContent"],Z={key:3},$=["disabled","textContent"],ee={key:0},te={key:1,class:"mt-3"},oe=e("h5",null,"完成",-1),ne=e("p",null,"如果您浏览器没有打开新的创建,请点击以下链接来打开。",-1),se=["href"],ie={name:"Charge",setup(le){const g=l(0),u=l([]),i=l(""),r=l({}),d=l(""),c=l(10),h=l(""),_=l(!1);m.get("price").then(s=>{g.value=s.data.price_per_gb}),m.get("providers").then(s=>{u.value=s.data,u.value.length>0&&(i.value=u.value[0],x())});function x(){m.get("providers/"+i.value+"/payments").then(s=>{r.value=s.data,r.value.length>0&&(d.value=r.value[0].name)})}function V(){_.value=!0,m.post("providers/"+i.value+"/charge",{payment:d.value,traffic:c.value}).then(s=>{h.value=s.data.redirect_url,setTimeout(()=>{window.open(h.value,"_blank")})}).finally(()=>{_.value=!1})}return(s,a)=>(t(),o(b,null,[G,e("div",null,[N,e("p",null,[T,e("span",null,v(g.value),1),U]),e("div",D,[y(e("input",{"onUpdate:modelValue":a[0]||(a[0]=n=>c.value=n),autofocus:"",class:"form-control",placeholder:"输入您要的流量 (单位: GB)",type:"number"},null,512),[[w,c.value]]),F]),c.value?(t(),o("div",M,[e("p",null,[j,e("span",{textContent:v(c.value*g.value)},null,8,E),L]),u.value?(t(),o("div",P,[R,S,(t(!0),o(b,null,C(u.value,n=>(t(),o("div",q,[y(e("input",{id:"providers_"+n,"onUpdate:modelValue":a[1]||(a[1]=k=>i.value=k),value:n,class:"form-check-input",name:"provider",type:"radio",onChange:x},null,40,z),[[B,i.value,void 0,{value:!0}]]),e("label",{for:"providers_"+n,class:"form-check-label",textContent:v(n)},null,8,A)]))),256))])):(t(),o("div",H,J)),r.value?(t(),o("div",K,[O,Q,(t(!0),o(b,null,C(r.value,n=>(t(),o("div",W,[y(e("input",{id:"payments_"+n.name,"onUpdate:modelValue":a[2]||(a[2]=k=>d.value=k),value:n.name,class:"form-check-input",name:"payment",type:"radio"},null,8,X),[[B,d.value]]),e("label",{for:"payments_"+n.name,class:"form-check-label",textContent:v(n.title)},null,8,Y)]))),256))])):p("",!0),d.value?(t(),o("div",Z,[e("button",{disabled:_.value,class:"btn btn-primary mt-3",onClick:V,textContent:v(_.value?"请稍后":"立即支付")},null,8,$)])):p("",!0)])):p("",!0)]),_.value?(t(),o("p",ee,"正在创建订单...")):p("",!0),h.value?(t(),o("div",te,[oe,ne,e("a",{href:h.value,class:"link",target:"_blank"},"支付",8,se)])):p("",!0)],64))}};export{ie as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{i as u}from"./http-3b0c5ff6.js";import{r as c,o as l,c as n,a as t,F as r,e as d,t as o}from"./app-f68e4f94.js";const h=t("h3",null,"客户端下载",-1),_={class:"table table-bordered mt-3"},i=t("thead",null,[t("tr",null,[t("th",null,"名称"),t("th",null,"架构"),t("th",null,"下载")])],-1),m=["href"],B={name:"Downloads",setup(p){const a=c([]);return u.get("clients").then(s=>{a.value=s.data}),(s,f)=>(l(),n(r,null,[h,t("table",_,[i,t("tbody",null,[(l(!0),n(r,null,d(a.value,e=>(l(),n("tr",null,[t("td",null,o(e.name),1),t("td",null,o(e.arch),1),t("td",null,[t("a",{href:e.url},"下载",8,m)])]))),256))])])],64))}};export{B as default};
|
||||
import{i as u}from"./http-4cf683c0.js";import{r as c,o as l,c as n,a as t,F as r,e as d,t as o}from"./app-6d22deb1.js";const h=t("h3",null,"客户端下载",-1),_={class:"table table-bordered mt-3"},i=t("thead",null,[t("tr",null,[t("th",null,"名称"),t("th",null,"架构"),t("th",null,"下载")])],-1),m=["href"],B={name:"Downloads",setup(p){const a=c([]);return u.get("clients").then(s=>{a.value=s.data}),(s,f)=>(l(),n(r,null,[h,t("table",_,[i,t("tbody",null,[(l(!0),n(r,null,d(a.value,e=>(l(),n("tr",null,[t("td",null,o(e.name),1),t("td",null,o(e.arch),1),t("td",null,[t("a",{href:e.url},"下载",8,m)])]))),256))])])],64))}};export{B as default};
|
@ -1 +1 @@
|
||||
import{i as o}from"./http-3b0c5ff6.js";import{r as u,o as l,c,a as e,t as n,u as i,b as d,F as h}from"./app-f68e4f94.js";const p=e("div",null,[e("h3",null,"欢迎")],-1),k={class:"mt-3"},f={key:0,class:"mt-3"},v=e("h3",null,"实名认证",-1),b=e("p",null," 注意,您没有完成实名认证,请点击下方按钮完成实名认证,否则您只能使用中国大陆以外的隧道。 ",-1),g=e("a",{class:"btn btn-primary",href:"https://oauth.laecloud.com/real_name",target:"_blank"},"实名认证",-1),y=e("h3",null,"访问密钥",-1),x={class:"mt-3"},B={key:0,class:"text-success"},A={name:"Index",setup(T){const r=window.Base.SiteName,s=u({name:"loading...",traffic:""}),a=u("");o.get("user").then(t=>{s.value=t.data});function _(){o.post("tokens").then(t=>{a.value=t.data.token})}function m(){o.delete("tokens").then(t=>{alert("所有 Token 删除成功。")})}return(t,w)=>(l(),c(h,null,[p,e("div",k,[e("p",null,"用户名: "+n(s.value.name),1),e("p",null,"剩余流量: "+n(s.value.traffic)+" GB",1)]),s.value.realnamed?d("",!0):(l(),c("div",f,[v,b,g,e("p",null,"在实名认证后,请重新登录 "+n(i(r))+"。",1)])),y,e("div",x,[e("p",null," 访问密钥是用于访问 "+n(i(r))+" API 的密钥,您可以使用它来开发自己的客户端。 ",1),a.value?(l(),c("p",B,"获取成功,请妥善保管您的 Token: "+n(a.value),1)):d("",!0),e("button",{class:"btn btn-primary",onClick:_}," 获取新密钥 "),e("button",{class:"btn btn-danger",style:{"margin-left":"5px"},onClick:m}," 删除所有密钥 ")])],64))}};export{A as default};
|
||||
import{i as o}from"./http-4cf683c0.js";import{r as u,o as l,c,a as e,t as n,u as i,b as d,F as h}from"./app-6d22deb1.js";const p=e("div",null,[e("h3",null,"欢迎")],-1),k={class:"mt-3"},f={key:0,class:"mt-3"},v=e("h3",null,"实名认证",-1),b=e("p",null," 注意,您没有完成实名认证,请点击下方按钮完成实名认证,否则您只能使用中国大陆以外的隧道。 ",-1),g=e("a",{class:"btn btn-primary",href:"https://oauth.laecloud.com/real_name",target:"_blank"},"实名认证",-1),y=e("h3",null,"访问密钥",-1),x={class:"mt-3"},B={key:0,class:"text-success"},A={name:"Index",setup(T){const r=window.Base.SiteName,s=u({name:"loading...",traffic:""}),a=u("");o.get("user").then(t=>{s.value=t.data});function _(){o.post("tokens").then(t=>{a.value=t.data.token})}function m(){o.delete("tokens").then(t=>{alert("所有 Token 删除成功。")})}return(t,w)=>(l(),c(h,null,[p,e("div",k,[e("p",null,"用户名: "+n(s.value.name),1),e("p",null,"剩余流量: "+n(s.value.traffic)+" GB",1)]),s.value.realnamed?d("",!0):(l(),c("div",f,[v,b,g,e("p",null,"在实名认证后,请重新登录 "+n(i(r))+"。",1)])),y,e("div",x,[e("p",null," 访问密钥是用于访问 "+n(i(r))+" API 的密钥,您可以使用它来开发自己的客户端。 ",1),a.value?(l(),c("p",B,"获取成功,请妥善保管您的 Token: "+n(a.value),1)):d("",!0),e("button",{class:"btn btn-primary",onClick:_}," 获取新密钥 "),e("button",{class:"btn btn-danger",style:{"margin-left":"5px"},onClick:m}," 删除所有密钥 ")])],64))}};export{A as default};
|
@ -1 +1 @@
|
||||
import{i as d}from"./http-3b0c5ff6.js";import{r as p,d as _,o as s,c as r,a as e,F as c,e as i,t as o,f as h,w as u,g as m}from"./app-f68e4f94.js";const v=e("h3",null,"隧道列表",-1),k={class:"table table-hover"},f=e("thead",null,[e("tr",null,[e("th",{scope:"col"},"ID"),e("th",{scope:"col"},"名称"),e("th",{scope:"col"},"协议"),e("th",{scope:"col"},"本地地址"),e("th",{scope:"col"},"远程端口/域名"),e("th",{scope:"col"},"服务器"),e("th",{scope:"col"},"状态")])],-1),g={key:0},x={key:1},y={key:0,class:"text-success"},b={key:1,class:"text-danger"},V={name:"Index",setup(w){const a=p([{id:"0",protocol:"",server:{server_address:"",server_port:"",name:""},run_id:""}]);return d.get("tunnels").then(l=>{a.value=l.data,console.log(a.value)}),(l,B)=>{const n=_("router-link");return s(),r(c,null,[v,e("table",k,[f,e("tbody",null,[(s(!0),r(c,null,i(a.value,t=>(s(),r("tr",null,[e("th",null,o(t.id),1),e("td",null,[h(n,{to:{name:"tunnels.show",params:{id:t.id}}},{default:u(()=>[m(o(t.name),1)]),_:2},1032,["to"])]),e("td",null,o(t.protocol.toString().toUpperCase()),1),e("td",null,o(t.local_address),1),e("td",null,[t.protocol==="http"||t.protocol==="https"?(s(),r("span",g,o(t.custom_domain),1)):(s(),r("span",x,o(t.server.server_address)+":"+o(t.remote_port),1))]),e("td",null,o(t.server.name),1),e("td",null,[t.run_id?(s(),r("span",y,"在线")):(s(),r("span",b,"离线"))])]))),256))])])],64)}}};export{V as default};
|
||||
import{i as d}from"./http-4cf683c0.js";import{r as p,d as _,o as s,c as r,a as e,F as c,e as i,t as o,f as h,w as u,g as m}from"./app-6d22deb1.js";const v=e("h3",null,"隧道列表",-1),k={class:"table table-hover"},f=e("thead",null,[e("tr",null,[e("th",{scope:"col"},"ID"),e("th",{scope:"col"},"名称"),e("th",{scope:"col"},"协议"),e("th",{scope:"col"},"本地地址"),e("th",{scope:"col"},"远程端口/域名"),e("th",{scope:"col"},"服务器"),e("th",{scope:"col"},"状态")])],-1),g={key:0},x={key:1},y={key:0,class:"text-success"},b={key:1,class:"text-danger"},V={name:"Index",setup(w){const a=p([{id:"0",protocol:"",server:{server_address:"",server_port:"",name:""},run_id:""}]);return d.get("tunnels").then(l=>{a.value=l.data,console.log(a.value)}),(l,B)=>{const n=_("router-link");return s(),r(c,null,[v,e("table",k,[f,e("tbody",null,[(s(!0),r(c,null,i(a.value,t=>(s(),r("tr",null,[e("th",null,o(t.id),1),e("td",null,[h(n,{to:{name:"tunnels.show",params:{id:t.id}}},{default:u(()=>[m(o(t.name),1)]),_:2},1032,["to"])]),e("td",null,o(t.protocol.toString().toUpperCase()),1),e("td",null,o(t.local_address),1),e("td",null,[t.protocol==="http"||t.protocol==="https"?(s(),r("span",g,o(t.custom_domain),1)):(s(),r("span",x,o(t.server.server_address)+":"+o(t.remote_port),1))]),e("td",null,o(t.server.name),1),e("td",null,[t.run_id?(s(),r("span",y,"在线")):(s(),r("span",b,"离线"))])]))),256))])])],64)}}};export{V as default};
|
@ -1,4 +1,4 @@
|
||||
import{i as Tl}from"./http-3b0c5ff6.js";import{r as tm,m as em,i as cL,n as pL,o as rm,c as am,a as Ke,t as kh,b as dL,F as gL}from"./app-f68e4f94.js";/*! *****************************************************************************
|
||||
import{i as Tl}from"./http-4cf683c0.js";import{r as tm,m as em,i as cL,n as pL,o as rm,c as am,a as Ke,t as kh,b as dL,F as gL}from"./app-6d22deb1.js";/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
@ -1 +1 @@
|
||||
import{p as R,r as f,i as b,q as C,o as h,c as v,a as s,t as E,f as L,u as _}from"./app-f68e4f94.js";import{i as y}from"./http-3b0c5ff6.js";function g(){return g=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},g.apply(this,arguments)}var B=function(){var e=!1,t=[],r=function(){if(!e){e=!0;for(var n=0,l=t.length;n<l;n++)t[n]()}},c=function(n){if(!e){t.push(n);return}n()},d={resolved:function(){return e},resolve:r,promise:{then:c}};return d},S=Object.prototype.hasOwnProperty;function A(){var i=B();return{notify:function(){i.resolve()},wait:function(){return i.promise},render:function(t,r,c){this.wait().then(function(){c(window.grecaptcha.render(t,r))})},reset:function(t){typeof t>"u"||(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.reset(t)}))},execute:function(t){typeof t>"u"||(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.execute(t)}))},checkRecaptchaLoad:function(){S.call(window,"grecaptcha")&&S.call(window.grecaptcha,"render")&&this.notify()},assertLoaded:function(){if(!i.resolved())throw new Error("ReCAPTCHA has not been loaded")}}}var u=A();typeof window<"u"&&(window.vueRecaptchaApiLoaded=u.notify);var O=R({name:"VueRecaptcha",props:{sitekey:{type:String,required:!0},theme:{type:String},badge:{type:String},type:{type:String},size:{type:String},tabindex:{type:String},loadRecaptchaScript:{type:Boolean,default:!0},recaptchaScriptId:{type:String,default:"__RECAPTCHA_SCRIPT"},recaptchaHost:{type:String,default:"www.google.com"},language:{type:String,default:""}},emits:["render","verify","expired","error"],setup:function(e,t){var r=t.slots,c=t.emit,d=f(null),a=f(null),n=function(p){c("verify",p)},l=function(){c("expired")},x=function(){c("error")};return b(function(){if(u.checkRecaptchaLoad(),e.loadRecaptchaScript&&!document.getElementById(e.recaptchaScriptId)){var o=document.createElement("script");o.id=e.recaptchaScriptId,o.src="https://"+e.recaptchaHost+"/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit&hl="+e.language,o.async=!0,o.defer=!0,document.head.appendChild(o)}var p=g({},e,{callback:n,"expired-callback":l,"error-callback":x}),m=d.value,k=r.default?m.children[0]:m;u.render(k,p,function(w){a.value=w,c("render",w)})}),{root:d,widgetId:a,reset:function(){u.reset(a.value)},execute:function(){u.execute(a.value)}}},render:function(){var e=this.$slots.default,t;return typeof e=="function"?t=e():t=e,C("div",{ref:"root"},t)}});const P=s("h3",null,"流量补给",-1),V={key:0},j={key:1},H=s("p",null,"完成验证码以签到",-1),$={name:"Sign",setup(i){const e=window.Base.ReCaptcha,t=f({last_sign_at:null,traffic:0}),r=f("");window.matchMedia("(prefers-color-scheme: dark)").matches?r.value="dark":r.value="light",y.get("user").then(d=>{t.value.traffic=d.data.traffic});function c(d){y.post("traffic",{recaptcha:d}).then(a=>{t.value=a.data;let n=`获得了 ${a.data.traffic} GB 流量!`;a.data.traffic===0&&(n="没有获得流量~"),alert(n)}).finally(()=>{y.get("user").then(a=>{t.value.traffic=a.data.traffic}).finally(()=>{})})}return(d,a)=>(h(),v("div",null,[P,s("div",null,[s("p",null,"当前流量: "+E(t.value.traffic)+"GB",1),t.value.is_signed?(h(),v("div",V,"今日已签到")):(h(),v("div",j,[H,L(_(O),{sitekey:_(e),theme:r.value,loadRecaptchaScript:"",recaptchaHost:"www.recaptcha.net",onVerify:c},null,8,["sitekey","theme"])]))])]))}};export{$ as default};
|
||||
import{p as R,r as f,i as b,q as C,o as h,c as v,a as s,t as E,f as L,u as _}from"./app-6d22deb1.js";import{i as y}from"./http-4cf683c0.js";function g(){return g=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},g.apply(this,arguments)}var B=function(){var e=!1,t=[],r=function(){if(!e){e=!0;for(var n=0,l=t.length;n<l;n++)t[n]()}},c=function(n){if(!e){t.push(n);return}n()},d={resolved:function(){return e},resolve:r,promise:{then:c}};return d},S=Object.prototype.hasOwnProperty;function A(){var i=B();return{notify:function(){i.resolve()},wait:function(){return i.promise},render:function(t,r,c){this.wait().then(function(){c(window.grecaptcha.render(t,r))})},reset:function(t){typeof t>"u"||(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.reset(t)}))},execute:function(t){typeof t>"u"||(this.assertLoaded(),this.wait().then(function(){return window.grecaptcha.execute(t)}))},checkRecaptchaLoad:function(){S.call(window,"grecaptcha")&&S.call(window.grecaptcha,"render")&&this.notify()},assertLoaded:function(){if(!i.resolved())throw new Error("ReCAPTCHA has not been loaded")}}}var u=A();typeof window<"u"&&(window.vueRecaptchaApiLoaded=u.notify);var O=R({name:"VueRecaptcha",props:{sitekey:{type:String,required:!0},theme:{type:String},badge:{type:String},type:{type:String},size:{type:String},tabindex:{type:String},loadRecaptchaScript:{type:Boolean,default:!0},recaptchaScriptId:{type:String,default:"__RECAPTCHA_SCRIPT"},recaptchaHost:{type:String,default:"www.google.com"},language:{type:String,default:""}},emits:["render","verify","expired","error"],setup:function(e,t){var r=t.slots,c=t.emit,d=f(null),a=f(null),n=function(p){c("verify",p)},l=function(){c("expired")},x=function(){c("error")};return b(function(){if(u.checkRecaptchaLoad(),e.loadRecaptchaScript&&!document.getElementById(e.recaptchaScriptId)){var o=document.createElement("script");o.id=e.recaptchaScriptId,o.src="https://"+e.recaptchaHost+"/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit&hl="+e.language,o.async=!0,o.defer=!0,document.head.appendChild(o)}var p=g({},e,{callback:n,"expired-callback":l,"error-callback":x}),m=d.value,k=r.default?m.children[0]:m;u.render(k,p,function(w){a.value=w,c("render",w)})}),{root:d,widgetId:a,reset:function(){u.reset(a.value)},execute:function(){u.execute(a.value)}}},render:function(){var e=this.$slots.default,t;return typeof e=="function"?t=e():t=e,C("div",{ref:"root"},t)}});const P=s("h3",null,"流量补给",-1),V={key:0},j={key:1},H=s("p",null,"完成验证码以签到",-1),$={name:"Sign",setup(i){const e=window.Base.ReCaptcha,t=f({last_sign_at:null,traffic:0}),r=f("");window.matchMedia("(prefers-color-scheme: dark)").matches?r.value="dark":r.value="light",y.get("user").then(d=>{t.value.traffic=d.data.traffic});function c(d){y.post("traffic",{recaptcha:d}).then(a=>{t.value=a.data;let n=`获得了 ${a.data.traffic} GB 流量!`;a.data.traffic===0&&(n="没有获得流量~"),alert(n)}).finally(()=>{y.get("user").then(a=>{t.value.traffic=a.data.traffic}).finally(()=>{})})}return(d,a)=>(h(),v("div",null,[P,s("div",null,[s("p",null,"当前流量: "+E(t.value.traffic)+"GB",1),t.value.is_signed?(h(),v("div",V,"今日已签到")):(h(),v("div",j,[H,L(_(O),{sitekey:_(e),theme:r.value,loadRecaptchaScript:"",recaptchaHost:"www.recaptcha.net",onVerify:c},null,8,["sitekey","theme"])]))])]))}};export{$ as default};
|
1
public/build/assets/Status-762527de.js
Normal file
1
public/build/assets/Status-762527de.js
Normal file
@ -0,0 +1 @@
|
||||
import{o as e,c as s,b as o,r as l,a as t,F as u,e as d,t as i,f as _}from"./app-6d22deb1.js";import{i as m}from"./http-4cf683c0.js";const h={key:0,class:"text-success"},p={key:1,class:"text-danger"},b={key:2,class:"text-warning"},x={name:"ServerStatus",props:{status:{type:String,required:!0}},setup(a){return(n,r)=>a.status==="up"?(e(),s("span",h," 正常 ")):a.status==="down"?(e(),s("span",p," 离线 ")):a.status==="maintenance"?(e(),s("span",b," 维护 ")):o("",!0)}},f=t("h3",null,"节点状态",-1),g={class:"table table-hover table-bordered table-responsive align-middle mt-3"},v=t("thead",{class:"text-center"},[t("tr",null,[t("th",{scope:"col"},"节点名称"),t("th",{scope:"col"},"节点状态")])],-1),y={class:"text-center"},B={name:"Status",setup(a){const n=l([]);return m.get("servers").then(r=>{n.value=r.data}),(r,k)=>(e(),s("div",null,[f,t("table",g,[v,t("tbody",y,[(e(!0),s(u,null,d(n.value,c=>(e(),s("tr",null,[t("td",null,i(c.name),1),t("td",null,[_(x,{status:c.status},null,8,["status"])])]))),256))])])]))}};export{B as default};
|
@ -1 +0,0 @@
|
||||
import{o as s,c as a,b as r,r as u,a as t,F as i,e as d,t as c,f as _}from"./app-f68e4f94.js";import{i as h}from"./http-3b0c5ff6.js";const p={key:0,class:"text-success"},m={key:1,class:"text-danger"},f={key:2,class:"text-warning"},x={name:"ServerStatus",props:{status:{type:String,required:!0}},setup(n){return(o,l)=>n.status==="up"?(s(),a("span",p," 正常 ")):n.status==="down"?(s(),a("span",m," 离线 ")):n.status==="maintenance"?(s(),a("span",f," 维护 ")):r("",!0)}},b=t("h3",null,"节点状态",-1),g={class:"table table-hover table-bordered table-responsive align-middle mt-3"},y=t("thead",{class:"text-center"},[t("tr",null,[t("th",{scope:"col"},"节点名称"),t("th",{scope:"col"},"节点状态"),t("th",{scope:"col"},"上行流量"),t("th",{scope:"col"},"下行流量"),t("th",{scope:"col"},"当前连接数")])],-1),k={class:"text-center"},$={name:"Status",setup(n){const o=u([]);return h.get("servers").then(l=>{o.value=l.data}),(l,B)=>(s(),a("div",null,[b,t("table",g,[y,t("tbody",k,[(s(!0),a(i,null,d(o.value,e=>(s(),a("tr",null,[t("td",null,c(e.name),1),t("td",null,[_(x,{status:e.status},null,8,["status"])]),t("td",null,c(e.traffic_in?(e.traffic_in/1024/1024).toFixed(2)+" MB":"暂无数据"),1),t("td",null,c(e.traffic_out?(e.traffic_out/1024/1024).toFixed(2)+" MB":"暂无数据"),1),t("td",null,c(e.connections??"暂无数据"),1)]))),256))])])]))}};export{$ as default};
|
@ -1 +1 @@
|
||||
import{_ as w,r as u,o as t,c as o,a as e,j as m,v as k,b as r,F as f,e as I,t as b,g as x,l as S,s as B,x as N}from"./app-f68e4f94.js";import{i as y}from"./http-3b0c5ff6.js";const a=_=>(B("data-v-37623621"),_=_(),N(),_),U=a(()=>e("div",null,[e("h3",null,"发工单")],-1)),D=a(()=>e("h5",null,"有遇到什么问题吗?",-1)),F=x(" 您可以选择以下常见问题: "),M=x(" "),j={class:"input-group mb-3"},E={key:0,class:"input-group"},L={key:1},R={key:0},q=a(()=>e("h5",{class:"mt-3"},"选择发工单的平台",-1)),z=a(()=>e("p",null,"如果您在选中的平台没有账号,我们将会帮您自动创建一个。",-1)),A={class:"form-group form-check"},G=["id","value"],H=["for","textContent"],J={key:1},K=a(()=>e("h5",{class:"mt-3"},"暂时没有可用的提供商",-1)),O=[K],P={key:2},Q=["disabled","textContent"],W={key:0},X={key:1,class:"mt-3"},Y=a(()=>e("h5",null,"完成",-1)),Z=a(()=>e("p",null,"如果您浏览器没有打开新的创建,请点击以下链接来打开。",-1)),$=["href"],ee={name:"Ticket",setup(_){const c=u([]),v=u(""),l=u(""),n=u(""),p=u(""),d=u(!1);y.get("providers").then(h=>{c.value=h.data,c.value.length>0&&(v.value=c.value[0])});function g(){d.value=!0,y.post("providers/"+v.value+"/ticket",{title:l.value,content:n.value}).then(h=>{p.value=h.data.redirect_url,setTimeout(()=>{window.open(p.value,"_blank")})}).finally(()=>{d.value=!1})}function C(){l.value="域名 {你的域名} 过白。",n.value="您好,我的域名已备案,请将我的域名 {你的域名} 加入白名单,谢谢。"}function T(){l.value="{节点} 的隧道无法连接。",n.value="您好,这个节点无法连接,请检查。"}return(h,i)=>(t(),o(f,null,[U,e("div",null,[D,e("div",{class:"mb-3"},[F,e("a",{class:"link",onClick:C},"域名白名单"),M,e("a",{class:"link",onClick:T},"映射问题")]),e("div",j,[m(e("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>l.value=s),autofocus:"",class:"form-control",placeholder:"简要概述您遇到的问题",type:"text"},null,512),[[k,l.value]])]),l.value?(t(),o("div",E,[m(e("textarea",{"onUpdate:modelValue":i[1]||(i[1]=s=>n.value=s),class:"form-control",placeholder:"详细说明您遇到的问题..."},null,512),[[k,n.value]])])):r("",!0),l.value?(t(),o("div",L,[c.value?(t(),o("div",R,[q,z,(t(!0),o(f,null,I(c.value,s=>(t(),o("div",A,[m(e("input",{id:"providers_"+s,"onUpdate:modelValue":i[2]||(i[2]=V=>v.value=V),value:s,class:"form-check-input",name:"provider",type:"radio"},null,8,G),[[S,v.value,void 0,{value:!0}]]),e("label",{for:"providers_"+s,class:"form-check-label",textContent:b(s)},null,8,H)]))),256))])):(t(),o("div",J,O)),n.value?(t(),o("div",P,[e("button",{disabled:d.value,class:"btn btn-primary mt-3",onClick:g,textContent:b(d.value?"请稍后":"创建工单")},null,8,Q)])):r("",!0)])):r("",!0)]),d.value?(t(),o("p",W,"正在打开工单...")):r("",!0),p.value?(t(),o("div",X,[Y,Z,e("a",{href:p.value,class:"link",target:"_blank"},"打开工单",8,$)])):r("",!0)],64))}},se=w(ee,[["__scopeId","data-v-37623621"]]);export{se as default};
|
||||
import{_ as w,r as u,o as t,c as o,a as e,j as m,v as k,b as r,F as f,e as I,t as b,g as x,l as S,s as B,x as N}from"./app-6d22deb1.js";import{i as y}from"./http-4cf683c0.js";const a=_=>(B("data-v-37623621"),_=_(),N(),_),U=a(()=>e("div",null,[e("h3",null,"发工单")],-1)),D=a(()=>e("h5",null,"有遇到什么问题吗?",-1)),F=x(" 您可以选择以下常见问题: "),M=x(" "),j={class:"input-group mb-3"},E={key:0,class:"input-group"},L={key:1},R={key:0},q=a(()=>e("h5",{class:"mt-3"},"选择发工单的平台",-1)),z=a(()=>e("p",null,"如果您在选中的平台没有账号,我们将会帮您自动创建一个。",-1)),A={class:"form-group form-check"},G=["id","value"],H=["for","textContent"],J={key:1},K=a(()=>e("h5",{class:"mt-3"},"暂时没有可用的提供商",-1)),O=[K],P={key:2},Q=["disabled","textContent"],W={key:0},X={key:1,class:"mt-3"},Y=a(()=>e("h5",null,"完成",-1)),Z=a(()=>e("p",null,"如果您浏览器没有打开新的创建,请点击以下链接来打开。",-1)),$=["href"],ee={name:"Ticket",setup(_){const c=u([]),v=u(""),l=u(""),n=u(""),p=u(""),d=u(!1);y.get("providers").then(h=>{c.value=h.data,c.value.length>0&&(v.value=c.value[0])});function g(){d.value=!0,y.post("providers/"+v.value+"/ticket",{title:l.value,content:n.value}).then(h=>{p.value=h.data.redirect_url,setTimeout(()=>{window.open(p.value,"_blank")})}).finally(()=>{d.value=!1})}function C(){l.value="域名 {你的域名} 过白。",n.value="您好,我的域名已备案,请将我的域名 {你的域名} 加入白名单,谢谢。"}function T(){l.value="{节点} 的隧道无法连接。",n.value="您好,这个节点无法连接,请检查。"}return(h,i)=>(t(),o(f,null,[U,e("div",null,[D,e("div",{class:"mb-3"},[F,e("a",{class:"link",onClick:C},"域名白名单"),M,e("a",{class:"link",onClick:T},"映射问题")]),e("div",j,[m(e("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>l.value=s),autofocus:"",class:"form-control",placeholder:"简要概述您遇到的问题",type:"text"},null,512),[[k,l.value]])]),l.value?(t(),o("div",E,[m(e("textarea",{"onUpdate:modelValue":i[1]||(i[1]=s=>n.value=s),class:"form-control",placeholder:"详细说明您遇到的问题..."},null,512),[[k,n.value]])])):r("",!0),l.value?(t(),o("div",L,[c.value?(t(),o("div",R,[q,z,(t(!0),o(f,null,I(c.value,s=>(t(),o("div",A,[m(e("input",{id:"providers_"+s,"onUpdate:modelValue":i[2]||(i[2]=V=>v.value=V),value:s,class:"form-check-input",name:"provider",type:"radio"},null,8,G),[[S,v.value,void 0,{value:!0}]]),e("label",{for:"providers_"+s,class:"form-check-label",textContent:b(s)},null,8,H)]))),256))])):(t(),o("div",J,O)),n.value?(t(),o("div",P,[e("button",{disabled:d.value,class:"btn btn-primary mt-3",onClick:g,textContent:b(d.value?"请稍后":"创建工单")},null,8,Q)])):r("",!0)])):r("",!0)]),d.value?(t(),o("p",W,"正在打开工单...")):r("",!0),p.value?(t(),o("div",X,[Y,Z,e("a",{href:p.value,class:"link",target:"_blank"},"打开工单",8,$)])):r("",!0)],64))}},se=w(ee,[["__scopeId","data-v-37623621"]]);export{se as default};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
import{y as a,m as n}from"./app-f68e4f94.js";let t=a.create({baseURL:"/api",timeout:1e4,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":document.querySelector('meta[name="csrf-token"]').getAttribute("content")}});t.interceptors.request.use(e=>(e.headers,e.headers.Accept="application/json",e),e=>(console.error(e),Promise.reject(e)));t.interceptors.response.use(e=>Promise.resolve(e),e=>{console.error("axios error",e);let s=[];e.response.data.data&&(s=e.response.data.data),e.response.data.message&&(s=e.response.data.message),e.response.data.error&&(s=e.response.data.error.message),e.response.status===429?alert("请求次数过多"):e.response.status===401||(e.response.status===404?n.push({name:"index"}):s.length!==0&&alert(s))});export{t as i};
|
||||
import{y as a,m as n}from"./app-6d22deb1.js";let t=a.create({baseURL:"/api",timeout:1e4,headers:{"X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":document.querySelector('meta[name="csrf-token"]').getAttribute("content")}});t.interceptors.request.use(e=>(e.headers,e.headers.Accept="application/json",e),e=>(console.error(e),Promise.reject(e)));t.interceptors.response.use(e=>Promise.resolve(e),e=>{console.error("axios error",e);let s=[];e.response.data.data&&(s=e.response.data.data),e.response.data.message&&(s=e.response.data.message),e.response.data.error&&(s=e.response.data.error.message),e.response.status===429?alert("请求次数过多"):e.response.status===401||(e.response.status===404?n.push({name:"index"}):s.length!==0&&alert(s))});export{t as i};
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"_http-3b0c5ff6.js": {
|
||||
"file": "assets/http-3b0c5ff6.js",
|
||||
"_http-4cf683c0.js": {
|
||||
"file": "assets/http-4cf683c0.js",
|
||||
"imports": [
|
||||
"resources/js/app.js"
|
||||
]
|
||||
@ -41,51 +41,51 @@
|
||||
"resources/js/views/Charge.vue",
|
||||
"resources/js/views/Ticket.vue"
|
||||
],
|
||||
"file": "assets/app-f68e4f94.js",
|
||||
"file": "assets/app-6d22deb1.js",
|
||||
"isEntry": true,
|
||||
"src": "resources/js/app.js"
|
||||
},
|
||||
"resources/js/views/Charge.vue": {
|
||||
"file": "assets/Charge-3a8ce91d.js",
|
||||
"file": "assets/Charge-534c87a2.js",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_http-3b0c5ff6.js"
|
||||
"_http-4cf683c0.js"
|
||||
],
|
||||
"isDynamicEntry": true,
|
||||
"src": "resources/js/views/Charge.vue"
|
||||
},
|
||||
"resources/js/views/Downloads.vue": {
|
||||
"file": "assets/Downloads-964fe1fd.js",
|
||||
"file": "assets/Downloads-325608f0.js",
|
||||
"imports": [
|
||||
"_http-3b0c5ff6.js",
|
||||
"_http-4cf683c0.js",
|
||||
"resources/js/app.js"
|
||||
],
|
||||
"isDynamicEntry": true,
|
||||
"src": "resources/js/views/Downloads.vue"
|
||||
},
|
||||
"resources/js/views/Index.vue": {
|
||||
"file": "assets/Index-8a5e86e2.js",
|
||||
"file": "assets/Index-58fb113e.js",
|
||||
"imports": [
|
||||
"_http-3b0c5ff6.js",
|
||||
"_http-4cf683c0.js",
|
||||
"resources/js/app.js"
|
||||
],
|
||||
"isDynamicEntry": true,
|
||||
"src": "resources/js/views/Index.vue"
|
||||
},
|
||||
"resources/js/views/Sign.vue": {
|
||||
"file": "assets/Sign-8befd407.js",
|
||||
"file": "assets/Sign-1ad8920f.js",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_http-3b0c5ff6.js"
|
||||
"_http-4cf683c0.js"
|
||||
],
|
||||
"isDynamicEntry": true,
|
||||
"src": "resources/js/views/Sign.vue"
|
||||
},
|
||||
"resources/js/views/Status.vue": {
|
||||
"file": "assets/Status-a264ebbc.js",
|
||||
"file": "assets/Status-762527de.js",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_http-3b0c5ff6.js"
|
||||
"_http-4cf683c0.js"
|
||||
],
|
||||
"isDynamicEntry": true,
|
||||
"src": "resources/js/views/Status.vue"
|
||||
@ -98,36 +98,36 @@
|
||||
"css": [
|
||||
"assets/Ticket-ce48f17d.css"
|
||||
],
|
||||
"file": "assets/Ticket-5a033b34.js",
|
||||
"file": "assets/Ticket-b5db8b15.js",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_http-3b0c5ff6.js"
|
||||
"_http-4cf683c0.js"
|
||||
],
|
||||
"isDynamicEntry": true,
|
||||
"src": "resources/js/views/Ticket.vue"
|
||||
},
|
||||
"resources/js/views/Tunnels/Create.vue": {
|
||||
"file": "assets/Create-66bcc808.js",
|
||||
"file": "assets/Create-0f7ac30b.js",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_http-3b0c5ff6.js"
|
||||
"_http-4cf683c0.js"
|
||||
],
|
||||
"isDynamicEntry": true,
|
||||
"src": "resources/js/views/Tunnels/Create.vue"
|
||||
},
|
||||
"resources/js/views/Tunnels/Index.vue": {
|
||||
"file": "assets/Index-85b82c5b.js",
|
||||
"file": "assets/Index-d744b146.js",
|
||||
"imports": [
|
||||
"_http-3b0c5ff6.js",
|
||||
"_http-4cf683c0.js",
|
||||
"resources/js/app.js"
|
||||
],
|
||||
"isDynamicEntry": true,
|
||||
"src": "resources/js/views/Tunnels/Index.vue"
|
||||
},
|
||||
"resources/js/views/Tunnels/Show.vue": {
|
||||
"file": "assets/Show-2bb5537f.js",
|
||||
"file": "assets/Show-2b11b2a2.js",
|
||||
"imports": [
|
||||
"_http-3b0c5ff6.js",
|
||||
"_http-4cf683c0.js",
|
||||
"resources/js/app.js"
|
||||
],
|
||||
"isDynamicEntry": true,
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<span v-if="status === 'up'"
|
||||
class="text-success">
|
||||
|
||||
正常
|
||||
</span>
|
||||
<span v-else-if="status === 'down'"
|
||||
|
@ -6,9 +6,6 @@
|
||||
<tr>
|
||||
<th scope="col">节点名称</th>
|
||||
<th scope="col">节点状态</th>
|
||||
<th scope="col">上行流量</th>
|
||||
<th scope="col">下行流量</th>
|
||||
<th scope="col">当前连接数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-center">
|
||||
@ -19,15 +16,6 @@
|
||||
<td>
|
||||
<ServerStatus :status="server.status"/>
|
||||
</td>
|
||||
<td>
|
||||
{{ server.traffic_in ? (server.traffic_in/1024/1024).toFixed(2) + " MB" : "暂无数据" }}
|
||||
</td>
|
||||
<td>
|
||||
{{ server.traffic_out ? (server.traffic_out/1024/1024).toFixed(2) + " MB" : "暂无数据" }}
|
||||
</td>
|
||||
<td>
|
||||
{{ server.connections ?? "暂无数据" }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -297,18 +297,18 @@ class="btn btn-danger mb-3"
|
||||
<textarea readonly class="form-control mb-3" rows="20" cols="80">[common]
|
||||
bind_port = {{ $server->server_port }}
|
||||
bind_udp_port = {{ $server->server_port }}
|
||||
@if ($server->server_port + 1 > 65535)
|
||||
kcp_bind_port = {{ $server->server_port - 1 }}
|
||||
@else
|
||||
kcp_bind_port = {{ $server->server_port + 1 }}
|
||||
@endif
|
||||
@if ($server->server_port + 1 > 65535)
|
||||
kcp_bind_port = {{ $server->server_port - 1 }}
|
||||
@else
|
||||
kcp_bind_port = {{ $server->server_port + 1 }}
|
||||
@endif
|
||||
token = {{ $server->token }}
|
||||
@if ($server->allow_http)
|
||||
vhost_http_port = 80
|
||||
@endif
|
||||
@if ($server->allow_https)
|
||||
vhost_https_port = 443
|
||||
@endif
|
||||
@if ($server->allow_http)
|
||||
vhost_http_port = 80
|
||||
@endif
|
||||
@if ($server->allow_https)
|
||||
vhost_https_port = 443
|
||||
@endif
|
||||
dashboard_port = {{ $server->dashboard_port }}
|
||||
dashboard_user = {{ $server->dashboard_user }}
|
||||
dashboard_pwd = {{ $server->dashboard_password }}
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Controllers\Api\UserController;
|
||||
use App\Http\Controllers\Api\ServerController;
|
||||
@ -10,11 +9,18 @@
|
||||
use App\Http\Controllers\Api\TrafficController;
|
||||
use App\Http\Controllers\Application\UserController as ApplicationUserController;
|
||||
use App\Http\Controllers\Api\ClientController;
|
||||
use App\Http\Controllers\Review\ReviewController;
|
||||
|
||||
Route::prefix('tunnel')->name('api.tunnel.')->group(function () {
|
||||
Route::post('/handler/{key}', [PortManagerController::class, 'handler'])->name('handler');
|
||||
});
|
||||
|
||||
Route::prefix('review')->group(function () {
|
||||
Route::resource('/tunnels', ReviewController::class)->only([
|
||||
'index', 'update', 'destroy'
|
||||
]);
|
||||
});
|
||||
|
||||
|
||||
Route::middleware('auth:sanctum')->group(function () {
|
||||
Route::get('user', [UserController::class, 'user']);
|
||||
|
Loading…
Reference in New Issue
Block a user