We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, how do i make this work?
It's returning gibberish. Any solutions to make uds work too?
func forwardTcp(conn net.Conn, connectTo string) { if debug { log.Print("Accepted connection\n") } //fwd, err := net.DialTimeout("tcp", connectTo, timeout) addrunix, err := net.ResolveUnixAddr("unix", connectTo) fwd, err := net.DialUnix("unix", nil, addrunix) if err != nil { log.Printf("Conection to `%s` failed: %v\n", connectTo, err) conn.Close() return } close := func() { fwd.Close() conn.Close() } go func() { defer close() w, err := io.Copy(fwd, conn) if debug { log.Printf("Incoming TCP connection closed: %v; %v bytes forwarded\n", err, w) } }() go func() { defer close() w, err := io.Copy(conn, fwd) if debug { log.Printf("Outgoing TCP connection closed: %v; %v bytes forwarded\n", err, w) } }() }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, how do i make this work?
It's returning gibberish. Any solutions to make uds work too?
The text was updated successfully, but these errors were encountered: