Skip to content

[x/net] How to proxy udp traffic over a tcp-based socks5? #38015

@saito-mayumi

Description

@saito-mayumi

What version of Go are you using (go version)?

$ go version
go version go1.14 darwin/amd64

What did you do?

dialer, _ := proxy.SOCKS5("tcp", "localhost:1080", nil, nil)

_, err := dialer.Dial("udp", "8.8.8.8:53")
fmt.Println(err.Error()) // socks connect udp localhost:1080->8.8.8.8:53: network not implemented

What did you expect to see?

err should be nil. I wish that it can relay my udp traffic over my TCP SOSCKS5 proxy.

What did you see instead?

socks connect udp localhost:1080->8.8.8.8:53: network not implemented

Here is the code I found which raised the error. I'm looking forward to ways which are able to approach my goal.

https://github.com/golang/net/blob/a7b16738d86b947dd0fadb08ca2c2342b51958b6/internal/socks/socks.go#L242

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