Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mwitkow/go-http-dialer
Go net.Dialer for HTTP(S) CONNECT Tunneling.
https://github.com/mwitkow/go-http-dialer
connect go golang grpc http proxy tls tunnel
Last synced: 3 days ago
JSON representation
Go net.Dialer for HTTP(S) CONNECT Tunneling.
- Host: GitHub
- URL: https://github.com/mwitkow/go-http-dialer
- Owner: mwitkow
- License: apache-2.0
- Created: 2016-05-24T14:30:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T18:34:49.000Z (4 months ago)
- Last Synced: 2024-08-05T09:14:49.271Z (3 months ago)
- Topics: connect, go, golang, grpc, http, proxy, tls, tunnel
- Language: Go
- Size: 20.5 KB
- Stars: 72
- Watchers: 4
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-network-stuff - **32**星
README
# HTTP CONNECT tunneling Go Dialer
[![Travis Build](https://travis-ci.org/mwitkow/go-http-dialer.svg)](https://travis-ci.org/mwitkow/go-http-dialer)
[![Go Report Card](https://goreportcard.com/badge/github.com/mwitkow/go-http-dialer)](http://goreportcard.com/report/mwitkow/go-http-dialer)
[![GoDoc](http://img.shields.io/badge/GoDoc-Reference-blue.svg)](https://godoc.org/github.com/mwitkow/go-http-dialer)
[![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)A `net.Dialer` drop-in that establishes the TCP connection over an [HTTP CONNECT Tunnel](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling).
## Why?!
Some enterprises have fairly restrictive networking environments. They typically operate [HTTP forward proxies](https://en.wikipedia.org/wiki/Proxy_server) that require user authentication. These proxies usually allow HTTPS (TCP to `:443`) to pass through the proxy using the [`CONNECT`](https://tools.ietf.org/html/rfc2616#section-9.9) method. The `CONNECT` method is basically a HTTP-negotiated "end-to-end" TCP stream... which is exactly what [`net.Conn`](https://golang.org/pkg/net/#Conn) is :)
## But, really, why?
Because if you want to call [gRPC](http://www.grpc.io/) 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
- [x] unencrypted connection to proxy (e.g. `http://proxy.example.com:3128`
- [x] TLS connection to proxy (customizeable) (e.g. `https://proxy.example.com`)
- [x] customizeable for `Proxy-Authenticate`, with challenge-response semantics
- [x] 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](LICENSE) file for details.