This commit is contained in:
Özgür Kesim 2013-07-30 13:20:53 +02:00
parent 87e9f8152f
commit 7648733aaa

View File

@ -2,10 +2,10 @@ package main
import (
"crypto/tls"
"log"
"net"
"flag"
"fmt"
"log"
"net"
"os"
"os/exec"
"syscall"
@ -46,7 +46,7 @@ func main() {
// start listening
sport := fmt.Sprintf(":%d", *port)
sock, err := tls.Listen("tcp", sport , tconf)
sock, err := tls.Listen("tcp", sport, tconf)
if err != nil {
fmt.Println("error with tcp-socket:", err)
os.Exit(3)
@ -70,8 +70,6 @@ func main() {
}
}
// accept-loop
for {
conn, err := sock.Accept()
@ -105,7 +103,7 @@ func handleConnection(conn net.Conn) {
log.Println(err)
return
}
cmd.Env = make([]string,0)
cmd.Env = make([]string, 0)
cmd.Env = append(cmd.Env, "PATH="+os.Getenv("PATH"))
cmd.Env = append(cmd.Env, "PROTO=TCP")
cmd.Env = append(cmd.Env, "TCPLOCALIP="+lh)