added map port and baremetal mode

This commit is contained in:
2023-12-22 00:13:57 +00:00
parent 83653866e6
commit 8c708c6f11
4 changed files with 62 additions and 1 deletions

View File

@@ -282,5 +282,17 @@ var CliAction = func(ctx *cli.Context) error {
}
}
if MAPPort != "" {
address, err := client.MAPPort(MAPPort)
if err != nil {
return err
}
if err != nil {
fmt.Println(err)
} else {
fmt.Println(address)
}
}
return nil
}

View File

@@ -20,7 +20,6 @@ var (
UpdateServerList bool
ServerList bool
SetDefaultConfig bool
BareMetalPublicKey string
NetworkInterface bool
ViewPlugin bool
TrackedContainers bool
@@ -30,6 +29,7 @@ var (
Groups bool
RemoveContainerGroup bool
RemoveGroup string
MAPPort string
//FRPProxy bool
// Generate only allowed in dev release
// -- REMOVE ON REGULAR RELEASE --
@@ -205,6 +205,13 @@ var AppConfigFlags = []cli.Flag{
EnvVars: []string{"REMOVE_GROUP"},
Destination: &RemoveGroup,
},
&cli.StringFlag{
Name: "MAPPort",
Aliases: []string{"mp"},
Usage: "Maps port for a specific port provided as the parameter",
EnvVars: []string{"MAPPORT"},
Destination: &MAPPort,
},
// Generate only allowed in dev release
// -- REMOVE ON REGULAR RELEASE --
&cli.StringFlag{