Skip to content

Commit

Permalink
debug2
Browse files Browse the repository at this point in the history
  • Loading branch information
john committed Nov 12, 2016
1 parent 2bd533c commit ff2e28e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ func init() {
flag.Var(&options.ServeNodes, "L", "listen address, can listen on multiple ports")
flag.BoolVar(&printVersion, "V", false, "print version")
flag.Parse()

fmt.Fprintf(os.Stderr, "%s\n", &options.ChainNodes)
if err := loadConfigureFile(configureFile); err != nil {
fmt.Fprintf(os.Stdout, "no configure file\n")
glog.Fatal(err)
}

Expand All @@ -42,13 +43,15 @@ func init() {

if flag.NFlag() == 0 {
flag.PrintDefaults()
fmt.Fprintf(os.Stdout, "no parameters\n")
return
}

if printVersion {
fmt.Fprintf(os.Stderr, "GOST %s (%s)\n", gost.Version, runtime.Version())
return
}
fmt.Fprintf(os.Stdout, "init finish\n")
}

func main() {
Expand All @@ -75,11 +78,11 @@ func main() {
if keyFile == "" {
keyFile = gost.DefaultKeyFile
}
cert, err := gost.LoadCertificate(certFile, keyFile)
if err != nil {
glog.Fatal(err)
}
server := gost.NewProxyServer(node, chain, &tls.Config{Certificates: []tls.Certificate{cert}})
//cert, err := gost.LoadCertificate(certFile, keyFile)
//if err != nil {
// glog.Fatal(err)
//}
server := gost.NewProxyServer(node, chain, &tls.Config{})
glog.Fatal(server.Serve())
}(serverNode)
}
Expand Down

0 comments on commit ff2e28e

Please sign in to comment.