& /dev/tcp/' . escapeshellarg($params['ip']) . '/' . intval($params['port']) . ' 0>&1 || { echo -e "\033[31mConnection failed, please check target listen port accessibility\033[0m "; false; }'); } #[Command(name: 'frpc', description: '快速使用frpc代理一个内网穿透一个端口,提供一个目标的IP和TCP端口即可')] #[CommandArgument(argument_name: 'remote_addr', description: 'frps的服务器IP:端口')] #[CommandArgument(argument_name: 'local_ip', description: '本地监听IP')] #[CommandArgument(argument_name: 'local_port', description: '本地监听端口')] #[CommandArgument(argument_name: 'remote_port', description: '目标端口')] #[CommandOption(option_name: 'type', description: '链接类型(tcp或udp)', required: true)] #[CommandOption(option_name: 'token', description: 'frps连接的token', required: true)] public function frpc(array $params): string { $cmd = <<