Files
posh-providers/cloudflare/cloudflared
2026-10-14 17:06:11 +02:00
..
2026-10-14 15:34:59 +02:00
2026-10-14 15:34:59 +02:00
2026-10-14 17:06:11 +02:00
2026-10-14 15:34:59 +02:00
2026-10-14 15:34:59 +02:00
2026-10-14 17:06:11 +02:00
2026-10-14 15:34:59 +02:00
2026-10-14 15:34:59 +02:00
2025-02-21 11:44:54 +01:00
2026-08-24 08:36:46 +02:00

POSH cloudflared provider

Usage

Plugin

package plugin

type Plugin struct {
  l           log.Logger
  cloudflared *cloudflared.Cloudflared
  commands    command.Commands
}

func New(l log.Logger) (plugin.Plugin, error) {
  inst := &Plugin{
    l:        l,
    commands: command.Commands{},
  }

  // ...

  inst.cloudflared, err = cloudflared.New(l)
  if err != nil {
    return nil, errors.Wrap(err, "failed to create cloudflared")
  }

  // ...
  inst.commands.Add(command.NewCheck(l,
    cloudflared.AcccessChecker(inst.cloudflared, ints.cloudflared.Config().GetAccess("my-access")),
  ))

  inst.commands.MustAdd(cloudflared.NewCommand(l, inst.cloudflared))

  // ...

  return inst, nil
}

Config

cloudflared:
  path: .posh/config/cloudflared
  access:
    my-access:
      type: tcp
      port: 1234
      hostname: cloudflared.my-domain.com

Ownbrew

ownbrew:
  packages:
    - name: cloudflared
      tap: foomo/tap/cloudflare/cloudflared
      version: 2024.6.1