#5387 -- Pass hostname info to Shoutcast via auto-generated config.

This commit is contained in:
Buster Neece 2022-11-01 16:03:25 -05:00
parent fa3d607784
commit f660089e46
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
1 changed files with 11 additions and 0 deletions

View File

@ -108,6 +108,9 @@ final class Shoutcast extends AbstractFrontend
[$certPath, $certKey] = Acme::getCertificatePaths();
$publicUrl = $this->getPublicUrl($station);
$urlHost = $publicUrl->getHost();
$config = [
'password' => $frontendConfig->getSourcePassword(),
'adminpassword' => $frontendConfig->getAdminPassword(),
@ -125,8 +128,16 @@ final class Shoutcast extends AbstractFrontend
'userid' => $frontendConfig->getScUserId(),
'sslCertificateFile' => $certPath,
'sslCertificateKeyFile' => $certKey,
'destdns' => $urlHost,
'destip' => $urlHost,
'publicdns' => $urlHost,
'publicip' => $urlHost,
];
if ('https' === $publicUrl->getScheme()) {
$config['alternateports'] = '443';
}
$customConfig = trim($frontendConfig->getCustomConfiguration() ?? '');
if (!empty($customConfig)) {
$custom_conf = $this->processCustomConfig($customConfig);