jeessy2 / traefik-ip2region

This plugin is an implementation of a ip2region instance as a middleware plugin for Traefik.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  • download ip2region.xdb

    wget https://github.com/lionsoul2014/ip2region/raw/master/data/ip2region.xdb
  • config

      # Static configuration
      experimental:
        plugins:
          example:
            moduleName: github.com/jeessy2/traefik-ip2region
            version: v0.0.3
    http:
      middlewares:
        my-plugins:
          plugin:
            traefik-ip2region:
              dbPath: /opt/plugins-storage/ip2region.xdb
              # headers:
              #  country: "X-Ip2region-City"
              #  province: "X-Ip2region-Province"
              #  city: "X-Ip2region-City"
              #  isp: "X-Ip2region-Isp"
              ban:
                city:
                #  -
                userAgent:
                #  - 
                country:
                #  - 
  • thanks

About

This plugin is an implementation of a ip2region instance as a middleware plugin for Traefik.

License:Apache License 2.0


Languages

Language:Go 95.0%Language:Makefile 5.0%