mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-11 23:19:05 +00:00
添加节点信息 错误冗余
This commit is contained in:
@@ -12,13 +12,13 @@ class SSController extends CoreController
|
||||
{
|
||||
$data = [
|
||||
'id' => $node->id,
|
||||
'method' => $node->profile['method'],
|
||||
'method' => $node->profile['method'] ?? '',
|
||||
'speed_limit' => $node->getRawOriginal('speed_limit'),
|
||||
'client_limit' => $node->client_limit,
|
||||
'redirect_url' => sysConfig('redirect_url'),
|
||||
];
|
||||
|
||||
if ($node->profile['passwd']) {
|
||||
if (! empty($node->profile['passwd'])) {
|
||||
$data['port'] = $node->port;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ class SSRController extends CoreController
|
||||
{
|
||||
return $this->returnData('获取节点信息成功', 200, 'success', [
|
||||
'id' => $node->id,
|
||||
'method' => $node->profile['method'],
|
||||
'protocol' => $node->profile['protocol'],
|
||||
'obfs' => $node->profile['obfs'],
|
||||
'method' => $node->profile['method'] ?? '',
|
||||
'protocol' => $node->profile['protocol'] ?? '',
|
||||
'obfs' => $node->profile['obfs'] ?? '',
|
||||
'obfs_param' => $node->profile['obfs_param'] ?? '',
|
||||
'is_udp' => $node->is_udp,
|
||||
'speed_limit' => $node->getRawOriginal('speed_limit'),
|
||||
@@ -39,7 +39,7 @@ class SSRController extends CoreController
|
||||
'method' => $user->method,
|
||||
'protocol' => $user->protocol,
|
||||
'obfs' => $user->obfs,
|
||||
'obfs_param' => $node->profile['obfs_param'],
|
||||
'obfs_param' => $node->profile['obfs_param'] ?? '',
|
||||
'speed_limit' => $user->getRawOriginal('speed_limit'),
|
||||
'enable' => $user->enable,
|
||||
];
|
||||
|
||||
@@ -12,7 +12,7 @@ class V2RayController extends CoreController
|
||||
public function getNodeInfo(Node $node): JsonResponse
|
||||
{
|
||||
$cert = NodeCertificate::whereDomain($node->profile['v2_host'])->first();
|
||||
$tlsProvider = $node->profile['tls_provider'] ?: sysConfig('v2ray_tls_provider');
|
||||
$tlsProvider = ! empty($node->profile['tls_provider']) ? $node->profile['tls_provider'] : sysConfig('v2ray_tls_provider');
|
||||
if (! $tlsProvider) {
|
||||
$tlsProvider = null;
|
||||
}
|
||||
@@ -28,14 +28,14 @@ class V2RayController extends CoreController
|
||||
'key' => $cert ? $cert->key : '',
|
||||
'pem' => $cert ? $cert->pem : '',
|
||||
'v2_license' => (string) sysConfig('v2ray_license'),
|
||||
'v2_alter_id' => $node->profile['v2_alter_id'],
|
||||
'v2_alter_id' => $node->profile['v2_alter_id'] ?? '',
|
||||
'v2_port' => $node->port,
|
||||
'v2_method' => $node->profile['v2_method'],
|
||||
'v2_net' => $node->profile['v2_net'],
|
||||
'v2_type' => $node->profile['v2_type'],
|
||||
'v2_host' => $node->profile['v2_host'],
|
||||
'v2_path' => $node->profile['v2_path'],
|
||||
'v2_tls' => (bool) $node->profile['v2_tls'],
|
||||
'v2_method' => $node->profile['v2_method'] ?? '',
|
||||
'v2_net' => $node->profile['v2_net'] ?? '',
|
||||
'v2_type' => $node->profile['v2_type'] ?? '',
|
||||
'v2_host' => $node->profile['v2_host'] ?? '',
|
||||
'v2_path' => $node->profile['v2_path'] ?? '',
|
||||
'v2_tls' => (bool) ($node->profile['v2_tls'] ?? false),
|
||||
'v2_tls_provider' => $tlsProvider,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ return [
|
||||
'login' => [
|
||||
'telegram_url' => '', // 留空的话则不展示telegram群
|
||||
'qq_url' => '', // 留空的话则不展示QQ群
|
||||
'background_img' => 'https://demo.proxypanel.ml/assets/images/logo64.png', // 背景图片地址,图片宽高不超过 860px * 544px 就行 (留空为默认的背景图)
|
||||
'background_img' => 'https://demo.proxypanel.cf/assets/images/logo64.png', // 背景图片地址,图片宽高不超过 860px * 544px 就行 (留空为默认的背景图)
|
||||
'text' => '一键开启<br>极速上网体验',
|
||||
'text_color' => 'rgba(255, 255, 255, 0.8);', // 文字和按钮颜色 默认颜色 rgba(255, 255, 255, 0.8);
|
||||
'button_color' => '#8077f1', // 文字和按钮颜色 默认颜色:#8077f1(v2版本配置)
|
||||
@@ -50,5 +50,5 @@ return [
|
||||
],
|
||||
|
||||
// 个人中心头像
|
||||
'user_avatar' => 'https://demo.proxypanel.ml/assets/images/avatar.svg',
|
||||
'user_avatar' => 'https://demo.proxypanel.cf/assets/images/avatar.svg',
|
||||
];
|
||||
|
||||
@@ -141,7 +141,7 @@ class PresetSeeder extends Seeder
|
||||
'website_name' => 'ProxyPanel',
|
||||
'is_reset_password' => 1,
|
||||
'reset_password_times' => 3,
|
||||
'website_url' => 'https://demo.proxypanel.ml',
|
||||
'website_url' => 'https://demo.proxypanel.cf',
|
||||
'active_times' => 3,
|
||||
'is_checkin' => 1,
|
||||
'min_rand_traffic' => 10,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
Support but not limited to: Shadowsocks,ShadowsocksR,ShadowsocksRR,V2Ray,Trojan,VNET
|
||||
|
||||
- [Demo](https://demo.proxypanel.ml/) Demo will always on dev/latest code, rather than the stable version.
|
||||
- [Demo](https://demo.proxypanel.cf/) Demo will always on dev/latest code, rather than the stable version.
|
||||
- Account: test@test.com
|
||||
- Password: 123456
|
||||
- [**WIKI**](https://proxypanel.gitbook.io/wiki/)
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<x-system.input-limit title="订阅节点数" code="subscribe_max" :value="$subscribe_max" help="客户端订阅时取得几个节点,为0/留空时返回全部节点"/>
|
||||
<x-system.switch title="随机订阅" code="rand_subscribe" :check="$rand_subscribe" help="启用后,订阅时将随机返回节点信息,否则按节点排序返回"/>
|
||||
<x-system.switch title="高级订阅" code="is_custom_subscribe" :check="$is_custom_subscribe" help="启用后,订阅信息顶部将显示过期时间、剩余流量(只支持个别客户端)"/>
|
||||
<x-system.input title="授权/后端访问域名" :value="$web_api_url" code="web_api_url" help="例:https://demo.proxypanel.ml" type="url"/>
|
||||
<x-system.input title="授权/后端访问域名" :value="$web_api_url" code="web_api_url" help="例:https://demo.proxypanel.cf" type="url"/>
|
||||
<x-system.input title="V2Ray授权" :value="$v2ray_license" code="v2ray_license"/>
|
||||
<x-system.input title="Trojan授权" :value="$trojan_license" code="trojan_license"/>
|
||||
<x-system.input title="V2Ray TLS配置" :value="$v2ray_tls_provider" code="v2ray_tls_provider" help="后端自动签发/载入TLS证书时用(节点的设置值优先级高于此处)"/>
|
||||
|
||||
@@ -60,9 +60,9 @@
|
||||
<td> {{$node->transfer}} </td>
|
||||
<td> {{$node->traffic_rate}} </td>
|
||||
<td>
|
||||
@if(isset($node->profile['passwd']))
|
||||
@isset($node->profile['passwd'])
|
||||
<span class="badge badge-lg badge-info"><i class="icon fas fa-stream"></i>单</span>
|
||||
@endif
|
||||
@endisset
|
||||
@if($node->relay_node_id)
|
||||
<span class="badge badge-lg badge-info"><i class="icon fas fa-ethernet"></i>转</span>
|
||||
@endif
|
||||
|
||||
@@ -480,7 +480,7 @@
|
||||
$('#v2_port').val('{{$node->port}}');
|
||||
$('#v2_sni').val('{{$node->profile['v2_sni'] ?? null}}');
|
||||
v2_path.val('{{$node->profile['v2_path'] ?? null}}');
|
||||
@if($node->profile['v2_tls'])
|
||||
@if($node->profile['v2_tls'] ?? false)
|
||||
$('#v2_tls').click();
|
||||
@endif
|
||||
$('#tls_provider').val('{!! $node->tls_provider !!}');
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
@endcan
|
||||
</td>
|
||||
<td>
|
||||
@if($node->profile['passwd']) <span class="label label-danger">单</span> @endif
|
||||
@if(!empty($node->profile['passwd'])) <span class="label label-danger">单</span> @endif
|
||||
@if($node->ipv6) <span class="label label-danger">IPv6</span> @endif
|
||||
</td>
|
||||
<td>{{$node->server}}</td>
|
||||
|
||||
Reference in New Issue
Block a user