KatelynHaworth / go-tproxy

Linux Transparent Proxy library for Golang
MIT License
305 stars 59 forks source link

Missing DialTCP function #4

Open elico opened 5 years ago

elico commented 5 years ago

There is no DialTCP function which can create arbitrary tproxy connections. It can be used in HTTP proxies with a customized http.client .

KatelynHaworth commented 5 years ago

I assume you mean a plain old Dial(network, addr string) (net.Conn, error) or a DialContext(ctx context.Context, network, addr string) (net.Conn, error)?

elico commented 5 years ago

@LiamHaworth more or less. It should have both the source and destination addresses. I wrote: https://github.com/elico/go-linux-tproxy/blob/master/go-linux-tproxy.go#L145