mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-11 23:19:05 +00:00
Fix #98 ; Fix some missing class errors; Finished the validation for configs & simplify the store/update process; Combined the User node info & subscribe node info as one unit;
27 lines
1.5 KiB
PHP
27 lines
1.5 KiB
PHP
<?php
|
||
|
||
namespace App\Components\Client;
|
||
|
||
class Text
|
||
{
|
||
public static function buildShadowsocks($server)
|
||
{
|
||
return '服务器:'.$server['host'].PHP_EOL.'服务器端口:'.$server['port'].PHP_EOL.'密码:'.$server['passwd'].PHP_EOL.'加密:'.$server['method'].PHP_EOL;
|
||
}
|
||
|
||
public static function buildShadowsocksr($server)
|
||
{
|
||
return '服务器:'.$server['host'].PHP_EOL.'服务器端口:'.$server['port'].PHP_EOL.'密码:'.$server['passwd'].PHP_EOL.'加密:'.$server['method'].PHP_EOL.'协议:'.$server['protocol'].PHP_EOL.'协议参数:'.$server['protocol_param'].PHP_EOL.'混淆:'.$server['obfs'].PHP_EOL.'混淆参数:'.$server['obfs_param'].PHP_EOL.'UDP:'.$server['udp'].PHP_EOL;
|
||
}
|
||
|
||
public static function buildVmess($server)
|
||
{
|
||
return '服务器:'.$server['host'].PHP_EOL.'端口:'.$server['port'].PHP_EOL.'加密方式:'.$server['method'].PHP_EOL.'用户ID:'.$server['uuid'].PHP_EOL.'额外ID:'.$server['v2_alter_id'].PHP_EOL.'传输协议:'.$server['v2_net'].PHP_EOL.'伪装类型:'.$server['v2_type'].PHP_EOL.'伪装域名:'.$server['v2_host'].PHP_EOL.'路径:'.$server['v2_path'].PHP_EOL.'TLS:'.$server['v2_tls'].PHP_EOL.'UDP:'.$server['udp'].PHP_EOL;
|
||
}
|
||
|
||
public static function buildTrojan($server)
|
||
{
|
||
return '服务器:'.$server['host'].PHP_EOL.'端口:'.$server['port'].PHP_EOL.'密码:'.$server['passwd'].PHP_EOL.'SNI:'.$server['sni'].PHP_EOL.'UDP:'.$server['udp'].PHP_EOL;
|
||
}
|
||
}
|