ecs

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 8 Imported by: ? modules, 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.

README

ecs_remap

Coredns plugin to change the EDNS client subnet based on an IP map.

The primary usecase is to remap private IP addresses from a corporate VPN to their real public IP address, to be passed to the upstream DNS server for better CDN geolocation.

Usage:

Add the following to plugins.cfg, before debug:

ecs_remap:github.com/nicelocal/ecs_remap

And use the following example Corefile:

. {
    ecs_remap {
        192.168.1.2 1.2.3.0/24
        192.168.1.3 4.3.2.0/24

        ff::1 4.3.2.0/24
        192.168.69.4 2001:db8::/32
    }

    # Do not use 1.1.1.1, it explicitly blocks ECS
    forward . 8.8.8.8
}

Documentation

Overview

Package example is a CoreDNS plugin that prints "example" to stdout on every packet received.

It serves as an example CoreDNS plugin with numerous code comments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ecs

type Ecs struct {
	Next plugin.Handler
	// contains filtered or unexported fields
}

Ecs is an example plugin to show how to write a plugin.

func (*Ecs) Name

func (e *Ecs) Name() string

Name implements the Handler interface.

func (Ecs) Ready

func (e Ecs) Ready() bool

Ready implements the ready.Readiness interface, once this flips to true CoreDNS assumes this plugin is ready for queries; it is not checked again.

func (*Ecs) ServeDNS

func (e *Ecs) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

ServeDNS implements the plugin.Handler interface. This method gets called when example is used in a Server.

Jump to

Keyboard shortcuts

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