
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
github.phpd.cn/paysuper/geoip-service
Advanced tools
A fast Go-Micro based microservice for looking up MaxMind GeoIP2 and GeoLite2 database.
Requires a go installation.
A Database (choose one):
This service works as Go-Micro microservice. You may want to
setup your own registry with MICRO_REGISTRY/MICRO_REGISTRY_ADDRESS or use other go-micro flags.
Download it
go get github.com/paysuper/geoip-service
If you need it uou can rebuild proto file with protoc
protoc --proto_path=. --micro_out=. --go_out=. geoip.proto
Setup environment variable MAXMIND_GEOIP_DB_PATH with path to the maxmind database path.
The path can be local file path like /application/assets/GeoLite2-City.mmdb,
or it can be AWS S3 object path like s3://bucketName/GeoLite2-City.mmdb. In the latter case it is required to provide S3 access credentials with the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
By default service will be executed with declared by MICRO_REGISTRY registry and GRPC as a transport.
The docker file in this project used to launch geoip-service in Protocol One environment. You may change it in any way you need it.
Once the service is running you can use go-micro to make requests
package main
import (
"context"
"fmt"
"github.com/paysuper/geoip-service/pkg"
"github.com/paysuper/geoip-service/pkg/proto"
"github.com/micro/go-micro"
)
func main() {
// create a new service
service := micro.NewService()
// parse command line flags
service.Init()
// Create new greeter client
client := proto.NewGeoIpService(geoip.ServiceName, service.Client())
// Call it
rsp, err := client.GetIpData(context.TODO(), &proto.GeoIpDataRequest{IP: "8.8.8.8"})
if err != nil {
fmt.Println(err)
}
// Print response
fmt.Println(rsp)
}
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.