Skip to content

Conversation

@marshall-lee
Copy link
Contributor

@marshall-lee marshall-lee commented Oct 1, 2025

📦 Package Details

Maintainer: @tohojo

Description:
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 PR proposes to add a listen_port configuration option and pass it as --httpport or --tlsport depending on validation_method chosen.

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

  • OpenWrt Version:
  • OpenWrt Target/Subtarget:
  • OpenWrt Device:

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/<your-package>/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (e.g., subject line, commit description, etc.)
    We must try to upstream patches to reduce maintenance burden.

@marshall-lee marshall-lee force-pushed the acme-acmesh/listen_port-opt branch 2 times, most recently from 8c931dd to fd74e5d Compare October 1, 2025 15:43
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]>
@marshall-lee marshall-lee force-pushed the acme-acmesh/listen_port-opt branch from fd74e5d to 00a0750 Compare October 1, 2025 17:51
Copy link
Contributor

@tohojo tohojo left a 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?

@tohojo tohojo merged commit 6a13be2 into openwrt:master Oct 2, 2025
13 checks passed
@stokito
Copy link
Contributor

stokito commented Oct 4, 2025

I added the new method and option to the Luci openwrt/luci#7147 (comment)

@marshall-lee marshall-lee deleted the acme-acmesh/listen_port-opt branch October 4, 2025 12:21
;;
"standalone")
set -- "$@" --standalone --listen-v6
set -- "$@" --standalone --listen-v6 --httpport "$listen_port"
Copy link

@iav iav Oct 5, 2025

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?

Copy link
Contributor

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

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants