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 ff2e28e commit 0252f1e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Binary file modified gost-heroku
Binary file not shown.
19 changes: 12 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,25 @@ func main() {
var wg sync.WaitGroup
for _, ns := range options.ServeNodes {
serverNode, err := gost.ParseProxyNode(ns)
host := os.Getenv("HOST")
port := os.Getenv("PORT")
bind := fmt.Sprintf("%s:%s", host, port)
fmt.Fprintf(os.Stdout, "bind address: %s\n", bind)
serverNode.Addr = bind
if err != nil {
glog.Fatal(err)
}

wg.Add(1)
go func(node gost.ProxyNode) {
defer wg.Done()
certFile, keyFile := node.Get("cert"), node.Get("key")
if certFile == "" {
certFile = gost.DefaultCertFile
}
if keyFile == "" {
keyFile = gost.DefaultKeyFile
}
//certFile, keyFile := node.Get("cert"), node.Get("key")
//if certFile == "" {
// certFile = gost.DefaultCertFile
//}
//if keyFile == "" {
// keyFile = gost.DefaultKeyFile
//}
//cert, err := gost.LoadCertificate(certFile, keyFile)
//if err != nil {
// glog.Fatal(err)
Expand Down

0 comments on commit 0252f1e

Please sign in to comment.