ipn/ipnlocal, wgengine/netstack: start handling ports for future serving

Updates tailscale/corp#7515

Change-Id: I966e936e72a2ee99be8d0f5f16872b48cc150258
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-11-07 15:32:53 -08:00
committed by Brad Fitzpatrick
parent acf5839dd2
commit 2daf0f146c
6 changed files with 239 additions and 9 deletions
+9 -1
View File
@@ -568,5 +568,13 @@ func runDevStoreSet(ctx context.Context, args []string) error {
if !devStoreSetArgs.danger {
return errors.New("this command is dangerous; use --danger to proceed")
}
return localClient.SetDevStoreKeyValue(ctx, args[0], args[1])
key, val := args[0], args[1]
if val == "-" {
valb, err := io.ReadAll(os.Stdin)
if err != nil {
return err
}
val = string(valb)
}
return localClient.SetDevStoreKeyValue(ctx, key, val)
}