Skip to content

Define external Dial function to allow next hop Proxy for https connection #19

@huaraz

Description

@huaraz

I see in proxy.go that outbound connections are made using local proxy environment variable. This does not work for https:// connection.

    prx := &Proxy{          
            Rt: &http.Transport{TLSClientConfig: &tls.Config{},
                    Proxy: http.ProxyFromEnvironment},
            MitmChunked: true,
            signer:      NewCaSignerCache(1024),
    }

To use the proxy for TLS connection something like https://github.com/wrouesnel/go.connect-proxy-scheme is required which can be defined in the Proxy structure and overwritten from default net.Dial.

This would then be used in context.go

    case ConnectProxy:
            conn, err := **ctx.Prx.Dial**("tcp", host)
            if err != nil {

and also MITM outbound connection.

Would that make sense ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions