Skip to content

mazlum/cdnstrip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDN Strip

Go Report Card License

Go module for striping CDN IP ranges.

DEMO

Currently Stripping

  • Cloudflare
  • Cloudfront
  • Akamai
  • Azure CDN
  • DDOS Guard
  • Fastly
  • Incapsula
  • Max CDN

Install

go get github.com/mazlum/cdnstrip

Usage Parameters

  -i string
    	Input [FileName|IP|CIDR]
  -o string
    	Output file name (default "filtered.txt")
  -skip-cache
    	Skip loading cache file for CDN IP ranges
  -t int
    	Number of threads (default 1)

Example Code

package main

import (
	"log"

	"github.com/mazlum/cdnstrip/cdn"
)

func main() {

	ip := "1.1.1.1"

	cdnRanges, err := cdn.LoadAll()
	if err != nil {
		log.Fatal(err)
	}

	if cdn.Check(ip, cdnRanges) {
		print("It's CDN IP !")
	} else {
		print("It's not CDN IP !")
	}

}

Authors

About

Go module for striping CDN IP ranges.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages