geocn

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

README

GeoCN

识别来源ip是否为中国ip

install

xcaddy build --with github.com/ysicing/caddy2-geocn

usage

    @geofilter {
        geocn {
            db_file "./Country.mmdb"
        }
    }
    file_server @geofilter {
        # TODO
    }
    file_server {
        # TODO
    }

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CNGeoIP

type CNGeoIP struct {
	DBFile string `json:"db_file"`
	// contains filtered or unexported fields
}

func (CNGeoIP) CaddyModule

func (CNGeoIP) CaddyModule() caddy.ModuleInfo

func (*CNGeoIP) Cleanup

func (m *CNGeoIP) Cleanup() error

func (*CNGeoIP) Match

func (m *CNGeoIP) Match(r *http.Request) bool

func (*CNGeoIP) Provision

func (m *CNGeoIP) Provision(ctx caddy.Context) error

func (*CNGeoIP) UnmarshalCaddyfile

func (m *CNGeoIP) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile implements caddyfile.Unmarshaler.

Jump to

Keyboard shortcuts

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