|
@@ -29,11 +29,12 @@ The trojan role SHALL download and install the trojan-go binary from release art
|
|
|
- **THEN** the Trojan service is restarted
|
|
- **THEN** the Trojan service is restarted
|
|
|
|
|
|
|
|
### Requirement: TLS certificate is provisioned via Let's Encrypt
|
|
### Requirement: TLS certificate is provisioned via Let's Encrypt
|
|
|
-The trojan role SHALL use certbot to obtain a TLS certificate for the domain configured on each individual host. After provisioning or renewal, the certificate and key SHALL be copied to `/etc/trojan-go/tls/` so the service user can read them.
|
|
|
|
|
|
|
+The trojan role SHALL use certbot to obtain a TLS certificate for the domain configured on each individual host. The trojan role SHALL ensure port 80 is allowed through UFW before attempting certificate provisioning. After provisioning or renewal, the certificate and key SHALL be copied to `/etc/trojan-go/tls/` so the service user can read them.
|
|
|
|
|
|
|
|
-#### Scenario: Certificate provisioning with per-host domain
|
|
|
|
|
-- **WHEN** the trojan role runs on a host with `trojan_domain: "proxy1.example.com"`
|
|
|
|
|
-- **THEN** certbot obtains a TLS certificate for `proxy1.example.com`
|
|
|
|
|
|
|
+#### Scenario: Certificate provisioning with UFW allowing port 80
|
|
|
|
|
+- **WHEN** the trojan role runs on a host with `trojan_domain` configured
|
|
|
|
|
+- **THEN** port 80 is allowed through UFW before certbot attempts ACME validation
|
|
|
|
|
+- **THEN** certbot obtains a TLS certificate for the configured domain
|
|
|
- **THEN** the certificate and key are copied to `/etc/trojan-go/tls/` owned by the trojan service user
|
|
- **THEN** the certificate and key are copied to `/etc/trojan-go/tls/` owned by the trojan service user
|
|
|
|
|
|
|
|
#### Scenario: Certificate provisioning on a second host with different domain
|
|
#### Scenario: Certificate provisioning on a second host with different domain
|