Git Product home page Git Product logo

http-to-https-proxy's Introduction

http-to-https-proxy

A proxy that upgrades HTTP connections to HTTPS for systems which cannot make HTTPS requests.

Running the proxy

Default Configuration

./http-to-https-proxy 
2019/11/03 22:54:50 Starting HTTP to HTTPS proxy listening to 80, forward to 443 with listening buffer 5000
2019/11/03 22:54:50 You can supply the listening and forwarding port and buffer size as 3 command line arguments
2019/11/03 22:54:51 Received request to route to host ABC.com and url /api/endpoint
2019/11/03 22:54:52 End of handler
...

By default, proxy will listen to HTTP requests on port 80 and retransmit HTTPS via port 443. Buffer size of 4096 is the buffer to receive destination server's response chunks before forwarding back original client.

Modify ports and buffer size

go run http-to-https-proxy.go 90 445 5000
2019/11/03 22:56:05 HTTP to HTTPS proxy v0.2 listening to 90, forward to 445 with listening buffer 5000
2019/11/03 22:56:05 You can supply the listening and forwarding port and buffer size as 3 command line arguments
...

All 3 arguments must be specified even if you only wish to change one of the values.

http-to-https-proxy.exe -i
2023/03/30 14:47:36 HTTP to HTTPS proxy v0.2 listening to 80, forward to 443 with listening buffer 4096
2023/03/30 14:47:36 Allow insecure TLS certificates
2023/03/30 14:47:36 You can supply the listening port, forward port, buffer size, insecure -i cert as command line args

If the server you are connecting to is using expired/insecure TLS certificates. You can add -i argument to allow those connections.

Compiling

Just install the latest Go compiler for your platform. The latest at the time of writing is 1.20.2. THe following was compiled on windows/amd64 platform using Powershell

$env:GOOS="windows"
$env:GOARCH="amd64"
go build http-to-https-proxy.go

$env:GOOS="windows"
$env:GOARCH="386"
go build http-to-https-proxy.go

$env:GOOS="darwin"
$env:GOARCH="amd64"
go build http-to-https-proxy.go

$env:GOOS="darwin"
$env:GOARCH="arm64"
go build http-to-https-proxy.go

$env:GOOS="linux"
$env:GOARCH="amd64"
go build http-to-https-proxy.go

$env:GOOS="linux"
$env:GOARCH="arm"
go build http-to-https-proxy.go

$env:GOOS="linux"
$env:GOARCH="arm64"
go build http-to-https-proxy.go

$env:GOOS="linux"
$env:GOARCH="riscv64"
go build http-to-https-proxy.go

http-to-https-proxy's People

Contributors

yeokm1 avatar

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.