Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
reverse-proxy CLI with internal TLS #3589
Comments
Note that Caddy uses its own ("internal") certificates by default if the hostname is like |
While using As for the flag name, anything that works is fine. |
I can work on this. Since I'm still trying to find my way around the codebase, is there a Slack where I can ask questions if needed? |
@divbhasin Yeah there is. Although I can probably just answer the question of where in the code base to look right here. :) This whole file is the caddy/modules/caddyhttp/reverseproxy/command.go Lines 57 to 63 in 24f3478 |
@mholt So I have the flag added, but I don't know how to set up the internal certificate. I see that caddy/caddyconfig/httpcaddyfile/builtins.go Lines 99 to 102 in 24f3478 caddy/caddyconfig/httpcaddyfile/builtins.go Lines 390 to 395 in 24f3478 But, the function where those snippets come from returns an array of ConfigValue. Are there any "global" config vals that contain the cert_issuer which can be modified? |
@divbhasin That's the Caddyfile adapter; the command line doesn't use the Caddyfile. If you were writing a Caddyfile directive that changed the certificate issuer for a site, then yes you would use that. But in this case you just need the JSON. What I would do is make a config (using the Caddyfile, for example) that does what you want. Then run |
I really like being able to use
caddy reverse-proxy
for development purposes, and it would be incredibly useful if it could also serve over HTTPS without LE ACME (e.g. using the internal CA).I'm suggesting something along the lines of
caddy reverse-proxy --internal --from example.com:443 --to 192.168.0.100:8080
, where Caddy would generate a certificate internally, like it would with this Caddyfile: