diff --git a/frontend/src/pages/settings/SettingsPage.vue b/frontend/src/pages/settings/SettingsPage.vue
index 08a02d94..3eaed232 100644
--- a/frontend/src/pages/settings/SettingsPage.vue
+++ b/frontend/src/pages/settings/SettingsPage.vue
@@ -17,6 +17,7 @@ import { useAllSetting } from './useAllSetting.js';
import GeneralTab from './GeneralTab.vue';
import SecurityTab from './SecurityTab.vue';
import TelegramTab from './TelegramTab.vue';
+import SubscriptionGeneralTab from './SubscriptionGeneralTab.vue';
const antdThemeConfig = computed(() => ({
algorithm: themeState.isDark ? antdTheme.darkAlgorithm : antdTheme.defaultAlgorithm,
@@ -230,7 +231,7 @@ const alertVisible = ref(true);
Subscription
-
+
+import { computed } from 'vue';
+import SettingListItem from '@/components/SettingListItem.vue';
+
+const props = defineProps({
+ allSetting: { type: Object, required: true },
+});
+
+// Sub path is constrained: no `:` or `*`, must start and end with `/`,
+// and no double slashes. Strip on input, normalize on blur — same
+// behavior as the legacy template.
+const subPath = computed({
+ get: () => props.allSetting.subPath,
+ set: (v) => {
+ props.allSetting.subPath = String(v ?? '').replace(/[:*]/g, '');
+ },
+});
+
+function normalizeSubPath() {
+ let p = props.allSetting.subPath || '/';
+ if (!p.startsWith('/')) p = '/' + p;
+ if (!p.endsWith('/')) p += '/';
+ p = p.replace(/\/+/g, '/');
+ props.allSetting.subPath = p;
+}
+
+
+
+
+
+
+ Subscription enable
+ Master switch for /sub endpoints.
+
+
+
+
+
+
+ JSON subscription
+ Expose /json subscription endpoints alongside /sub.
+
+
+
+
+
+
+ Clash / Mihomo subscription
+ Enable direct Clash and Mihomo YAML subscriptions.
+
+
+
+
+
+
+ Subscription listen IP
+ The IP the subscription server binds to. Leave empty to share the panel listener.
+
+
+
+
+
+
+ Subscription domain
+ Domain returned in subscription URLs.
+
+
+
+
+
+
+ Subscription port
+ Restart required after changing.
+
+
+
+
+
+
+ Subscription path
+ URL prefix for subscription endpoints (must start and end with /).
+
+
+
+
+
+
+ Subscription URI override
+ Full URL returned to clients — overrides scheme/domain/port/path when set.
+
+
+
+
+
+
+
+
+ Encrypt subscription
+ Encrypt subscription content; clients need the matching key.
+
+
+
+
+
+
+ Show usage info
+ Include used/total traffic and expiry in the subscription headers.
+
+
+
+
+
+ Basic template
+
+
+ Title
+ Subscription title shown in clients.
+
+
+
+
+
+
+ Support URL
+ Link surfaced to clients for support.
+
+
+
+
+
+
+ Profile URL
+ Profile/announcement URL surfaced to clients.
+
+
+
+
+
+
+ Announce
+ Free-form announcement appended to the subscription header.
+
+
+
+
+
+ Advanced template (Happ)
+
+
+ Enable Happ routing
+ Embed Happ routing rules in the subscription.
+
+
+
+
+
+
+ Routing rules
+ One happ:// directive per line.
+
+
+
+
+
+
+
+
+ Subscription cert path
+ Absolute path to the subscription server's TLS certificate.
+
+
+
+
+
+
+ Subscription key path
+ Absolute path to the subscription server's private key.
+
+
+
+
+
+
+
+
+ Update hours
+ Hours clients should wait before re-fetching the subscription.
+
+
+
+
+
+
+