mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-14 07:33:36 +01:00
Letsencrypt Certificates #12
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zQueal on GitHub (Sep 16, 2024).
I've been testing the proxy and have been continually starting and stopping the binary which has landed me in the dog house;
So it looks like I've been banned from letsencrypt for 168 hours.
==========================
Would it perhaps be beneficial to add a
--stagingflag to use the letsencrypt staging server (acme-staging-v02) instead of live (acme-v02.api)? This would increase the new order certificates to 1,500 new orders per 3 hour period versus the 5 which you get from live.Or maybe just logic which searches for
cert.crtandpriv.keyand foregoes grabbing another cert if they're found?Appreciate your work. Loving the proxy so far.
@yusing commented on GitHub (Sep 16, 2024):
please see compose.example.yml, you should mount the ./certs folder to container, in order to store obtained certs: "- ./certs:/app/certs". And happy to inform you that, v0.5-rc1 is out, I may consider this version is way better than v0.4. You may want to give it a try
@zQueal commented on GitHub (Sep 16, 2024):
I'm not using docker and built from git, so I'm using the v0.5 branch which is the default--not sure if this is what you meant or not.
So what I've been experiencing is running the go-proxy binary will pull new certificates on every runtime because
autocertis set in the config regardless of whether or not I already have certs located incerts/or not. This is a bit counter productive, IMO. The proxy should checkcerts/and if there is a key/crt pair, it should not runautocertwhen you launch the binary.As it stands, it processes a neworder to letsencrypt even though you already have a valid cert.
@yusing commented on GitHub (Sep 16, 2024):
If there are certs already in certs/, autocert will still run and check for existing cert and its expiry date. It should not request a new cert if the existing one is not expired, I'll check the code again to see if there's a bug.
If it is still trying to obtain a new cert, check the working directory when you run go-proxy.
@zQueal commented on GitHub (Sep 16, 2024):
This seems to be what I'm experiencing.
I pulled the repo to
/opt/proxyand ran the setup. I pulled the initial certificates and they are in/opt/proxy/certs/, but each time I run./go-proxyit query's letsencrypt for new certificates.@yusing commented on GitHub (Sep 16, 2024):
Sorry for your bad experience, please give me some time to check and fix. Thank you for trying out
go-proxy.@zQueal commented on GitHub (Sep 16, 2024):
It's been a really great experience so far. Really loving the project!
@yusing commented on GitHub (Sep 16, 2024):
Hi, I have just tested it out and did not face the same issue as yours,
Above is the second time starting
go-proxy(using cert obtained from the first time).And my config is:
@zQueal commented on GitHub (Sep 16, 2024):
I removed the entire environment and started over from a fresh git pull. I wasn't able to replicate the previous error, or rather I should say I can't get that far anymore;
config.yml;
providers.yml;
Do you see anything that jumps out at you? I'm at a loss.
@yusing commented on GitHub (Sep 17, 2024):
I've checked my code for autocert, there are a few bugs. I'm working on it, should inform you in case they're fixed.
@yusing commented on GitHub (Sep 17, 2024):
Hi, it should be fixed, please
git pullagain and test it out.@zQueal commented on GitHub (Sep 17, 2024):
OK. I've pulled the new tag, and built with go.
First run;
On second run, the previously pulled certificates were used. 👍🏻 Awesome!