func wgGenIP(network string) string {
	_, subnet, e := net.ParseCIDR(network)
	lg.err("ParseCIDR", e)
	seed := rand.NewSource(time.Now().UnixNano())
	machine := rand.New(seed)
	uint32IP := binary.BigEndian.Uint32(subnet.IP) | (machine.Uint32() & (^binary.BigEndian.Uint32(subnet.Mask)))
	binaryIP := []byte{0, 0, 0, 0}
	binary.BigEndian.PutUint32(binaryIP, uint32IP)
	return net.IP(binaryIP).String()
}
GenIP returns random IP range in the specified subnet
package main
import (
	"encoding/binary"
	"fmt"
	"math/rand"
	"net"
	"strconv"
	"strings"
	"time"
)
func cidr(network string) string {
	_, subnet, e := net.ParseCIDR(network)
	lg.err("ParseCIDR", e)
	return subnet.String()
}