package main

import (
	"log"

	"dyproxy/modules/proxy"

	"github.com/spf13/cobra"
)

func main() {
	cmd := &cobra.Command{
		Use:   "proxy",
		Short: "serve proxy",
		RunE:  proxy.ServeE,
	}
	cmd.Flags().StringP("host", "H", "https://f.jdwan.com", "default post data to host")
	cmd.Flags().BoolP("debug", "D", false, "debug mode")
	cmd.Flags().IntP("duration", "d", 10, "fans fetch duration")

	if err := cmd.Execute(); err != nil {
		log.Fatal(err)
	}
}
