func main() { flag.Parse() core.PrintVersion() if *version { return } if point := startV2Ray(); point != nil { osSignals := make(chan os.Signal, 1) signal.Notify(osSignals, os.Interrupt, os.Kill, syscall.SIGTERM) <-osSignals point.Close() } log.Close() }
func main() { flag.Parse() core.PrintVersion() if *version { return } //go func() { // http.ListenAndServe(":6060", nil) //}() if point := startV2Ray(); point != nil { osSignals := make(chan os.Signal, 1) signal.Notify(osSignals, os.Interrupt, os.Kill, syscall.SIGTERM) <-osSignals point.Close() } log.Close() }