Giter VIP home page Giter VIP logo

tlsproxy's Introduction

CI Release Version

TLS Proxy

Installation

Just clone the project and make a build

git clone [email protected]:cesbit/tlsproxy.git
cd tlsproxy
go build

Example usage

The following assumes a server.crt and server.key and will forward 443->80 and 8000->8000 to just-a-host.local

TLSPROXY_TARGET=just-a-host.local \
TLSPROXY_PORTS=443:80,8000 \
TLSPROXY_CERT_FILE=server.crt \
TLSPROXY_KEY_FILE=server.key \
tlsproxy

Environment variable

Environment Description
TLSPROXY_TARGET Address of the host.
TLSPROXY_PORTS Specify the ports you want to secure with TLS. You can list multiple ports separated by commas. Use the following syntax: <outside>:<inside> (example 443:80). If the outside and inside ports are the same, you can simply specify the port number (example 8000).
TLSPROXY_CERT_FILE Path to the certificate file (example /certs/server.crt).
TLSPROXY_KEY_FILE Path to the key file (example /certs/server.key).
TLSPROXY_DEBUG A value of 1 or enable will enable debug logging.

Certificates

For testing, one can create certificates using the following commands:

Generate private key (.key) Key considerations for algorithm "RSA" ≥ 2048-bit

openssl genrsa -out server.key 2048

Key considerations for algorithm "ECDSA" (X25519 || ≥ secp384r1) https://safecurves.cr.yp.to/ List ECDSA the supported curves (openssl ecparam -list_curves)

openssl ecparam -genkey -name secp384r1 -out server.key

Generation of self-signed(x509) public key (PEM-encodings .pem|.crt) based on the private (.key)

openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650

tlsproxy's People

Contributors

joente avatar

Watchers

 avatar  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.