clouddial

package
v0.102.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package clouddial blocks Cloud job HTTP from local address ranges.

Index

Constants

This section is empty.

Variables

View Source
var ErrLocalAddress = errors.New("cloud job refused a local address")

ErrLocalAddress is returned when a Cloud job dials a local address range.

Functions

func Client

func Client() *http.Client

Client is the HTTP client for a Cloud job. It refuses every reserved address block, and it returns a redirect response without dialing the next address.

10.1.2.3 is refused. 1.1.1.1 is allowed. A 302 from 1.1.1.1 is the result the flow sees. The Location target is not dialed.

func Job

func Job() bool

Job reports whether this process is a Cloud job. The Cloud worker sets CLOUD_JOB_ID before it runs the flow. No extra setting is required.

func Local

func Local(ip netip.Addr) bool

Local reports whether ip is in a reserved address block.

10.1.2.3 and 203.0.113.5 are reserved. 1.1.1.1 is not. ::ffff:10.1.2.3 is reserved. ::ffff:1.1.1.1 is not.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL