BREAKING CHANGE(smartproxy/configuration): Migrate SmartProxy to a fully unified route‐based configuration by removing legacy domain-based settings and conversion code. CertProvisioner, NetworkProxyBridge, and RouteManager now use IRouteConfig exclusively, and related legacy interfaces and files have been removed.

This commit is contained in:
2025-05-10 07:56:21 +00:00
parent 455858af0d
commit a2eb0741e9
11 changed files with 331 additions and 499 deletions

View File

@ -54,8 +54,30 @@ export function createCertificateProvisioner(
} = acmeOptions;
// Create and return the certificate provisioner
// Convert domain configs to route configs for the new CertProvisioner
const routeConfigs = domainConfigs.map(config => {
// Create a basic route config with the minimum required properties
return {
match: {
ports: 443,
domains: config.domains
},
action: {
type: 'forward' as const,
target: config.forwarding.target,
tls: {
mode: config.forwarding.type === 'https-terminate-to-https' ?
'terminate-and-reencrypt' as const :
'terminate' as const,
certificate: 'auto' as 'auto'
},
security: config.forwarding.security
}
};
});
return new CertProvisioner(
domainConfigs,
routeConfigs,
port80Handler,
networkProxyBridge,
certProvider,