feat: allow changing tunnel when editing forward rules

- Add tunnelId field to ForwardUpdateDto
- Refactor updateForward to support tunnel change:
  - Release old tunnel resources (GOST services + ForwardPort)
  - Allocate new tunnel resources with proper rollback
  - Preserve flow statistics (inFlow/outFlow)
- Remove tunnel selector disabled state in forward.tsx
- Bump version to 2.0.9
This commit is contained in:
sagit
2026-01-24 05:27:51 +00:00
parent e6226d8069
commit dd58ac67de
4 changed files with 143 additions and 29 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ export type SiteConfig = typeof siteConfig;
// 缓存相关常量
const CACHE_PREFIX = 'vite_config_';
const VERSION = "2.0.7-beta";
const VERSION = "2.0.9";
const APP_VERSION = "1.0.3";
const GITHUB_REPO = import.meta.env.VITE_GITHUB_REPO || "https://github.com/Sagit-chu/flux-panel";
+1 -2
View File
@@ -1606,8 +1606,7 @@ export default function ForwardPage() {
isInvalid={!!errors.tunnelId}
errorMessage={errors.tunnelId}
variant="bordered"
isDisabled={isEdit}
description={isEdit ? "编辑时无法修改关联隧道" : undefined}
description={isEdit ? "更改隧道将释放原端口并在新隧道分配端口" : undefined}
>
{tunnels.map((tunnel) => (
<SelectItem key={tunnel.id} >