Skip to content

Crashes when using custom net.conn #50

@segator

Description

@segator

It crashes when using custom net.conn implementation that does not return net.TCPAddr when con.LocalAddr()

Crash example

panic: interface conversion: net.Addr is net.pipeAddr, not *net.TCPAddr

goroutine 7 [running]:
github.com/armon/go-socks5.(*Server).handleConnect(0xc00019a320, {0xfe4fd0, 0xc00009e0d0}, {0x1aae30650d8, 0xc000006020}, 0xc0002d2040)
	C:/Users/aymerici/go/pkg/mod/github.com/armon/go-socks5@v0.0.0-20160902184237-e75332964ef5/request.go:194 +0x950

The problem is in this Line

	local := target.LocalAddr().(*net.TCPAddr)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions