/* * Copyright (c)2013-2020 ZeroTier, Inc. * * Use of this software is governed by the Business Source License included * in the LICENSE.TXT file in the project's root directory. * * Change Date: 2025-01-01 * * On the date above, in accordance with the Business Source License, use * of this software will be governed by version 2.0 of the Apache License. */ /****/ package cli import ( "fmt" "zerotier/pkg/zerotier" ) func Locator(args []string) int { if len(args) < 1 { Help() return 1 } switch args[0] { case "new": if len(args) < 3 { Help() return 1 } id := cliGetIdentityOrFatal(args[1]) if !id.HasPrivate() { pErr("identity must include secret key to sign locator") return 1 } var eps []*zerotier.Endpoint for i:=2;i