proxyport/main.go

25 lines
437 B
Go
Raw Normal View History

2023-01-18 14:13:22 +08:00
package main
import (
2023-01-19 11:34:30 +08:00
"flag"
2023-04-21 18:20:54 +08:00
"git.makemake.in/kzkzzzz/mycommon/myconf"
"git.makemake.in/kzkzzzz/mycommon/mylog"
2023-01-18 14:13:22 +08:00
"proxyport/app"
)
2023-01-19 11:34:30 +08:00
var configPath string
2023-01-18 14:13:22 +08:00
func main() {
2023-01-19 11:34:30 +08:00
flag.StringVar(&configPath, "c", "config.toml", "配置文件路径")
flag.Parse()
2024-02-19 19:11:43 +08:00
cfg := mylog.DefaultConfig
cfg.ConsoleWriter = nil
cfg.NeedLogFile = true
mylog.Init("debug", cfg)
2023-01-19 11:34:30 +08:00
myconf.Init(configPath, &app.ProxyMap)
2023-04-18 20:55:50 +08:00
defer mylog.Flush()
2023-01-18 14:32:14 +08:00
app.Run()
2023-01-18 14:13:22 +08:00
}