Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeessy2/traefik-ip2region
This plugin is an implementation of a ip2region instance as a middleware plugin for Traefik.
https://github.com/jeessy2/traefik-ip2region
blacklist ip2region traefik-plugin whitelist
Last synced: about 1 month ago
JSON representation
This plugin is an implementation of a ip2region instance as a middleware plugin for Traefik.
- Host: GitHub
- URL: https://github.com/jeessy2/traefik-ip2region
- Owner: jeessy2
- License: apache-2.0
- Created: 2023-06-07T08:43:46.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-19T03:17:51.000Z (2 months ago)
- Last Synced: 2024-11-19T04:23:54.139Z (2 months ago)
- Topics: blacklist, ip2region, traefik-plugin, whitelist
- Language: Go
- Homepage:
- Size: 4.2 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
- download ip2region.xdb
```shell
wget https://github.com/lionsoul2014/ip2region/raw/master/data/ip2region.xdb
```- config
```yaml
# Static configuration
experimental:
plugins:
example:
moduleName: github.com/jeessy2/traefik-ip2region
version: v0.0.7
``````yaml
http:
middlewares:
my-plugins:
plugin:
traefik-ip2region:
dbPath: /plugins-local/config/ip2region.xdb
headers:
country: "X-Ip2region-Country"
province: "X-Ip2region-Province"
city: "X-Ip2region-City"
isp: "X-Ip2region-Isp"
ban:
enabled: false
country:
# -
province:
# -
city:
# -
userAgent:
# -
whitelist:
enabled: false
country:
# -
province:
# -
city:
# -
userAgent:
# -```
- k8s
```yaml
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: traefik-ip2region
spec:
plugin:
traefik-ip2region:
dbPath: /plugins-local/config/ip2region.xdb
ban:
enabled: false
whitelist:
enabled: true
country:
- 中国```
- thanks
- https://github.com/lionsoul2014/ip2region