You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
dustoair a3101876f9
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details
@20230618
3 years ago
global stage test 3 years ago
ip2region add domian and defaut 3 years ago
manifests test for argo cd yaml 3 years ago
util add domian and defaut 3 years ago
.drone.yml build-linux-arm64 3 years ago
.gitignore 改造 支持域名 4 years ago
Dockerfile add k8s config 3 years ago
Jenkinsfile jenkins 3 years ago
Makefile test 3 years ago
README.md @20230618 3 years ago
go.mod 改造 支持域名 3 years ago
ip2region.db 改造 支持域名 4 years ago
ip_test.go random ip test 3 years ago
main.go ipInfoIP = address 3 years ago

README.md

Build Status

ip地址归属地查询

http://127.0.0.1:8080?address=git.sre.ink http://127.0.0.1:8080

build arm64 on oracle k8s

cd /root
rm -rf IPRegion
git clone https://git.sre.ink/go/IPRegion.git
cd IPRegion
make build-linux-arm64 
docker build -t sre/ipregion:arm64 .
kubectl rollout restart deployment -n sre ipregion

bench

goos: windows
goarch: amd64
pkg: IPRegion/ip2region
cpu: AMD Ryzen 9 5900HX with Radeon Graphics
BenchmarkBtreeSearch
BenchmarkBtreeSearch-16           215227              5310 ns/op
BenchmarkMemorySearch
BenchmarkMemorySearch-16         5435004               220.3 ns/op
BenchmarkBinarySearch
BenchmarkBinarySearch-16           34378             34766 ns/op
PASS

ingress

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-ip2region
  namespace: sre
  annotations:
    kubernetes.io/ingress.class: "nginx" # 自动签发开关
    cert-manager.io/cluster-issuer: "letsencrypt-prod-http01"   # 自动签发开关
spec:
  tls:
  - hosts:
    - test.com
    secretName: ingress-tls-test-com # 需要修改
  rules:
  - host: test.com
    http:
      paths:
      - path: /
        backend:
          service:
            name: ipregion
            port: 
              number: 8080
        pathType: ImplementationSpecific