|
|
@ -9,6 +9,8 @@ import (
|
|
|
|
"io/ioutil"
|
|
|
|
"io/ioutil"
|
|
|
|
"net"
|
|
|
|
"net"
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"os/signal"
|
|
|
|
|
|
|
|
"syscall"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/fangdingjun/go-log"
|
|
|
|
"github.com/fangdingjun/go-log"
|
|
|
|
"github.com/fangdingjun/obfssh"
|
|
|
|
"github.com/fangdingjun/obfssh"
|
|
|
@ -154,6 +156,12 @@ func main() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}(lst)
|
|
|
|
}(lst)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
select {}
|
|
|
|
|
|
|
|
|
|
|
|
ch := make(chan os.Signal, 2)
|
|
|
|
|
|
|
|
signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM)
|
|
|
|
|
|
|
|
select {
|
|
|
|
|
|
|
|
case s := <-ch:
|
|
|
|
|
|
|
|
log.Printf("received signal %s, exit.", s)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|