Skip to content

Commit 8293ef4

Browse files
committed
feat: remove client param in frppc
1 parent 5a952a6 commit 8293ef4

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

cmd/frppc/cmd.go

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,25 @@ func initCommand() {
2222
apiScheme string
2323
)
2424

25-
clientCmd = &cobra.Command{
26-
Use: "client [-s client secret] [-i client id] [-a app secret] [-r rpc host] [-c rpc port] [-p api port]",
27-
Short: "run managed frpc",
25+
rootCmd = &cobra.Command{
26+
Use: "frp-panel-client [-s client secret] [-i client id] [-a app secret] [-r rpc host] [-c rpc port] [-p api port]",
27+
Short: "frp-panel-client is a frp panel client QwQ",
2828
Run: func(cmd *cobra.Command, args []string) {
2929
patchConfig(rpcHost, appSecret,
3030
clientID, clientSecret,
3131
apiScheme, rpcPort, apiPort)
3232
runClient()
3333
},
3434
}
35-
rootCmd = &cobra.Command{
36-
Use: "frp-panel-client",
37-
Short: "frp-panel-client is a frp panel client QwQ",
38-
}
39-
rootCmd.AddCommand(clientCmd)
40-
clientCmd.Flags().StringVarP(&clientSecret, "secret", "s", "", "client secret")
41-
clientCmd.Flags().StringVarP(&clientID, "id", "i", "", "client id")
42-
clientCmd.Flags().StringVarP(&rpcHost, "rpc", "r", "", "rpc host")
43-
clientCmd.Flags().StringVarP(&appSecret, "app", "a", "", "app secret")
35+
rootCmd.Flags().StringVarP(&clientSecret, "secret", "s", "", "client secret")
36+
rootCmd.Flags().StringVarP(&clientID, "id", "i", "", "client id")
37+
rootCmd.Flags().StringVarP(&rpcHost, "rpc", "r", "", "rpc host")
38+
rootCmd.Flags().StringVarP(&appSecret, "app", "a", "", "app secret")
4439

45-
clientCmd.Flags().IntVarP(&rpcPort, "rpc-port", "c", 0, "rpc port")
46-
clientCmd.Flags().IntVarP(&apiPort, "api-port", "p", 0, "api port")
40+
rootCmd.Flags().IntVarP(&rpcPort, "rpc-port", "c", 0, "rpc port")
41+
rootCmd.Flags().IntVarP(&apiPort, "api-port", "p", 0, "api port")
4742

48-
clientCmd.Flags().StringVarP(&apiScheme, "api-scheme", "e", "", "api scheme")
43+
rootCmd.Flags().StringVarP(&apiScheme, "api-scheme", "e", "", "api scheme")
4944
}
5045

5146
func initLogger() {

0 commit comments

Comments
 (0)