icmp_generic.go 729 B

1234567891011121314151617181920212223242526272829303132
  1. //go:build !darwin && !linux && (!windows || !cgo)
  2. package ingress
  3. import (
  4. "context"
  5. "fmt"
  6. "net/netip"
  7. "runtime"
  8. "time"
  9. "github.com/rs/zerolog"
  10. "github.com/cloudflare/cloudflared/packet"
  11. )
  12. var errICMPProxyNotImplemented = fmt.Errorf("ICMP proxy is not implemented on %s %s", runtime.GOOS, runtime.GOARCH)
  13. type icmpProxy struct{}
  14. func (ip icmpProxy) Request(ctx context.Context, pk *packet.ICMP, responder ICMPResponder) error {
  15. return errICMPProxyNotImplemented
  16. }
  17. func (ip *icmpProxy) Serve(ctx context.Context) error {
  18. return errICMPProxyNotImplemented
  19. }
  20. func newICMPProxy(listenIP netip.Addr, logger *zerolog.Logger, idleTimeout time.Duration) (*icmpProxy, error) {
  21. return nil, errICMPProxyNotImplemented
  22. }