Code Monkey home page Code Monkey logo

go-http-dialer's Introduction

HTTP CONNECT tunneling Go Dialer

Travis Build Go Report Card GoDoc Apache 2.0 License

A net.Dialer drop-in that establishes the TCP connection over an HTTP CONNECT Tunnel.

Why?!

Some enterprises have fairly restrictive networking environments. They typically operate HTTP forward proxies that require user authentication. These proxies usually allow HTTPS (TCP to :443) to pass through the proxy using the CONNECT method. The CONNECT method is basically a HTTP-negotiated "end-to-end" TCP stream... which is exactly what net.Conn is :)

But, really, why?

Because if you want to call gRPC services which are exposed publicly over :443 TLS over an HTTP proxy, you can't.

Also, this allows you to call any TCP service over HTTP CONNECT... if your proxy allows you to ¯\(ツ)/¯

Supported features

  • unencrypted connection to proxy (e.g. http://proxy.example.com:3128
  • TLS connection to proxy (customizeable) (e.g. https://proxy.example.com)
  • customizeable for Proxy-Authenticate, with challenge-response semantics
  • out of the box support for Basic auth
  • appropriate RemoteAddr remapping

Usage with gRPC

License

go-http-dialer is released under the Apache 2.0 license. See the LICENSE file for details.

go-http-dialer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-http-dialer's Issues

Not a drop in replacement

Okay, to be fair, I am pretty new at Go, so pardon my naiveté.

I am trying to use http_dialer#New as a drop in replacement for a constructor that can accept a parameter of type *net.Dialer. However, when I use it, I get:

cannot use http_dialer.New(forwarder.Proxy, nil) (type *http_dialer.HttpTunnel) as type *net.Dialer in field value

I tried casting it (net.Dialer(*http_dialer.New(forwarder.Proxy, nil))), but I get:

cannot convert *http_dialer.New(forwarder.Proxy, nil) (type http_dialer.HttpTunnel) to type net.Dialer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.