Socket
Book a DemoInstallSign in
Socket

kirito.cloudflared.subservice

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kirito.cloudflared.subservice

Kirito Cloudflared e ótimo para criar tunnels da cloudflared para expor a sua aplicação a internet.

1.0.0-alfa
latest
Source
npmnpm
Version published
Weekly downloads
3
-90%
Maintainers
1
Weekly downloads
 
Created
Source

Para instalar a @kirito/cloudflared na sua aplicação basta utilizar

npm i @kirito/cloudflared.subservice

No console.

Rotas da KiritoApi

const Cloudflared = require('@kirito/cloudflared.subservice');

async function startTunnel(port) {
  try {      
    const bin = await Cloudflared.install_cloudflared();
    if (!bin) {
      console.error("❌ Não foi possível instalar o binário do cloudflared.");
      return;
    }

    const tunnel = new Cloudflared(`http://localhost:${port}`);

    tunnel.on("ready", (info) => {
      console.log(`✅ Cloudflare Tunnel pronto: ${info.url}`);
    });

    tunnel.on("subservice", (info) => {
      console.log(`🔹 Subserviço disponível: [${info.type}] ${info.url}`);
    });

    tunnel.on("timeout", () => {
      console.error("❌ Timeout ao iniciar o túnel Cloudflare: Tunnel could not be started within o tempo limite.");
    });

    tunnel.on("error", (err) => {
      console.error("❌ Erro ao iniciar túnel Cloudflare:", err);
    });

    await tunnel.start(120000); // 2 minutos
  } catch (err) {
    console.error("❌ Erro ao iniciar túnel:", err.message);
  }
}

// Exemplo de uso
startTunnel(3000);

Agradecemos por utilizar nossa package.

Keywords

database

FAQs

Package last updated on 05 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.