package main import ( "proxy/cmd" ) func main() { //c1 := cmd.New("sh", "-c \"vde_plug /run/vde/sw_main.sock\"") c2 := cmd.New("vde_plug", "/run/vde/sw_proxy.sock") //c1 := cmd.New("ping", "localhost", "-c 10") //c2 := cmd.New("nc", "google.com", "80") //stdin, err := c2.StdinPipe() //if err != nil { // log.Fatal(err) //} //c1.Execute() c2.Execute() //time.Sleep(time.Second) //io.WriteString(stdin, "GET / HTTP/1.0\n\n") //time.Sleep(time.Second) //stdin.Close() //c1.WaitH() c2.WaitH() /* cmds := []*cmd.cmd{c1} for _, x := range cmds { go func(cmd *exec.Cmd) { fmt.Printf(x.String()) }(cmd) }*/ }