-
Notifications
You must be signed in to change notification settings - Fork 3.8k
acme-acmesh: support listen_port option #27582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
acme-acmesh: support listen_port option #27582
Conversation
8c931dd to
fd74e5d
Compare
listen_port option allows to redefine the default 80/443 port used in standalone/alpn challenges. It's also useful for other types of challenges which require accepting a connection on some TCP port so we need to expose it via nft as well. Signed-off-by: Vladimir Kochnev <[email protected]>
It's possible that staging_moved variable is undeclared while being accessed. Lets explicitly declare it. Signed-off-by: Vladimir Kochnev <[email protected]>
acme.sh supports --httpport and --tlsport options to be used together with --standalone and --alpn modes respectively. This is useful if we're behind a reverse proxy or smth like that or if we cannot bind to standard 80 or 443 port for some other reason. This change makes listen_port from configuration to be passed as either --httpport or --tlsport Signed-off-by: Vladimir Kochnev <[email protected]>
fd74e5d to
00a0750
Compare
tohojo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this seems like a clean way to handle all the different permutations - nice!
@stokito any objections?
|
I added the new method and option to the Luci openwrt/luci#7147 (comment) |
| ;; | ||
| "standalone") | ||
| set -- "$@" --standalone --listen-v6 | ||
| set -- "$@" --standalone --listen-v6 --httpport "$listen_port" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if no ipv6, ipv4-only device?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be ok. The options adds TCP6-LISTEN to socat
https://github.com/acmesh-official/acme.sh/blob/a91ab544499b9041afaf50bda9b16ea03867bb39/acme.sh#L2555
And it should listen both v4 and v6 https://superuser.com/a/1778944
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
📦 Package Details
Maintainer: @tohojo
Description:
acme.sh supports
--httpportand--tlsportoptions to be used together with--standaloneand--alpnmodes respectively.This is useful if we're behind a reverse proxy or smth like that or if we cannot bind to standard 80 or 443 port for some other reason.
This PR proposes to add a
listen_portconfiguration option and pass it as--httpportor--tlsportdepending onvalidation_methodchosen.See https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert and https://github.com/acmesh-official/acme.sh/wiki/TLS-ALPN-without-downtime for details.
Replaces: #27559
Replaces: #20786
🧪 Run Testing Details
✅ Formalities
If your PR contains a patch:
git am(e.g., subject line, commit description, etc.)
We must try to upstream patches to reduce maintenance burden.