rekby / lets-proxy2

Reverse proxy with automatically obtains TLS certificates from Let's Encrypt
MIT License
97 stars 18 forks source link

where is the documentation? #168

Closed JustinWebDev closed 2 years ago

JustinWebDev commented 2 years ago

Maybe I'm blind, but I don't see any link to documentation, and lets-proxy.exe --help doesn't show much.

rekby commented 2 years ago

Hello. It hasn't dedicated documentation now.

You can see Commented default config.

It available by command:

lets-proxy2 --print-default-config

or write to file:
let-proxy2 --print-default-config > default_config.toml

It is help for you?

JustinWebDev commented 2 years ago

It is helpful, but not complete. I don't know how to interpret some of the settings, some look like duplicate values, and some look incomplete.

My main two concerns right now (to just get a working system), are:

  1. How to config a reverse proxy using subdomains.
  2. How to define the "main domain" (mydomain.com) for TLS certs. I see where subdomains are defined.

And, why would someone use lets-proxy_windows_amd64.zip vs lets-proxy_windows_amd64-go1.10.zip?

rekby commented 2 years ago

If you want just reverse-proxy without specials - you can simple start lets-proxy.exe (start as service - as option) without any config.

The lets-proxy will handle all requests to https on standard 443 on all IPs port, decrypt it, then forward as http request to port 80 same IP. It no need any special config or list your domain and subdomains.

For example - you have server with IP 1.2.3.4.

  1. You start lets-proxy.exe (without any config/options etc). It will listen on 1.2.3.4:443.
  2. Somebody will request to your domain https://domain.com (domain as A record in dns to ip 1.2.3.4).
  3. lets-proxy accept the request, check A record for domain.com, get TLS cert from lets-proxy for domain domain.com
  4. proxy the request to 1.2.3.4:80 as http-request (and set some additional headers about original request).

if it will request for https://asd.comain.com - same scenario will work, no need additional configurations for new domains/subdomains.

rekby commented 2 years ago

lets-proxy_windows_amd64-go1.10.zip need only for old system (for example windows 2013), go 1.11 and newer doesn't support old OS and program, compiled from newer language version often crash or even can't start.

I need support old OS because my main customer use it.

JustinWebDev commented 2 years ago

Each subdomain maps to a different service, so I can't use the OOTB configuration. I'll have to specify a service for each subdomain.

(The info you gave though is very helpful in understanding its basic operation. Thanks.)

rekby commented 2 years ago

lets proxy support only docker by-domain balance (redirect traffic to docker container with special label), but doesn't support manual per-domain redirect.

For solve the problem per-domain redirect you can use lets proxy for handle https, then other software (nginx/envoy) for per domain balance http traffic.

JustinWebDev commented 2 years ago

That's disappointing to hear. Thanks for the info.