Go package that detects iCloud Private Relay IP address based on ICloud's egress ip range list. More information about how to prepare your network for iCloud Private Relay can be found here.
go get github.com/kmikiy/go-icloud-private-relay
package main
import (
"fmt"
"github.com/kmikiy/go-icloud-private-relay/relay"
)
func main() {
isICloudPrivateRelayAddress := relay.IsICloudPrivateRelayAddress("172.225.18.12")
fmt.Println(isICloudPrivateRelayAddress) // true
isICloudPrivateRelayAddress = relay.IsICloudPrivateRelayAddress("142.251.39.14")
fmt.Println(isICloudPrivateRelayAddress) // false
}