Skip to content

portfwdserver: consolidate bicopy and tcpproxy packages into one #3715

@AkihiroSuda

Description

@AkihiroSuda

// FIXME: consolidate bicopy and tcpproxy into one
//
// The bicopy package does not seem to work with `w3m -dump`:
// https://github.com/lima-vm/lima/issues/3685
//
// However, the tcpproxy package can't pass the CI for WSL2 (experimental):
// https://github.com/lima-vm/lima/pull/3686#issuecomment-3034842616
if wsl2, _ := seemsWSL2(); wsl2 {
bicopy.Bicopy(rw, conn, nil)
} else {
proxy := tcpproxy.DialProxy{DialContext: func(_ context.Context, _, _ string) (net.Conn, error) {
return conn, nil
}}
proxy.HandleConn(rw)
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions