Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
huaraz opened this issue Dec 9, 2024 · 0 comments

Comments

@huaraz
Copy link

huaraz commented Dec 9, 2024

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant