mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-06 20:50:01 +00:00
Fix V2ray WebAPI (#74)
This commit is contained in:
committed by
GitHub
parent
8547544bf2
commit
130e7ffd0b
2
.github/workflows/build-image.yml
vendored
2
.github/workflows/build-image.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
push: true
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
repository: brettonye/proxypanel
|
||||
repository: ${{ secrets.DOCKER_REPO }}
|
||||
tag_with_ref: true
|
||||
tag_with_sha: true
|
||||
tags: latest
|
||||
|
||||
@@ -14,6 +14,10 @@ class V2RayController extends BaseController
|
||||
{
|
||||
$node = Node::find($id);
|
||||
$nodeDv = NodeCertificate::whereDomain($node->v2_host)->first();
|
||||
$tlsProvider = $node->tls_provider ?: sysConfig('v2ray_tls_provider');
|
||||
if (! $tlsProvider) {
|
||||
$tlsProvider = null;
|
||||
}
|
||||
|
||||
return $this->returnData('获取节点信息成功', 'success', 200, [
|
||||
'id' => $node->id,
|
||||
@@ -21,11 +25,11 @@ class V2RayController extends BaseController
|
||||
'speed_limit' => $node->speed_limit,
|
||||
'client_limit' => $node->client_limit,
|
||||
'push_port' => $node->push_port,
|
||||
'redirect_url' => sysConfig('redirect_url'),
|
||||
'redirect_url' => (string) sysConfig('redirect_url'),
|
||||
'secret' => $node->auth->secret,
|
||||
'key' => $nodeDv->key ?? '',
|
||||
'pem' => $nodeDv->pem ?? '',
|
||||
'v2_license' => sysConfig('v2ray_license'),
|
||||
'v2_license' => (string) sysConfig('v2ray_license'),
|
||||
'v2_alter_id' => $node->v2_alter_id,
|
||||
'v2_port' => $node->v2_port,
|
||||
'v2_method' => $node->v2_method,
|
||||
@@ -34,8 +38,9 @@ class V2RayController extends BaseController
|
||||
'v2_host' => $node->v2_host,
|
||||
'v2_path' => $node->v2_path,
|
||||
'v2_tls' => $node->v2_tls ? true : false,
|
||||
'v2_tls_provider' => $node->tls_provider ?: sysConfig('v2ray_tls_provider'),
|
||||
]);
|
||||
'v2_tls_provider' => $tlsProvider,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// 获取节点可用的用户列表
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<div class="alert alert-info text-break">
|
||||
<div class="text-center red-700 mb-5">V2Ray-Poseidon</div>
|
||||
(yum install curl 2> /dev/null || apt install curl 2> /dev/null) \<br>
|
||||
&& curl -L -s http://mrw.so/5Qe2UX \<br>
|
||||
&& curl -L -s https://bit.ly/2HswWko \<br>
|
||||
| WEB_API="{{sysConfig('web_api_url') ?: sysConfig('website_url')}}" \<br>
|
||||
NODE_ID={{$vl->node->id}} \<br>
|
||||
NODE_KEY={{$vl->key}} \<br>
|
||||
@@ -122,7 +122,7 @@
|
||||
<br>
|
||||
<br>
|
||||
<div class="text-center red-700 mb-5">操作命令</div>
|
||||
更新:curl -L -s http://mrw.so/5Qe2UX | bash
|
||||
更新:curl -L -s https://bit.ly/2HswWko | bash
|
||||
<br>
|
||||
卸载:curl -L -s http://mrw.so/5IHPR4 | bash
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user