You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
674 B

2 years ago
package main
import (
"log"
"os"
"os/signal"
"proxy_socks5/ui"
"syscall"
"time"
)
const (
name = "Socks5"
version = "v1.0.0"
)
func main() {
defer func() {
if p := recover(); p != nil {
log.Printf("panic: %v\n", p)
}
}()
exitCh := make(chan os.Signal, 10)
signal.Notify(exitCh, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT) //syscall.SIGUSR1, syscall.SIGUSR2)
gui := ui.New(
ui.Version(version),
ui.Name(name),
ui.OnClose(func() {
log.Printf("gui OnClose callback")
}),
)
os.Exit(func() (code int) {
code = gui.Run(exitCh)
log.Printf("exit code: %v", code)
2 years ago
time.Sleep(1 * time.Millisecond)
2 years ago
return
}())
}