Plugin For GeoIP

I implement a new geoip plugin: GitHub - zhangjiayin/caddy-geoip2: caddy-geoip2

Cloud anyone checks it, is it useful for you?

it uses a global directive to implement a global GeoIp instance, do not worry about the memory if you use GeoIP in multiple hosts.

Interesting. There’s already a couple other plugins that provide Geo IP functionality:

How does yours differ?

You should probably register your plugin to show up on Download Caddy by signing up for an account and claiming your module.

the difference is that Configuration in Global Scope and supports more variables.

and would register the plugin later. Thanks

hi @francislavoie when I register my plugin on Download Caddy
i got some error



error ID: 48b9d338-d653-47ae-9480-6b6941440d78
could you help me with it ?

Thank you.

There’s a problem with your app module:

unexpected argument to RegisterModule(): &ast.Ident{NamePos:27992594, Name:\"geoIP2State\", Obj:(*ast.Object)(0xc0421a9810)} - expect either composite literal or new()

Also I noticed that you have log lines in your init() and CaddyModule() functions. Please remove those.

1 Like

Thanks

I’ve regiester 3 plugin on Download Caddy

github.com/
zhangjiayin/caddy-geoip2

github.com/
zhangjiayin/caddy-mysql-adapter

github.com/
zhangjiayin/caddy-mysql-storage

hope it is useful for anyone.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.