Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ee05a73834 | |||
| 13dce0c20b | |||
| 41f06bfe54 | |||
| 0cadd83e45 | |||
| d7879a8654 | |||
| 49b3dcc591 | |||
| e94405d1cd | |||
| 1dde7088bc | |||
| bd67ece479 | |||
| a3c5e31094 | |||
| 1b715c5f8b | |||
| 6dfac27bc3 | |||
| c6dd0b63f2 | |||
| bdd53b1551 | |||
| 982d2882e9 | |||
| 2b0cf9a46d | |||
| d6854076fe | |||
| 6991b69d40 | |||
| b8f630f8ab | |||
| 5ce5d62b22 | |||
| 2d5175d70f | |||
| 05d6c8947c | |||
| 8700cf6a91 | |||
| ebcebd7ddf | |||
| 54de16bdd5 | |||
| 597a01885b | |||
| 8a0baf3a61 | |||
| c4c4d5aea3 |
+74
-5
@@ -1,15 +1,84 @@
|
|||||||
<a name="readme-top"></a>
|
<a name="readme-top"></a>
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [1.4.1](https://github.com/perfect-panel/ppanel-web/compare/v1.4.0...v1.4.1) (2025-09-15)
|
## [1.4.6](https://github.com/perfect-panel/ppanel-web/compare/v1.4.5...v1.4.6) (2025-09-17)
|
||||||
|
|
||||||
|
|
||||||
|
### 🎫 Chores
|
||||||
|
|
||||||
|
* Merge branch 'main' into develop ([41f06bf](https://github.com/perfect-panel/ppanel-web/commit/41f06bf))
|
||||||
|
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
* Add copy subscription functionality to user subscription dashboard and improve localization for new features ([e2a357f](https://github.com/perfect-panel/ppanel-web/commit/e2a357f))
|
* Add loaded state to node, server, and subscribe stores for better loading management ([13dce0c](https://github.com/perfect-panel/ppanel-web/commit/13dce0c))
|
||||||
* Simplify handleInputBlur function by removing unnecessary setTimeout ([6341562](https://github.com/perfect-panel/ppanel-web/commit/6341562))
|
* Removed node metadata fields in subscription schema to simplify structure ([0cadd83](https://github.com/perfect-panel/ppanel-web/commit/0cadd83))
|
||||||
* Update TemplatePreview to use MonacoEditor for content display and improve error handling ([1d52642](https://github.com/perfect-panel/ppanel-web/commit/1d52642))
|
|
||||||
* Update user dashboard link to correct path ([131693b](https://github.com/perfect-panel/ppanel-web/commit/131693b))
|
## [1.4.5](https://github.com/perfect-panel/ppanel-web/compare/v1.4.4...v1.4.5) (2025-09-17)
|
||||||
|
|
||||||
|
|
||||||
|
### ♻ Code Refactoring
|
||||||
|
|
||||||
|
* Replace useQuery with Zustand store for subscription and node data management ([c6dd0b6](https://github.com/perfect-panel/ppanel-web/commit/c6dd0b6))
|
||||||
|
* Simplify TemplatePreview component structure by consolidating Sheet and Button elements ([1b715c5](https://github.com/perfect-panel/ppanel-web/commit/1b715c5))
|
||||||
|
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* Add showLineNumbers prop handling in MonacoEditor for improved placeholder positioning ([bd67ece](https://github.com/perfect-panel/ppanel-web/commit/bd67ece))
|
||||||
|
* Add fetchTags method to NodesPage and ensure tags are fetched alongside nodes ([a3c5e31](https://github.com/perfect-panel/ppanel-web/commit/a3c5e31))
|
||||||
|
* Add NEXT_PUBLIC_HIDDEN_TUTORIAL_DOCUMENT to control tutorial visibility and update page query accordingly ([e94405d](https://github.com/perfect-panel/ppanel-web/commit/e94405d))
|
||||||
|
* Add subscribeSchema for subscription management with detailed proxy and user information ([49b3dcc](https://github.com/perfect-panel/ppanel-web/commit/49b3dcc))
|
||||||
|
* Enhance server ID display in ServerTrafficLogPage with badges and server ratio ([6dfac27](https://github.com/perfect-panel/ppanel-web/commit/6dfac27))
|
||||||
|
* Update platform handling in Content component to ensure available platforms are correctly filtered and displayed ([1dde708](https://github.com/perfect-panel/ppanel-web/commit/1dde708))
|
||||||
|
|
||||||
|
<a name="readme-top"></a>
|
||||||
|
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [1.4.4](https://github.com/perfect-panel/ppanel-web/compare/v1.4.3...v1.4.4) (2025-09-16)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- Add minimum value constraint for count and user limit inputs in CouponForm ([6991b69](https://github.com/perfect-panel/ppanel-web/commit/6991b69))
|
||||||
|
- Add protocol-related constants, default configurations, field definitions, and validation modes ([d685407](https://github.com/perfect-panel/ppanel-web/commit/d685407))
|
||||||
|
- Added the enabled field in the protocol configuration, updated the related type definition and default configuration ([2b0cf9a](https://github.com/perfect-panel/ppanel-web/commit/2b0cf9a))
|
||||||
|
- Filter available protocols to exclude disabled ones in NodeForm ([982d288](https://github.com/perfect-panel/ppanel-web/commit/982d288))
|
||||||
|
- Refactor key generation logic and update dependencies for ML-KEM-768 integration ([b8f630f](https://github.com/perfect-panel/ppanel-web/commit/b8f630f))
|
||||||
|
|
||||||
|
<a name="readme-top"></a>
|
||||||
|
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [1.4.3](https://github.com/perfect-panel/ppanel-web/compare/v1.4.2...v1.4.3) (2025-09-16)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- Add success toast message for sorting in nodes and servers pages ([2d5175d](https://github.com/perfect-panel/ppanel-web/commit/2d5175d))
|
||||||
|
- Implement encryption and obfuscation features in protocol configuration ([54de16b](https://github.com/perfect-panel/ppanel-web/commit/54de16b))
|
||||||
|
- Refactor toB64 function to toB64Url for URL-safe base64 encoding in VlessX25519Pair generation ([8700cf6](https://github.com/perfect-panel/ppanel-web/commit/8700cf6))
|
||||||
|
- Simplify initialValues assignment and update node submission logic in NodesPage ([05d6c89](https://github.com/perfect-panel/ppanel-web/commit/05d6c89))
|
||||||
|
- Update bun.lockb to reflect dependency changes ([ebcebd7](https://github.com/perfect-panel/ppanel-web/commit/ebcebd7))
|
||||||
|
|
||||||
|
<a name="readme-top"></a>
|
||||||
|
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [1.4.2](https://github.com/perfect-panel/ppanel-web/compare/v1.4.1...v1.4.2) (2025-09-15)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- Add GitHub template repository link to ProtocolForm header for easier access ([8a0baf3](https://github.com/perfect-panel/ppanel-web/commit/8a0baf3))
|
||||||
|
- Add readOnly prop to MonacoEditor and TemplatePreview components for improved content handling ([c4c4d5a](https://github.com/perfect-panel/ppanel-web/commit/c4c4d5a))
|
||||||
|
|
||||||
|
## [1.4.1](https://github.com/perfect-panel/ppanel-web/compare/v1.4.0...v1.4.1) (2025-09-15)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- Add copy subscription functionality to user subscription dashboard and improve localization for new features ([e2a357f](https://github.com/perfect-panel/ppanel-web/commit/e2a357f))
|
||||||
|
- Simplify handleInputBlur function by removing unnecessary setTimeout ([6341562](https://github.com/perfect-panel/ppanel-web/commit/6341562))
|
||||||
|
- Update TemplatePreview to use MonacoEditor for content display and improve error handling ([1d52642](https://github.com/perfect-panel/ppanel-web/commit/1d52642))
|
||||||
|
- Update user dashboard link to correct path ([131693b](https://github.com/perfect-panel/ppanel-web/commit/131693b))
|
||||||
|
|
||||||
<a name="readme-top"></a>
|
<a name="readme-top"></a>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { getSubscribeList } from '@/services/admin/subscribe';
|
import { useSubscribe } from '@/store/subscribe';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
@@ -81,16 +80,7 @@ export default function CouponForm<T extends Record<string, any>>({
|
|||||||
|
|
||||||
const type = form.watch('type');
|
const type = form.watch('type');
|
||||||
|
|
||||||
const { data: subscribe } = useQuery({
|
const { subscribes } = useSubscribe();
|
||||||
queryKey: ['getSubscribeList', 'all'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await getSubscribeList({
|
|
||||||
page: 1,
|
|
||||||
size: 9999,
|
|
||||||
});
|
|
||||||
return data.data?.list as API.Subscribe[];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Sheet open={open} onOpenChange={setOpen}>
|
<Sheet open={open} onOpenChange={setOpen}>
|
||||||
@@ -247,9 +237,9 @@ export default function CouponForm<T extends Record<string, any>>({
|
|||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
form.setValue(field.name, value);
|
form.setValue(field.name, value);
|
||||||
}}
|
}}
|
||||||
options={subscribe?.map((item: API.Subscribe) => ({
|
options={subscribes?.map((item) => ({
|
||||||
value: item.id,
|
value: item.id!,
|
||||||
label: item.name,
|
label: item.name!,
|
||||||
}))}
|
}))}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -307,6 +297,7 @@ export default function CouponForm<T extends Record<string, any>>({
|
|||||||
<EnhancedInput
|
<EnhancedInput
|
||||||
placeholder={t('form.countPlaceholder')}
|
placeholder={t('form.countPlaceholder')}
|
||||||
type='number'
|
type='number'
|
||||||
|
min={0}
|
||||||
step={1}
|
step={1}
|
||||||
{...field}
|
{...field}
|
||||||
onValueChange={(value) => {
|
onValueChange={(value) => {
|
||||||
@@ -328,6 +319,7 @@ export default function CouponForm<T extends Record<string, any>>({
|
|||||||
<EnhancedInput
|
<EnhancedInput
|
||||||
placeholder={t('form.userLimitPlaceholder')}
|
placeholder={t('form.userLimitPlaceholder')}
|
||||||
type='number'
|
type='number'
|
||||||
|
min={0}
|
||||||
step={1}
|
step={1}
|
||||||
{...field}
|
{...field}
|
||||||
onValueChange={(value) => {
|
onValueChange={(value) => {
|
||||||
|
|||||||
@@ -9,9 +9,8 @@ import {
|
|||||||
getCouponList,
|
getCouponList,
|
||||||
updateCoupon,
|
updateCoupon,
|
||||||
} from '@/services/admin/coupon';
|
} from '@/services/admin/coupon';
|
||||||
import { getSubscribeList } from '@/services/admin/subscribe';
|
import { useSubscribe } from '@/store/subscribe';
|
||||||
import { formatDate } from '@/utils/common';
|
import { formatDate } from '@/utils/common';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
|
||||||
import { Badge } from '@workspace/ui/components/badge';
|
import { Badge } from '@workspace/ui/components/badge';
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
import { Switch } from '@workspace/ui/components/switch';
|
import { Switch } from '@workspace/ui/components/switch';
|
||||||
@@ -24,16 +23,7 @@ import CouponForm from './coupon-form';
|
|||||||
export default function Page() {
|
export default function Page() {
|
||||||
const t = useTranslations('coupon');
|
const t = useTranslations('coupon');
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const { data } = useQuery({
|
const { subscribes } = useSubscribe();
|
||||||
queryKey: ['getSubscribeList', 'all'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await getSubscribeList({
|
|
||||||
page: 1,
|
|
||||||
size: 9999,
|
|
||||||
});
|
|
||||||
return data.data?.list as API.SubscribeGroup[];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const ref = useRef<ProTableActions>(null);
|
const ref = useRef<ProTableActions>(null);
|
||||||
return (
|
return (
|
||||||
<ProTable<API.Coupon, { group_id: number; query: string }>
|
<ProTable<API.Coupon, { group_id: number; query: string }>
|
||||||
@@ -67,8 +57,8 @@ export default function Page() {
|
|||||||
{
|
{
|
||||||
key: 'subscribe',
|
key: 'subscribe',
|
||||||
placeholder: t('subscribe'),
|
placeholder: t('subscribe'),
|
||||||
options: data?.map((item) => ({
|
options: subscribes?.map((item) => ({
|
||||||
label: item.name,
|
label: item.name!,
|
||||||
value: String(item.id),
|
value: String(item.id),
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
import { ProTable } from '@/components/pro-table';
|
import { ProTable } from '@/components/pro-table';
|
||||||
import { filterServerTrafficLog } from '@/services/admin/log';
|
import { filterServerTrafficLog } from '@/services/admin/log';
|
||||||
import { filterServerList } from '@/services/admin/server';
|
import { useServer } from '@/store/server';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { Badge } from '@workspace/ui/components/badge';
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
import { formatBytes } from '@workspace/ui/utils';
|
import { formatBytes } from '@workspace/ui/utils';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
@@ -13,20 +13,10 @@ import { useSearchParams } from 'next/navigation';
|
|||||||
export default function ServerTrafficLogPage() {
|
export default function ServerTrafficLogPage() {
|
||||||
const t = useTranslations('log');
|
const t = useTranslations('log');
|
||||||
const sp = useSearchParams();
|
const sp = useSearchParams();
|
||||||
|
const { getServerName, getServerById } = useServer();
|
||||||
|
|
||||||
const today = new Date().toISOString().split('T')[0];
|
const today = new Date().toISOString().split('T')[0];
|
||||||
|
|
||||||
const { data: servers = [] } = useQuery({
|
|
||||||
queryKey: ['filterServerListAll'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await filterServerList({ page: 1, size: 999999999 });
|
|
||||||
return data?.data?.list || [];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const getServerName = (id?: number) =>
|
|
||||||
id ? (servers.find((s) => s.id === id)?.name ?? `Server ${id}`) : 'Unknown';
|
|
||||||
|
|
||||||
const initialFilters = {
|
const initialFilters = {
|
||||||
date: sp.get('date') || today,
|
date: sp.get('date') || today,
|
||||||
server_id: sp.get('server_id') ? Number(sp.get('server_id')) : undefined,
|
server_id: sp.get('server_id') ? Number(sp.get('server_id')) : undefined,
|
||||||
@@ -50,11 +40,17 @@ export default function ServerTrafficLogPage() {
|
|||||||
{
|
{
|
||||||
accessorKey: 'server_id',
|
accessorKey: 'server_id',
|
||||||
header: t('column.server'),
|
header: t('column.server'),
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => {
|
||||||
<span>
|
const server = getServerById(row.original.server_id);
|
||||||
{getServerName(row.original.server_id)} ({row.original.server_id})
|
const ratio = server?.ratio || 1;
|
||||||
</span>
|
return (
|
||||||
),
|
<div className='flex items-center gap-2'>
|
||||||
|
<Badge>{row.original.server_id}</Badge>
|
||||||
|
<span>{getServerName(row.original.server_id)}</span>
|
||||||
|
<Badge variant='outline'>{ratio}X</Badge>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: 'upload',
|
accessorKey: 'upload',
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
import { UserDetail, UserSubscribeDetail } from '@/app/dashboard/user/user-detail';
|
import { UserDetail, UserSubscribeDetail } from '@/app/dashboard/user/user-detail';
|
||||||
import { ProTable } from '@/components/pro-table';
|
import { ProTable } from '@/components/pro-table';
|
||||||
import { filterTrafficLogDetails } from '@/services/admin/log';
|
import { filterTrafficLogDetails } from '@/services/admin/log';
|
||||||
import { filterServerList } from '@/services/admin/server';
|
import { useServer } from '@/store/server';
|
||||||
import { formatDate } from '@/utils/common';
|
import { formatDate } from '@/utils/common';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
|
||||||
import { formatBytes } from '@workspace/ui/utils';
|
import { formatBytes } from '@workspace/ui/utils';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { useSearchParams } from 'next/navigation';
|
import { useSearchParams } from 'next/navigation';
|
||||||
@@ -13,20 +12,10 @@ import { useSearchParams } from 'next/navigation';
|
|||||||
export default function TrafficDetailsPage() {
|
export default function TrafficDetailsPage() {
|
||||||
const t = useTranslations('log');
|
const t = useTranslations('log');
|
||||||
const sp = useSearchParams();
|
const sp = useSearchParams();
|
||||||
|
const { getServerName } = useServer();
|
||||||
|
|
||||||
const today = new Date().toISOString().split('T')[0];
|
const today = new Date().toISOString().split('T')[0];
|
||||||
|
|
||||||
const { data: servers = [] } = useQuery({
|
|
||||||
queryKey: ['filterServerListAll'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await filterServerList({ page: 1, size: 999999999 });
|
|
||||||
return data?.data?.list || [];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const getServerName = (id?: number) =>
|
|
||||||
id ? (servers.find((s) => s.id === id)?.name ?? `Server ${id}`) : 'Unknown';
|
|
||||||
|
|
||||||
const initialFilters = {
|
const initialFilters = {
|
||||||
date: sp.get('date') || today,
|
date: sp.get('date') || today,
|
||||||
server_id: sp.get('server_id') ? Number(sp.get('server_id')) : undefined,
|
server_id: sp.get('server_id') ? Number(sp.get('server_id')) : undefined,
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
import { Display } from '@/components/display';
|
import { Display } from '@/components/display';
|
||||||
import { createQuotaTask, queryQuotaTaskPreCount } from '@/services/admin/marketing';
|
import { createQuotaTask, queryQuotaTaskPreCount } from '@/services/admin/marketing';
|
||||||
import { getSubscribeList } from '@/services/admin/subscribe';
|
import { useSubscribe } from '@/store/subscribe';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
@@ -73,17 +72,7 @@ export default function QuotaBroadcastForm() {
|
|||||||
const [isSubmitting, setIsSubmitting] = useState(false);
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
||||||
// Get subscribe list
|
const { subscribes } = useSubscribe();
|
||||||
const { data: subscribeList } = useQuery({
|
|
||||||
queryKey: ['getSubscribeList', 'all'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await getSubscribeList({
|
|
||||||
page: 1,
|
|
||||||
size: 999999999,
|
|
||||||
});
|
|
||||||
return data.data?.list as API.SubscribeItem[];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// Calculate recipient count
|
// Calculate recipient count
|
||||||
const calculateRecipients = async () => {
|
const calculateRecipients = async () => {
|
||||||
@@ -217,21 +206,19 @@ export default function QuotaBroadcastForm() {
|
|||||||
value={field.value || []}
|
value={field.value || []}
|
||||||
onChange={field.onChange}
|
onChange={field.onChange}
|
||||||
placeholder={t('pleaseSelectSubscribers')}
|
placeholder={t('pleaseSelectSubscribers')}
|
||||||
options={
|
options={subscribes?.map((subscribe) => ({
|
||||||
subscribeList?.map((subscribe) => ({
|
value: subscribe.id!,
|
||||||
value: subscribe.id!,
|
label: subscribe.name!,
|
||||||
label: subscribe.name!,
|
children: (
|
||||||
children: (
|
<div>
|
||||||
<div>
|
<div>{subscribe.name}</div>
|
||||||
<div>{subscribe.name}</div>
|
<div className='text-muted-foreground text-xs'>
|
||||||
<div className='text-muted-foreground text-xs'>
|
<Display type='traffic' value={subscribe.traffic || 0} /> /{' '}
|
||||||
<Display type='traffic' value={subscribe.traffic || 0} /> /{' '}
|
<Display type='currency' value={subscribe.unit_price || 0} />
|
||||||
<Display type='currency' value={subscribe.unit_price || 0} />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
),
|
</div>
|
||||||
})) || []
|
),
|
||||||
}
|
}))}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
import { Display } from '@/components/display';
|
import { Display } from '@/components/display';
|
||||||
import { ProTable } from '@/components/pro-table';
|
import { ProTable } from '@/components/pro-table';
|
||||||
import { queryQuotaTaskList } from '@/services/admin/marketing';
|
import { queryQuotaTaskList } from '@/services/admin/marketing';
|
||||||
import { getSubscribeList } from '@/services/admin/subscribe';
|
import { useSubscribe } from '@/store/subscribe';
|
||||||
import { formatDate } from '@/utils/common';
|
import { formatDate } from '@/utils/common';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
|
||||||
import { Badge } from '@workspace/ui/components/badge';
|
import { Badge } from '@workspace/ui/components/badge';
|
||||||
import { ScrollArea } from '@workspace/ui/components/scroll-area';
|
import { ScrollArea } from '@workspace/ui/components/scroll-area';
|
||||||
import {
|
import {
|
||||||
@@ -23,21 +22,9 @@ export default function QuotaTaskManager() {
|
|||||||
const t = useTranslations('marketing');
|
const t = useTranslations('marketing');
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
||||||
// Get subscribe list to show subscription names
|
const { subscribes } = useSubscribe();
|
||||||
const { data: subscribeList } = useQuery({
|
|
||||||
queryKey: ['getSubscribeList', 'all'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await getSubscribeList({
|
|
||||||
page: 1,
|
|
||||||
size: 999999999,
|
|
||||||
});
|
|
||||||
return data.data?.list as API.SubscribeItem[];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// Create a map for quick lookup of subscription names
|
|
||||||
const subscribeMap =
|
const subscribeMap =
|
||||||
subscribeList?.reduce(
|
subscribes?.reduce(
|
||||||
(acc, subscribe) => {
|
(acc, subscribe) => {
|
||||||
acc[subscribe.id!] = subscribe.name!;
|
acc[subscribe.id!] = subscribe.name!;
|
||||||
return acc;
|
return acc;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { filterServerList, queryNodeTag } from '@/services/admin/server';
|
import { useNode } from '@/store/node';
|
||||||
|
import { useServer } from '@/store/server';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
@@ -40,8 +40,6 @@ export type ProtocolName =
|
|||||||
| 'tuic'
|
| 'tuic'
|
||||||
| 'anytls';
|
| 'anytls';
|
||||||
|
|
||||||
type ServerRow = API.Server;
|
|
||||||
|
|
||||||
const buildSchema = (t: ReturnType<typeof useTranslations>) =>
|
const buildSchema = (t: ReturnType<typeof useTranslations>) =>
|
||||||
z.object({
|
z.object({
|
||||||
name: z.string().trim().min(1, t('errors.nameRequired')),
|
name: z.string().trim().min(1, t('errors.nameRequired')),
|
||||||
@@ -74,6 +72,20 @@ export default function NodeForm(props: {
|
|||||||
const Scheme = useMemo(() => buildSchema(t), [t]);
|
const Scheme = useMemo(() => buildSchema(t), [t]);
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
||||||
|
const [autoFilledFields, setAutoFilledFields] = useState<Set<string>>(new Set());
|
||||||
|
|
||||||
|
const addAutoFilledField = (fieldName: string) => {
|
||||||
|
setAutoFilledFields((prev) => new Set(prev).add(fieldName));
|
||||||
|
};
|
||||||
|
|
||||||
|
const removeAutoFilledField = (fieldName: string) => {
|
||||||
|
setAutoFilledFields((prev) => {
|
||||||
|
const newSet = new Set(prev);
|
||||||
|
newSet.delete(fieldName);
|
||||||
|
return newSet;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const form = useForm<NodeFormValues>({
|
const form = useForm<NodeFormValues>({
|
||||||
resolver: zodResolver(Scheme),
|
resolver: zodResolver(Scheme),
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
@@ -89,36 +101,12 @@ export default function NodeForm(props: {
|
|||||||
|
|
||||||
const serverId = form.watch('server_id');
|
const serverId = form.watch('server_id');
|
||||||
|
|
||||||
const { data } = useQuery({
|
const { servers, getAvailableProtocols } = useServer();
|
||||||
enabled: open,
|
const { tags } = useNode();
|
||||||
queryKey: ['filterServerListAll'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await filterServerList({ page: 1, size: 999999999 });
|
|
||||||
return data?.data?.list || [];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const servers: ServerRow[] = data as ServerRow[];
|
|
||||||
|
|
||||||
const { data: tagsData } = useQuery({
|
const existingTags: string[] = tags || [];
|
||||||
enabled: open,
|
|
||||||
queryKey: ['queryNodeTag'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await queryNodeTag();
|
|
||||||
return data?.data?.tags || [];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const existingTags: string[] = tagsData as string[];
|
|
||||||
|
|
||||||
const currentServer = useMemo(() => servers?.find((s) => s.id === serverId), [servers, serverId]);
|
const availableProtocols = getAvailableProtocols(serverId);
|
||||||
|
|
||||||
const availableProtocols = useMemo(() => {
|
|
||||||
return (currentServer?.protocols || [])
|
|
||||||
.map((p) => ({
|
|
||||||
protocol: (p as any).type as ProtocolName,
|
|
||||||
port: (p as any).port as number | undefined,
|
|
||||||
}))
|
|
||||||
.filter((p) => !!p.protocol);
|
|
||||||
}, [currentServer]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (initialValues) {
|
if (initialValues) {
|
||||||
@@ -139,60 +127,93 @@ export default function NodeForm(props: {
|
|||||||
const id = nextId ?? undefined;
|
const id = nextId ?? undefined;
|
||||||
form.setValue('server_id', id);
|
form.setValue('server_id', id);
|
||||||
|
|
||||||
const sel = servers.find((s) => s.id === id);
|
if (!id) {
|
||||||
const dirty = form.formState.dirtyFields as Record<string, any>;
|
setAutoFilledFields(new Set());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectedServer = servers.find((s) => s.id === id);
|
||||||
|
if (!selectedServer) return;
|
||||||
|
|
||||||
const currentValues = form.getValues();
|
const currentValues = form.getValues();
|
||||||
|
const fieldsToFill: string[] = [];
|
||||||
|
|
||||||
if (!dirty.name) {
|
if (!currentValues.name || autoFilledFields.has('name')) {
|
||||||
form.setValue('name', (sel?.name as string) || '', { shouldDirty: false });
|
form.setValue('name', selectedServer.name as string, { shouldDirty: false });
|
||||||
|
fieldsToFill.push('name');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!currentValues.address || autoFilledFields.has('address')) {
|
||||||
!dirty.address &&
|
form.setValue('address', selectedServer.address as string, { shouldDirty: false });
|
||||||
(!currentValues.address || currentValues.address === (sel?.address as string))
|
fieldsToFill.push('address');
|
||||||
) {
|
|
||||||
form.setValue('address', (sel?.address as string) || '', { shouldDirty: false });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const allowed = (sel?.protocols || [])
|
const protocols = getAvailableProtocols(id);
|
||||||
.map((p) => (p as any).type as ProtocolName)
|
const firstProtocol = protocols[0];
|
||||||
.filter(Boolean);
|
|
||||||
|
|
||||||
const currentProtocol = form.getValues('protocol') as ProtocolName;
|
if (firstProtocol && (!currentValues.protocol || autoFilledFields.has('protocol'))) {
|
||||||
|
form.setValue('protocol', firstProtocol.protocol, { shouldDirty: false });
|
||||||
|
fieldsToFill.push('protocol');
|
||||||
|
|
||||||
if (!allowed.includes(currentProtocol)) {
|
if (!currentValues.port || currentValues.port === 0 || autoFilledFields.has('port')) {
|
||||||
const firstProtocol = allowed[0] || '';
|
const port = firstProtocol.port || 0;
|
||||||
form.setValue('protocol', firstProtocol as any);
|
form.setValue('port', port, { shouldDirty: false });
|
||||||
|
fieldsToFill.push('port');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (firstProtocol) {
|
setAutoFilledFields(new Set(fieldsToFill));
|
||||||
handleProtocolChange(firstProtocol);
|
}
|
||||||
|
|
||||||
|
const handleManualFieldChange = (fieldName: keyof NodeFormValues, value: any) => {
|
||||||
|
form.setValue(fieldName, value);
|
||||||
|
removeAutoFilledField(fieldName);
|
||||||
|
};
|
||||||
|
|
||||||
|
function handleProtocolChange(nextProto?: ProtocolName | null) {
|
||||||
|
const protocol = (nextProto || '') as ProtocolName | '';
|
||||||
|
form.setValue('protocol', protocol);
|
||||||
|
|
||||||
|
if (!protocol || !serverId) {
|
||||||
|
removeAutoFilledField('protocol');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const currentValues = form.getValues();
|
||||||
|
const isPortAutoFilled = autoFilledFields.has('port');
|
||||||
|
|
||||||
|
removeAutoFilledField('protocol');
|
||||||
|
|
||||||
|
if (!currentValues.port || currentValues.port === 0 || isPortAutoFilled) {
|
||||||
|
const protocolData = availableProtocols.find((p) => p.protocol === protocol);
|
||||||
|
|
||||||
|
if (protocolData) {
|
||||||
|
const port = protocolData.port || 0;
|
||||||
|
form.setValue('port', port, { shouldDirty: false });
|
||||||
|
addAutoFilledField('port');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleProtocolChange(nextProto?: ProtocolName | null) {
|
async function handleSubmit(values: NodeFormValues) {
|
||||||
const p = (nextProto || '') as ProtocolName | '';
|
const result = await onSubmit(values);
|
||||||
form.setValue('protocol', p);
|
if (result) {
|
||||||
if (!p || !currentServer) return;
|
setOpen(false);
|
||||||
|
setAutoFilledFields(new Set());
|
||||||
const dirty = form.formState.dirtyFields as Record<string, any>;
|
|
||||||
const currentValues = form.getValues();
|
|
||||||
|
|
||||||
if (!dirty.port) {
|
|
||||||
const hit = (currentServer.protocols as any[]).find((x) => (x as any).type === p);
|
|
||||||
const port = (hit as any)?.port as number | undefined;
|
|
||||||
const newPort = typeof port === 'number' && port > 0 ? port : 0;
|
|
||||||
|
|
||||||
if (!currentValues.port || currentValues.port === 0 || currentValues.port === newPort) {
|
|
||||||
form.setValue('port', newPort, { shouldDirty: false });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Sheet open={open} onOpenChange={setOpen}>
|
<Sheet open={open} onOpenChange={setOpen}>
|
||||||
<SheetTrigger asChild>
|
<SheetTrigger asChild>
|
||||||
<Button onClick={() => form.reset()}>{trigger}</Button>
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
form.reset();
|
||||||
|
setAutoFilledFields(new Set());
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{trigger}
|
||||||
|
</Button>
|
||||||
</SheetTrigger>
|
</SheetTrigger>
|
||||||
|
|
||||||
<SheetContent className='w-[560px] max-w-full'>
|
<SheetContent className='w-[560px] max-w-full'>
|
||||||
@@ -253,7 +274,7 @@ export default function NodeForm(props: {
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<EnhancedInput
|
<EnhancedInput
|
||||||
{...field}
|
{...field}
|
||||||
onValueChange={(v) => form.setValue(field.name, v as string)}
|
onValueChange={(v) => handleManualFieldChange('name', v as string)}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
@@ -270,7 +291,7 @@ export default function NodeForm(props: {
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<EnhancedInput
|
<EnhancedInput
|
||||||
{...field}
|
{...field}
|
||||||
onValueChange={(v) => form.setValue(field.name, v as string)}
|
onValueChange={(v) => handleManualFieldChange('address', v as string)}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
@@ -291,7 +312,7 @@ export default function NodeForm(props: {
|
|||||||
min={1}
|
min={1}
|
||||||
max={65535}
|
max={65535}
|
||||||
placeholder='1-65535'
|
placeholder='1-65535'
|
||||||
onValueChange={(v) => form.setValue(field.name, Number(v))}
|
onValueChange={(v) => handleManualFieldChange('port', Number(v))}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
@@ -327,7 +348,7 @@ export default function NodeForm(props: {
|
|||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
onClick={form.handleSubmit(onSubmit, (errors) => {
|
onClick={form.handleSubmit(handleSubmit, (errors) => {
|
||||||
const key = Object.keys(errors)[0] as keyof typeof errors;
|
const key = Object.keys(errors)[0] as keyof typeof errors;
|
||||||
if (key) toast.error(String(errors[key]?.message));
|
if (key) toast.error(String(errors[key]?.message));
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import {
|
|||||||
createNode,
|
createNode,
|
||||||
deleteNode,
|
deleteNode,
|
||||||
filterNodeList,
|
filterNodeList,
|
||||||
filterServerList,
|
|
||||||
resetSortWithNode,
|
resetSortWithNode,
|
||||||
toggleNodeStatus,
|
toggleNodeStatus,
|
||||||
updateNode,
|
updateNode,
|
||||||
} from '@/services/admin/server';
|
} from '@/services/admin/server';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useNode } from '@/store/node';
|
||||||
|
import { useServer } from '@/store/server';
|
||||||
import { Badge } from '@workspace/ui/components/badge';
|
import { Badge } from '@workspace/ui/components/badge';
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
import { Switch } from '@workspace/ui/components/switch';
|
import { Switch } from '@workspace/ui/components/switch';
|
||||||
@@ -25,24 +25,9 @@ export default function NodesPage() {
|
|||||||
const ref = useRef<ProTableActions>(null);
|
const ref = useRef<ProTableActions>(null);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
const { data: servers = [] } = useQuery({
|
// Use our zustand store for server data
|
||||||
queryKey: ['filterServerListAll'],
|
const { getServerName, getServerAddress, getProtocolPort } = useServer();
|
||||||
queryFn: async () => {
|
const { fetchNodes, fetchTags } = useNode();
|
||||||
const { data } = await filterServerList({ page: 1, size: 999999999 });
|
|
||||||
return data?.data?.list || [];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const getServerName = (id?: number) =>
|
|
||||||
id ? (servers.find((s) => s.id === id)?.name ?? `#${id}`) : '—';
|
|
||||||
const getServerOriginAddr = (id?: number) =>
|
|
||||||
id ? (servers.find((s) => s.id === id)?.address ?? '—') : '—';
|
|
||||||
const getProtocolOriginPort = (id?: number, proto?: string) => {
|
|
||||||
if (!id || !proto) return '—';
|
|
||||||
const hit = servers.find((s) => s.id === id)?.protocols?.find((p) => (p as any).type === proto);
|
|
||||||
const p = (hit as any)?.port as number | undefined;
|
|
||||||
return typeof p === 'number' ? String(p) : '—';
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProTable<API.Node, { search: string }>
|
<ProTable<API.Node, { search: string }>
|
||||||
@@ -69,6 +54,8 @@ export default function NodesPage() {
|
|||||||
await createNode(body);
|
await createNode(body);
|
||||||
toast.success(t('created'));
|
toast.success(t('created'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchNodes();
|
||||||
|
fetchTags();
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -90,6 +77,8 @@ export default function NodesPage() {
|
|||||||
await toggleNodeStatus({ id: row.original.id, enable: v });
|
await toggleNodeStatus({ id: row.original.id, enable: v });
|
||||||
toast.success(v ? t('enabled_on') : t('enabled_off'));
|
toast.success(v ? t('enabled_on') : t('enabled_off'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchNodes();
|
||||||
|
fetchTags();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
@@ -106,14 +95,14 @@ export default function NodesPage() {
|
|||||||
id: 'server_id',
|
id: 'server_id',
|
||||||
header: t('server'),
|
header: t('server'),
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<div className='flex flex-wrap gap-2'>
|
<div className='space-y-1'>
|
||||||
<Badge variant='outline'>
|
<Badge variant='outline'>
|
||||||
{getServerName(row.original.server_id)} ·{' '}
|
{getServerName(row.original.server_id)} : {getServerAddress(row.original.server_id)}
|
||||||
{getServerOriginAddr(row.original.server_id)}
|
|
||||||
</Badge>
|
</Badge>
|
||||||
|
<br />
|
||||||
<Badge variant='outline'>
|
<Badge variant='outline'>
|
||||||
{row.original.protocol || '—'} ·{' '}
|
{row.original.protocol || '—'} :{' '}
|
||||||
{getProtocolOriginPort(row.original.server_id, row.original.protocol)}
|
{getProtocolPort(row.original.server_id, row.original.protocol)}
|
||||||
</Badge>
|
</Badge>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
@@ -152,30 +141,19 @@ export default function NodesPage() {
|
|||||||
trigger={t('edit')}
|
trigger={t('edit')}
|
||||||
title={t('drawerEditTitle')}
|
title={t('drawerEditTitle')}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
initialValues={{
|
initialValues={row}
|
||||||
name: row.name,
|
|
||||||
server_id: row.server_id,
|
|
||||||
protocol: row.protocol as any,
|
|
||||||
address: row.address as any,
|
|
||||||
port: row.port as any,
|
|
||||||
tags: (row.tags as any) || [],
|
|
||||||
}}
|
|
||||||
onSubmit={async (values) => {
|
onSubmit={async (values) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const body: API.UpdateNodeRequest = {
|
const body: API.UpdateNodeRequest = {
|
||||||
id: row.id,
|
...row,
|
||||||
name: values.name,
|
...values,
|
||||||
server_id: Number(values.server_id!),
|
|
||||||
protocol: values.protocol,
|
|
||||||
address: values.address,
|
|
||||||
port: Number(values.port!),
|
|
||||||
tags: values.tags || [],
|
|
||||||
enabled: row.enabled,
|
|
||||||
} as any;
|
} as any;
|
||||||
await updateNode(body);
|
await updateNode(body);
|
||||||
toast.success(t('updated'));
|
toast.success(t('updated'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchNodes();
|
||||||
|
fetchTags();
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -193,6 +171,8 @@ export default function NodesPage() {
|
|||||||
await deleteNode({ id: row.id } as any);
|
await deleteNode({ id: row.id } as any);
|
||||||
toast.success(t('deleted'));
|
toast.success(t('deleted'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchNodes();
|
||||||
|
fetchTags();
|
||||||
}}
|
}}
|
||||||
cancelText={t('cancel')}
|
cancelText={t('cancel')}
|
||||||
confirmText={t('confirm')}
|
confirmText={t('confirm')}
|
||||||
@@ -201,18 +181,15 @@ export default function NodesPage() {
|
|||||||
key='copy'
|
key='copy'
|
||||||
variant='outline'
|
variant='outline'
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
const { id, enabled, created_at, updated_at, ...rest } = row as any;
|
const { id, enabled, created_at, updated_at, sort, ...rest } = row as any;
|
||||||
await createNode({
|
await createNode({
|
||||||
name: rest.name,
|
...rest,
|
||||||
server_id: rest.server_id,
|
|
||||||
protocol: rest.protocol,
|
|
||||||
address: rest.address,
|
|
||||||
port: rest.port,
|
|
||||||
tags: rest.tags || [],
|
|
||||||
enabled: false,
|
enabled: false,
|
||||||
} as any);
|
});
|
||||||
toast.success(t('copied'));
|
toast.success(t('copied'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchNodes();
|
||||||
|
fetchTags();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('copy')}
|
{t('copy')}
|
||||||
@@ -229,6 +206,8 @@ export default function NodesPage() {
|
|||||||
await Promise.all(rows.map((r) => deleteNode({ id: r.id } as any)));
|
await Promise.all(rows.map((r) => deleteNode({ id: r.id } as any)));
|
||||||
toast.success(t('deleted'));
|
toast.success(t('deleted'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchNodes();
|
||||||
|
fetchTags();
|
||||||
}}
|
}}
|
||||||
cancelText={t('cancel')}
|
cancelText={t('cancel')}
|
||||||
confirmText={t('confirm')}
|
confirmText={t('confirm')}
|
||||||
@@ -262,6 +241,7 @@ export default function NodesPage() {
|
|||||||
sort: item.sort,
|
sort: item.sort,
|
||||||
})) as API.SortItem[],
|
})) as API.SortItem[],
|
||||||
});
|
});
|
||||||
|
toast.success(t('sorted_success'));
|
||||||
}
|
}
|
||||||
return updatedItems;
|
return updatedItems;
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { useQuery } from '@tanstack/react-query';
|
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { useSearchParams } from 'next/navigation';
|
import { useSearchParams } from 'next/navigation';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
@@ -8,7 +7,7 @@ import { useRef } from 'react';
|
|||||||
import { Display } from '@/components/display';
|
import { Display } from '@/components/display';
|
||||||
import { ProTable, ProTableActions } from '@/components/pro-table';
|
import { ProTable, ProTableActions } from '@/components/pro-table';
|
||||||
import { getOrderList, updateOrderStatus } from '@/services/admin/order';
|
import { getOrderList, updateOrderStatus } from '@/services/admin/order';
|
||||||
import { getSubscribeList } from '@/services/admin/subscribe';
|
import { useSubscribe } from '@/store/subscribe';
|
||||||
import { formatDate } from '@/utils/common';
|
import { formatDate } from '@/utils/common';
|
||||||
import { Badge } from '@workspace/ui/components/badge';
|
import { Badge } from '@workspace/ui/components/badge';
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
@@ -32,16 +31,7 @@ export default function Page() {
|
|||||||
|
|
||||||
const ref = useRef<ProTableActions>(null);
|
const ref = useRef<ProTableActions>(null);
|
||||||
|
|
||||||
const { data: subscribeList } = useQuery({
|
const { subscribes, getSubscribeName } = useSubscribe();
|
||||||
queryKey: ['getSubscribeList', 'all'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await getSubscribeList({
|
|
||||||
page: 1,
|
|
||||||
size: 999999999,
|
|
||||||
});
|
|
||||||
return data.data?.list as API.SubscribeGroup[];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const initialFilters = {
|
const initialFilters = {
|
||||||
search: sp.get('search') || undefined,
|
search: sp.get('search') || undefined,
|
||||||
@@ -68,9 +58,7 @@ export default function Page() {
|
|||||||
accessorKey: 'subscribe_id',
|
accessorKey: 'subscribe_id',
|
||||||
header: t('subscribe'),
|
header: t('subscribe'),
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const name = subscribeList?.find(
|
const name = getSubscribeName(row.getValue('subscribe_id'));
|
||||||
(item) => item.id === row.getValue('subscribe_id'),
|
|
||||||
)?.name;
|
|
||||||
const quantity = row.original.quantity;
|
const quantity = row.original.quantity;
|
||||||
return name ? `${name} × ${quantity}` : '';
|
return name ? `${name} × ${quantity}` : '';
|
||||||
},
|
},
|
||||||
@@ -186,8 +174,8 @@ export default function Page() {
|
|||||||
{
|
{
|
||||||
key: 'subscribe_id',
|
key: 'subscribe_id',
|
||||||
placeholder: `${t('subscribe')}`,
|
placeholder: `${t('subscribe')}`,
|
||||||
options: subscribeList?.map((item) => ({
|
options: subscribes?.map((item) => ({
|
||||||
label: item.name,
|
label: item.name!,
|
||||||
value: String(item.id),
|
value: String(item.id),
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import { getTranslations } from 'next-intl/server';
|
|
||||||
|
|
||||||
import SubscribeTable from './subscribe-table';
|
import SubscribeTable from './subscribe-table';
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const t = await getTranslations('product');
|
|
||||||
|
|
||||||
return <SubscribeTable />;
|
return <SubscribeTable />;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { filterNodeList, queryNodeTag } from '@/services/admin/server';
|
import { useNode } from '@/store/node';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
|
||||||
import {
|
import {
|
||||||
Accordion,
|
Accordion,
|
||||||
AccordionContent,
|
AccordionContent,
|
||||||
@@ -229,35 +228,9 @@ export default function SubscribeForm<T extends Record<string, any>>({
|
|||||||
if (bool) setOpen(false);
|
if (bool) setOpen(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { data: nodes } = useQuery({
|
const { nodes, getAllAvailableTags, getNodesByTag, getNodesWithoutTags } = useNode();
|
||||||
queryKey: ['filterNodeListAll'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await filterNodeList({ page: 1, size: 999999999 });
|
|
||||||
return (data.data?.list || []) as API.Node[];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const { data: allTagsData } = useQuery({
|
const tagGroups = getAllAvailableTags();
|
||||||
queryKey: ['queryNodeTag'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await queryNodeTag();
|
|
||||||
return data?.data?.tags || [];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const nodeExtractedTags = Array.from(
|
|
||||||
new Set(
|
|
||||||
((nodes as API.Node[]) || [])
|
|
||||||
.flatMap((n) => (Array.isArray(n.tags) ? n.tags : []))
|
|
||||||
.filter(Boolean),
|
|
||||||
),
|
|
||||||
) as string[];
|
|
||||||
|
|
||||||
const allAvailableTags = (allTagsData as string[]) || [];
|
|
||||||
|
|
||||||
const tagGroups = Array.from(new Set([...allAvailableTags, ...nodeExtractedTags])).filter(
|
|
||||||
Boolean,
|
|
||||||
);
|
|
||||||
|
|
||||||
const unit_time = form.watch('unit_time');
|
const unit_time = form.watch('unit_time');
|
||||||
|
|
||||||
@@ -806,10 +779,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
|
|||||||
{tagGroups.map((tag) => {
|
{tagGroups.map((tag) => {
|
||||||
const value = field.value || [];
|
const value = field.value || [];
|
||||||
const tagId = tag;
|
const tagId = tag;
|
||||||
const nodesWithTag =
|
const nodesWithTag = getNodesByTag(tag);
|
||||||
(nodes as API.Node[])?.filter((n) =>
|
|
||||||
(n.tags || []).includes(tag),
|
|
||||||
) || [];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AccordionItem key={tag} value={String(tag)}>
|
<AccordionItem key={tag} value={String(tag)}>
|
||||||
@@ -836,22 +806,20 @@ export default function SubscribeForm<T extends Record<string, any>>({
|
|||||||
</AccordionTrigger>
|
</AccordionTrigger>
|
||||||
<AccordionContent>
|
<AccordionContent>
|
||||||
<ul className='space-y-1'>
|
<ul className='space-y-1'>
|
||||||
{(nodes as API.Node[])
|
{getNodesByTag(tag).map((node) => (
|
||||||
?.filter((n) => (n.tags || []).includes(tag))
|
<li
|
||||||
?.map((node) => (
|
key={node.id}
|
||||||
<li
|
className='flex items-center justify-between gap-3'
|
||||||
key={node.id}
|
>
|
||||||
className='flex items-center justify-between gap-3'
|
<span className='flex-1'>{node.name}</span>
|
||||||
>
|
<span className='flex-1'>
|
||||||
<span className='flex-1'>{node.name}</span>
|
{node.address}:{node.port}
|
||||||
<span className='flex-1'>
|
</span>
|
||||||
{node.address}:{node.port}
|
<span className='flex-1 text-right'>
|
||||||
</span>
|
{node.protocol}
|
||||||
<span className='flex-1 text-right'>
|
</span>
|
||||||
{node.protocol}
|
</li>
|
||||||
</span>
|
))}
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
</ul>
|
||||||
</AccordionContent>
|
</AccordionContent>
|
||||||
</AccordionItem>
|
</AccordionItem>
|
||||||
@@ -872,34 +840,32 @@ export default function SubscribeForm<T extends Record<string, any>>({
|
|||||||
<FormLabel>{t('form.node')}</FormLabel>
|
<FormLabel>{t('form.node')}</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<div className='flex flex-col gap-2'>
|
<div className='flex flex-col gap-2'>
|
||||||
{(nodes as API.Node[])
|
{getNodesWithoutTags().map((item) => {
|
||||||
?.filter((item) => (item.tags || []).length === 0)
|
const value = field.value || [];
|
||||||
?.map((item) => {
|
|
||||||
const value = field.value || [];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex items-center gap-2' key={item.id}>
|
<div className='flex items-center gap-2' key={item.id}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={value.includes(item.id!)}
|
checked={value.includes(item.id!)}
|
||||||
onCheckedChange={(checked) => {
|
onCheckedChange={(checked) => {
|
||||||
return checked
|
return checked
|
||||||
? form.setValue(field.name, [...value, item.id])
|
? form.setValue(field.name, [...value, item.id])
|
||||||
: form.setValue(
|
: form.setValue(
|
||||||
field.name,
|
field.name,
|
||||||
value.filter((value: number) => value !== item.id),
|
value.filter((value: number) => value !== item.id),
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Label className='flex w-full items-center justify-between gap-3'>
|
<Label className='flex w-full items-center justify-between gap-3'>
|
||||||
<span className='flex-1'>{item.name}</span>
|
<span className='flex-1'>{item.name}</span>
|
||||||
<span className='flex-1'>
|
<span className='flex-1'>
|
||||||
{item.address}:{item.port}
|
{item.address}:{item.port}
|
||||||
</span>
|
</span>
|
||||||
<span className='flex-1 text-right'>{item.protocol}</span>
|
<span className='flex-1 text-right'>{item.protocol}</span>
|
||||||
</Label>
|
</Label>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
subscribeSort,
|
subscribeSort,
|
||||||
updateSubscribe,
|
updateSubscribe,
|
||||||
} from '@/services/admin/subscribe';
|
} from '@/services/admin/subscribe';
|
||||||
|
import { useSubscribe } from '@/store/subscribe';
|
||||||
import { Badge } from '@workspace/ui/components/badge';
|
import { Badge } from '@workspace/ui/components/badge';
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
import { Switch } from '@workspace/ui/components/switch';
|
import { Switch } from '@workspace/ui/components/switch';
|
||||||
@@ -23,6 +24,7 @@ export default function SubscribeTable() {
|
|||||||
const t = useTranslations('product');
|
const t = useTranslations('product');
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const ref = useRef<ProTableActions>(null);
|
const ref = useRef<ProTableActions>(null);
|
||||||
|
const { fetchSubscribes } = useSubscribe();
|
||||||
return (
|
return (
|
||||||
<ProTable<API.SubscribeItem, { group_id: number; query: string }>
|
<ProTable<API.SubscribeItem, { group_id: number; query: string }>
|
||||||
action={ref}
|
action={ref}
|
||||||
@@ -42,6 +44,7 @@ export default function SubscribeTable() {
|
|||||||
});
|
});
|
||||||
toast.success(t('createSuccess'));
|
toast.success(t('createSuccess'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchSubscribes();
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -83,6 +86,7 @@ export default function SubscribeTable() {
|
|||||||
show: checked,
|
show: checked,
|
||||||
} as API.UpdateSubscribeRequest);
|
} as API.UpdateSubscribeRequest);
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchSubscribes();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@@ -101,6 +105,7 @@ export default function SubscribeTable() {
|
|||||||
sell: checked,
|
sell: checked,
|
||||||
} as API.UpdateSubscribeRequest);
|
} as API.UpdateSubscribeRequest);
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchSubscribes();
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@@ -186,6 +191,7 @@ export default function SubscribeTable() {
|
|||||||
} as API.UpdateSubscribeRequest);
|
} as API.UpdateSubscribeRequest);
|
||||||
toast.success(t('updateSuccess'));
|
toast.success(t('updateSuccess'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchSubscribes();
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -206,6 +212,7 @@ export default function SubscribeTable() {
|
|||||||
});
|
});
|
||||||
toast.success(t('deleteSuccess'));
|
toast.success(t('deleteSuccess'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchSubscribes();
|
||||||
}}
|
}}
|
||||||
cancelText={t('cancel')}
|
cancelText={t('cancel')}
|
||||||
confirmText={t('confirm')}
|
confirmText={t('confirm')}
|
||||||
@@ -224,6 +231,7 @@ export default function SubscribeTable() {
|
|||||||
} as API.CreateSubscribeRequest);
|
} as API.CreateSubscribeRequest);
|
||||||
toast.success(t('copySuccess'));
|
toast.success(t('copySuccess'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchSubscribes();
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -248,6 +256,7 @@ export default function SubscribeTable() {
|
|||||||
|
|
||||||
toast.success(t('deleteSuccess'));
|
toast.success(t('deleteSuccess'));
|
||||||
ref.current?.reset();
|
ref.current?.reset();
|
||||||
|
fetchSubscribes();
|
||||||
}}
|
}}
|
||||||
cancelText={t('cancel')}
|
cancelText={t('cancel')}
|
||||||
confirmText={t('confirm')}
|
confirmText={t('confirm')}
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
export const protocols = [
|
||||||
|
'shadowsocks',
|
||||||
|
'vmess',
|
||||||
|
'vless',
|
||||||
|
'trojan',
|
||||||
|
'hysteria2',
|
||||||
|
'tuic',
|
||||||
|
'anytls',
|
||||||
|
'socks',
|
||||||
|
'naive',
|
||||||
|
'http',
|
||||||
|
'mieru',
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
// Global label map for display; fallback to raw value if missing
|
||||||
|
export const LABELS = {
|
||||||
|
// transport
|
||||||
|
'tcp': 'TCP',
|
||||||
|
'udp': 'UDP',
|
||||||
|
'websocket': 'WebSocket',
|
||||||
|
'grpc': 'gRPC',
|
||||||
|
'mkcp': 'mKCP',
|
||||||
|
'httpupgrade': 'HTTP Upgrade',
|
||||||
|
'xhttp': 'XHTTP',
|
||||||
|
// security
|
||||||
|
'none': 'NONE',
|
||||||
|
'tls': 'TLS',
|
||||||
|
'reality': 'Reality',
|
||||||
|
// fingerprint
|
||||||
|
'chrome': 'Chrome',
|
||||||
|
'firefox': 'Firefox',
|
||||||
|
'safari': 'Safari',
|
||||||
|
'ios': 'IOS',
|
||||||
|
'android': 'Android',
|
||||||
|
'edge': 'edge',
|
||||||
|
'360': '360',
|
||||||
|
'qq': 'QQ',
|
||||||
|
// multiplex
|
||||||
|
'low': 'Low',
|
||||||
|
'middle': 'Middle',
|
||||||
|
'high': 'High',
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
// Flat arrays for enum-like sets
|
||||||
|
export const SS_CIPHERS = [
|
||||||
|
'aes-128-gcm',
|
||||||
|
'aes-192-gcm',
|
||||||
|
'aes-256-gcm',
|
||||||
|
'chacha20-ietf-poly1305',
|
||||||
|
'2022-blake3-aes-128-gcm',
|
||||||
|
'2022-blake3-aes-256-gcm',
|
||||||
|
'2022-blake3-chacha20-poly1305',
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
export const TRANSPORTS = {
|
||||||
|
vmess: ['tcp', 'websocket', 'grpc'] as const,
|
||||||
|
vless: ['tcp', 'websocket', 'grpc', 'mkcp', 'httpupgrade', 'xhttp'] as const,
|
||||||
|
trojan: ['tcp', 'websocket', 'grpc'] as const,
|
||||||
|
mieru: ['tcp', 'udp'] as const,
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export const SECURITY = {
|
||||||
|
vmess: ['none', 'tls'] as const,
|
||||||
|
vless: ['none', 'tls', 'reality'] as const,
|
||||||
|
trojan: ['tls'] as const,
|
||||||
|
hysteria2: ['tls'] as const,
|
||||||
|
tuic: ['tls'] as const,
|
||||||
|
anytls: ['tls'] as const,
|
||||||
|
naive: ['none', 'tls'] as const,
|
||||||
|
http: ['none', 'tls'] as const,
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export const FLOWS = {
|
||||||
|
vless: ['none', 'xtls-rprx-direct', 'xtls-rprx-splice', 'xtls-rprx-vision'] as const,
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export const TUIC_UDP_RELAY_MODES = ['native', 'quic'] as const;
|
||||||
|
export const TUIC_CONGESTION = ['bbr', 'cubic', 'new_reno'] as const;
|
||||||
|
export const XHTTP_MODES = ['auto', 'packet-up', 'stream-up', 'stream-one'] as const;
|
||||||
|
export const ENCRYPTION_TYPES = ['none', 'mlkem768x25519plus'] as const;
|
||||||
|
export const ENCRYPTION_MODES = ['native', 'xorpub', 'random'] as const;
|
||||||
|
export const ENCRYPTION_RTT = ['0rtt', '1rtt'] as const;
|
||||||
|
export const FINGERPRINTS = [
|
||||||
|
'chrome',
|
||||||
|
'firefox',
|
||||||
|
'safari',
|
||||||
|
'ios',
|
||||||
|
'android',
|
||||||
|
'edge',
|
||||||
|
'360',
|
||||||
|
'qq',
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
export const multiplexLevels = ['none', 'low', 'middle', 'high'] as const;
|
||||||
|
|
||||||
|
export function getLabel(value: string): string {
|
||||||
|
const label = (LABELS as Record<string, string>)[value];
|
||||||
|
return label ?? value.toUpperCase();
|
||||||
|
}
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
import { XHTTP_MODES } from './constants';
|
||||||
|
import type { ProtocolType } from './types';
|
||||||
|
|
||||||
|
export function getProtocolDefaultConfig(proto: ProtocolType) {
|
||||||
|
switch (proto) {
|
||||||
|
case 'shadowsocks':
|
||||||
|
return {
|
||||||
|
type: 'shadowsocks',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
cipher: 'chacha20-ietf-poly1305',
|
||||||
|
server_key: null,
|
||||||
|
obfs: 'none',
|
||||||
|
obfs_host: null,
|
||||||
|
obfs_path: null,
|
||||||
|
} as any;
|
||||||
|
case 'vmess':
|
||||||
|
return {
|
||||||
|
type: 'vmess',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
transport: 'tcp',
|
||||||
|
security: 'none',
|
||||||
|
} as any;
|
||||||
|
case 'vless':
|
||||||
|
return {
|
||||||
|
type: 'vless',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
transport: 'tcp',
|
||||||
|
security: 'none',
|
||||||
|
flow: 'none',
|
||||||
|
xhttp_mode: XHTTP_MODES[0], // 'auto'
|
||||||
|
xhttp_extra: null,
|
||||||
|
} as any;
|
||||||
|
case 'trojan':
|
||||||
|
return {
|
||||||
|
type: 'trojan',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
transport: 'tcp',
|
||||||
|
security: 'tls',
|
||||||
|
} as any;
|
||||||
|
case 'hysteria2':
|
||||||
|
return {
|
||||||
|
type: 'hysteria2',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
hop_ports: null,
|
||||||
|
hop_interval: null,
|
||||||
|
obfs: 'none',
|
||||||
|
obfs_password: null,
|
||||||
|
security: 'tls',
|
||||||
|
up_mbps: null,
|
||||||
|
down_mbps: null,
|
||||||
|
} as any;
|
||||||
|
case 'tuic':
|
||||||
|
return {
|
||||||
|
type: 'tuic',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
disable_sni: false,
|
||||||
|
reduce_rtt: false,
|
||||||
|
udp_relay_mode: 'native',
|
||||||
|
congestion_controller: 'bbr',
|
||||||
|
security: 'tls',
|
||||||
|
sni: null,
|
||||||
|
allow_insecure: false,
|
||||||
|
fingerprint: 'chrome',
|
||||||
|
} as any;
|
||||||
|
case 'socks':
|
||||||
|
return {
|
||||||
|
type: 'socks',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
} as any;
|
||||||
|
case 'naive':
|
||||||
|
return {
|
||||||
|
type: 'naive',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
security: 'none',
|
||||||
|
} as any;
|
||||||
|
case 'http':
|
||||||
|
return {
|
||||||
|
type: 'http',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
security: 'none',
|
||||||
|
} as any;
|
||||||
|
case 'mieru':
|
||||||
|
return {
|
||||||
|
type: 'mieru',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
multiplex: 'none',
|
||||||
|
transport: 'tcp',
|
||||||
|
} as any;
|
||||||
|
case 'anytls':
|
||||||
|
return {
|
||||||
|
type: 'anytls',
|
||||||
|
enable: false,
|
||||||
|
port: null,
|
||||||
|
security: 'tls',
|
||||||
|
padding_scheme: null,
|
||||||
|
sni: null,
|
||||||
|
allow_insecure: false,
|
||||||
|
fingerprint: 'chrome',
|
||||||
|
} as any;
|
||||||
|
default:
|
||||||
|
return {} as any;
|
||||||
|
}
|
||||||
|
}
|
||||||
+173
-387
@@ -1,357 +1,24 @@
|
|||||||
import { z } from 'zod';
|
import {
|
||||||
|
generateMLKEM768KeyPair,
|
||||||
export const protocols = [
|
generatePassword,
|
||||||
'shadowsocks',
|
generateRealityKeyPair,
|
||||||
'vmess',
|
generateRealityShortId,
|
||||||
'vless',
|
} from '../generate';
|
||||||
'trojan',
|
import {
|
||||||
'hysteria2',
|
ENCRYPTION_MODES,
|
||||||
'tuic',
|
ENCRYPTION_RTT,
|
||||||
'anytls',
|
ENCRYPTION_TYPES,
|
||||||
'socks',
|
FINGERPRINTS,
|
||||||
'naive',
|
FLOWS,
|
||||||
'http',
|
multiplexLevels,
|
||||||
'meru',
|
SECURITY,
|
||||||
] as const;
|
SS_CIPHERS,
|
||||||
|
TRANSPORTS,
|
||||||
export type FieldConfig = {
|
TUIC_CONGESTION,
|
||||||
name: string;
|
TUIC_UDP_RELAY_MODES,
|
||||||
type: 'input' | 'select' | 'switch' | 'number' | 'textarea';
|
XHTTP_MODES,
|
||||||
label: string;
|
} from './constants';
|
||||||
placeholder?: string | ((t: (key: string) => string, protocol: any) => string);
|
import type { FieldConfig } from './types';
|
||||||
options?: readonly string[];
|
|
||||||
defaultValue?: any;
|
|
||||||
min?: number;
|
|
||||||
max?: number;
|
|
||||||
step?: number;
|
|
||||||
suffix?: string;
|
|
||||||
password?: number;
|
|
||||||
condition?: (protocol: any, values: any) => boolean;
|
|
||||||
group?: 'basic' | 'transport' | 'security' | 'reality' | 'plugin';
|
|
||||||
gridSpan?: 1 | 2;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Global label map for display; fallback to raw value if missing
|
|
||||||
export const LABELS = {
|
|
||||||
// transport
|
|
||||||
'tcp': 'TCP',
|
|
||||||
'udp': 'UDP',
|
|
||||||
'websocket': 'WebSocket',
|
|
||||||
'grpc': 'gRPC',
|
|
||||||
'mkcp': 'mKCP',
|
|
||||||
'httpupgrade': 'HTTP Upgrade',
|
|
||||||
'xhttp': 'XHTTP',
|
|
||||||
// security
|
|
||||||
'none': 'NONE',
|
|
||||||
'tls': 'TLS',
|
|
||||||
'reality': 'Reality',
|
|
||||||
// fingerprint
|
|
||||||
'chrome': 'Chrome',
|
|
||||||
'firefox': 'Firefox',
|
|
||||||
'safari': 'Safari',
|
|
||||||
'ios': 'IOS',
|
|
||||||
'android': 'Android',
|
|
||||||
'edge': 'edge',
|
|
||||||
'360': '360',
|
|
||||||
'qq': 'QQ',
|
|
||||||
// multiplex
|
|
||||||
'off': 'Off',
|
|
||||||
'low': 'Low',
|
|
||||||
'middle': 'Middle',
|
|
||||||
'high': 'High',
|
|
||||||
// ss plugins
|
|
||||||
'v2ray-plugin': 'V2Ray Plugin',
|
|
||||||
'simple-obfs': 'Simple Obfs',
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
// Flat arrays for enum-like sets
|
|
||||||
export const SS_CIPHERS = [
|
|
||||||
'aes-128-gcm',
|
|
||||||
'aes-192-gcm',
|
|
||||||
'aes-256-gcm',
|
|
||||||
'chacha20-ietf-poly1305',
|
|
||||||
'2022-blake3-aes-128-gcm',
|
|
||||||
'2022-blake3-aes-256-gcm',
|
|
||||||
'2022-blake3-chacha20-poly1305',
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
export const SS_PLUGINS = ['none', 'simple-obfs', 'v2ray-plugin'] as const;
|
|
||||||
|
|
||||||
export const TRANSPORTS = {
|
|
||||||
vmess: ['tcp', 'websocket', 'grpc'] as const,
|
|
||||||
vless: ['tcp', 'websocket', 'grpc', 'mkcp', 'httpupgrade', 'xhttp'] as const,
|
|
||||||
trojan: ['tcp', 'websocket', 'grpc'] as const,
|
|
||||||
meru: ['tcp', 'udp'] as const,
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
export const SECURITY = {
|
|
||||||
vmess: ['none', 'tls'] as const,
|
|
||||||
vless: ['none', 'tls', 'reality'] as const,
|
|
||||||
trojan: ['tls'] as const,
|
|
||||||
hysteria2: ['tls'] as const,
|
|
||||||
tuic: ['tls'] as const,
|
|
||||||
anytls: ['tls'] as const,
|
|
||||||
naive: ['none', 'tls'] as const,
|
|
||||||
http: ['none', 'tls'] as const,
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
export const FLOWS = {
|
|
||||||
vless: ['none', 'xtls-rprx-direct', 'xtls-rprx-splice', 'xtls-rprx-vision'] as const,
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
export const TUIC_UDP_RELAY_MODES = ['native', 'quic'] as const;
|
|
||||||
export const TUIC_CONGESTION = ['bbr', 'cubic', 'new_reno'] as const;
|
|
||||||
export const FINGERPRINTS = [
|
|
||||||
'chrome',
|
|
||||||
'firefox',
|
|
||||||
'safari',
|
|
||||||
'ios',
|
|
||||||
'android',
|
|
||||||
'edge',
|
|
||||||
'360',
|
|
||||||
'qq',
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
export const multiplexLevels = ['off', 'low', 'middle', 'high'] as const;
|
|
||||||
|
|
||||||
export function getLabel(value: string): string {
|
|
||||||
const label = (LABELS as Record<string, string>)[value];
|
|
||||||
return label ?? value.toUpperCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
const nullableString = z.string().nullish();
|
|
||||||
const nullableBool = z.boolean().nullish();
|
|
||||||
const nullablePort = z.number().int().min(0).max(65535).nullish();
|
|
||||||
|
|
||||||
const ss = z.object({
|
|
||||||
type: z.literal('shadowsocks'),
|
|
||||||
host: nullableString,
|
|
||||||
port: nullablePort,
|
|
||||||
cipher: z.enum(SS_CIPHERS as any).nullish(),
|
|
||||||
server_key: nullableString,
|
|
||||||
plugin: z.enum(SS_PLUGINS as any).nullish(),
|
|
||||||
plugin_options: nullableString,
|
|
||||||
});
|
|
||||||
|
|
||||||
const vmess = z.object({
|
|
||||||
type: z.literal('vmess'),
|
|
||||||
host: nullableString,
|
|
||||||
port: nullablePort,
|
|
||||||
transport: z.enum(TRANSPORTS.vmess as any).nullish(),
|
|
||||||
security: z.enum(SECURITY.vmess as any).nullish(),
|
|
||||||
path: nullableString,
|
|
||||||
service_name: nullableString,
|
|
||||||
sni: nullableString,
|
|
||||||
allow_insecure: nullableBool,
|
|
||||||
fingerprint: nullableString,
|
|
||||||
});
|
|
||||||
|
|
||||||
const vless = z.object({
|
|
||||||
type: z.literal('vless'),
|
|
||||||
host: nullableString,
|
|
||||||
port: nullablePort,
|
|
||||||
transport: z.enum(TRANSPORTS.vless as any).nullish(),
|
|
||||||
security: z.enum(SECURITY.vless as any).nullish(),
|
|
||||||
path: nullableString,
|
|
||||||
service_name: nullableString,
|
|
||||||
flow: z.enum(FLOWS.vless as any).nullish(),
|
|
||||||
sni: nullableString,
|
|
||||||
allow_insecure: nullableBool,
|
|
||||||
fingerprint: nullableString,
|
|
||||||
reality_server_addr: nullableString,
|
|
||||||
reality_server_port: nullablePort,
|
|
||||||
reality_private_key: nullableString,
|
|
||||||
reality_public_key: nullableString,
|
|
||||||
reality_short_id: nullableString,
|
|
||||||
});
|
|
||||||
|
|
||||||
const trojan = z.object({
|
|
||||||
type: z.literal('trojan'),
|
|
||||||
host: nullableString,
|
|
||||||
port: nullablePort,
|
|
||||||
transport: z.enum(TRANSPORTS.trojan as any).nullish(),
|
|
||||||
security: z.enum(SECURITY.trojan as any).nullish(),
|
|
||||||
path: nullableString,
|
|
||||||
service_name: nullableString,
|
|
||||||
sni: nullableString,
|
|
||||||
allow_insecure: nullableBool,
|
|
||||||
fingerprint: nullableString,
|
|
||||||
});
|
|
||||||
|
|
||||||
const hysteria2 = z.object({
|
|
||||||
type: z.literal('hysteria2'),
|
|
||||||
hop_ports: nullableString,
|
|
||||||
hop_interval: z.number().nullish(),
|
|
||||||
obfs_password: nullableString,
|
|
||||||
port: nullablePort,
|
|
||||||
security: z.enum(SECURITY.hysteria2 as any).nullish(),
|
|
||||||
sni: nullableString,
|
|
||||||
allow_insecure: nullableBool,
|
|
||||||
fingerprint: nullableString,
|
|
||||||
up_mbps: z.number().nullish(),
|
|
||||||
down_mbps: z.number().nullish(),
|
|
||||||
});
|
|
||||||
|
|
||||||
const tuic = z.object({
|
|
||||||
type: z.literal('tuic'),
|
|
||||||
host: nullableString,
|
|
||||||
port: nullablePort,
|
|
||||||
disable_sni: z.boolean().nullish(),
|
|
||||||
reduce_rtt: z.boolean().nullish(),
|
|
||||||
udp_relay_mode: z.enum(TUIC_UDP_RELAY_MODES as any).nullish(),
|
|
||||||
congestion_controller: z.enum(TUIC_CONGESTION as any).nullish(),
|
|
||||||
security: z.enum(SECURITY.tuic as any).nullish(),
|
|
||||||
sni: nullableString,
|
|
||||||
allow_insecure: nullableBool,
|
|
||||||
fingerprint: nullableString,
|
|
||||||
});
|
|
||||||
|
|
||||||
const anytls = z.object({
|
|
||||||
type: z.literal('anytls'),
|
|
||||||
port: nullablePort,
|
|
||||||
security: z.enum(SECURITY.anytls as any).nullish(),
|
|
||||||
sni: nullableString,
|
|
||||||
allow_insecure: nullableBool,
|
|
||||||
fingerprint: nullableString,
|
|
||||||
padding_scheme: nullableString,
|
|
||||||
});
|
|
||||||
|
|
||||||
const socks = z.object({
|
|
||||||
type: z.literal('socks'),
|
|
||||||
port: nullablePort,
|
|
||||||
});
|
|
||||||
|
|
||||||
const naive = z.object({
|
|
||||||
type: z.literal('naive'),
|
|
||||||
port: nullablePort,
|
|
||||||
security: z.enum(SECURITY.naive as any).nullish(),
|
|
||||||
sni: nullableString,
|
|
||||||
allow_insecure: nullableBool,
|
|
||||||
fingerprint: nullableString,
|
|
||||||
});
|
|
||||||
|
|
||||||
const http = z.object({
|
|
||||||
type: z.literal('http'),
|
|
||||||
port: nullablePort,
|
|
||||||
security: z.enum(SECURITY.http as any).nullish(),
|
|
||||||
sni: nullableString,
|
|
||||||
allow_insecure: nullableBool,
|
|
||||||
fingerprint: nullableString,
|
|
||||||
});
|
|
||||||
|
|
||||||
const meru = z.object({
|
|
||||||
type: z.literal('meru'),
|
|
||||||
port: nullablePort,
|
|
||||||
multiplex: z.enum(multiplexLevels).nullish(),
|
|
||||||
transport: z.enum(TRANSPORTS.meru as any).nullish(),
|
|
||||||
});
|
|
||||||
|
|
||||||
export const protocolApiScheme = z.discriminatedUnion('type', [
|
|
||||||
ss,
|
|
||||||
vmess,
|
|
||||||
vless,
|
|
||||||
trojan,
|
|
||||||
hysteria2,
|
|
||||||
tuic,
|
|
||||||
anytls,
|
|
||||||
socks,
|
|
||||||
naive,
|
|
||||||
http,
|
|
||||||
meru,
|
|
||||||
]);
|
|
||||||
|
|
||||||
export const formSchema = z.object({
|
|
||||||
name: z.string().min(1),
|
|
||||||
address: z.string().min(1),
|
|
||||||
country: z.string().optional(),
|
|
||||||
city: z.string().optional(),
|
|
||||||
ratio: z.number().default(1),
|
|
||||||
protocols: z.array(protocolApiScheme),
|
|
||||||
});
|
|
||||||
|
|
||||||
export type ServerFormValues = z.infer<typeof formSchema>;
|
|
||||||
|
|
||||||
export type ProtocolType = (typeof protocols)[number];
|
|
||||||
|
|
||||||
export function getProtocolDefaultConfig(proto: ProtocolType) {
|
|
||||||
switch (proto) {
|
|
||||||
case 'shadowsocks':
|
|
||||||
return {
|
|
||||||
type: 'shadowsocks',
|
|
||||||
port: null,
|
|
||||||
cipher: 'chacha20-ietf-poly1305',
|
|
||||||
server_key: null,
|
|
||||||
plugin: 'none',
|
|
||||||
plugin_opts: null,
|
|
||||||
} as any;
|
|
||||||
case 'vmess':
|
|
||||||
return { type: 'vmess', port: null, transport: 'tcp', security: 'none' } as any;
|
|
||||||
case 'vless':
|
|
||||||
return { type: 'vless', port: null, transport: 'tcp', security: 'none', flow: 'none' } as any;
|
|
||||||
case 'trojan':
|
|
||||||
return { type: 'trojan', port: null, transport: 'tcp', security: 'tls' } as any;
|
|
||||||
case 'hysteria2':
|
|
||||||
return {
|
|
||||||
type: 'hysteria2',
|
|
||||||
port: null,
|
|
||||||
hop_ports: null,
|
|
||||||
hop_interval: null,
|
|
||||||
obfs_password: null,
|
|
||||||
security: 'tls',
|
|
||||||
up_mbps: null,
|
|
||||||
down_mbps: null,
|
|
||||||
} as any;
|
|
||||||
case 'tuic':
|
|
||||||
return {
|
|
||||||
type: 'tuic',
|
|
||||||
port: null,
|
|
||||||
disable_sni: false,
|
|
||||||
reduce_rtt: false,
|
|
||||||
udp_relay_mode: 'native',
|
|
||||||
congestion_controller: 'bbr',
|
|
||||||
security: 'tls',
|
|
||||||
sni: null,
|
|
||||||
allow_insecure: false,
|
|
||||||
fingerprint: 'chrome',
|
|
||||||
} as any;
|
|
||||||
case 'socks':
|
|
||||||
return {
|
|
||||||
type: 'socks',
|
|
||||||
port: null,
|
|
||||||
} as any;
|
|
||||||
case 'naive':
|
|
||||||
return {
|
|
||||||
type: 'naive',
|
|
||||||
port: null,
|
|
||||||
security: 'none',
|
|
||||||
} as any;
|
|
||||||
case 'http':
|
|
||||||
return {
|
|
||||||
type: 'http',
|
|
||||||
port: null,
|
|
||||||
security: 'none',
|
|
||||||
} as any;
|
|
||||||
case 'meru':
|
|
||||||
return {
|
|
||||||
type: 'meru',
|
|
||||||
port: null,
|
|
||||||
multiplex: 'off',
|
|
||||||
transport: 'tcp',
|
|
||||||
} as any;
|
|
||||||
case 'anytls':
|
|
||||||
return {
|
|
||||||
type: 'anytls',
|
|
||||||
port: null,
|
|
||||||
security: 'tls',
|
|
||||||
padding_scheme: null,
|
|
||||||
sni: null,
|
|
||||||
allow_insecure: false,
|
|
||||||
fingerprint: 'chrome',
|
|
||||||
} as any;
|
|
||||||
default:
|
|
||||||
return {} as any;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
||||||
shadowsocks: [
|
shadowsocks: [
|
||||||
@@ -367,7 +34,7 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
{
|
{
|
||||||
name: 'cipher',
|
name: 'cipher',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: 'encryption_method',
|
label: 'cipher',
|
||||||
options: SS_CIPHERS,
|
options: SS_CIPHERS,
|
||||||
defaultValue: 'chacha20-ietf-poly1305',
|
defaultValue: 'chacha20-ietf-poly1305',
|
||||||
group: 'basic',
|
group: 'basic',
|
||||||
@@ -376,7 +43,9 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
name: 'server_key',
|
name: 'server_key',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'server_key',
|
label: 'server_key',
|
||||||
password: 32,
|
generate: {
|
||||||
|
function: () => generatePassword(32),
|
||||||
|
},
|
||||||
group: 'basic',
|
group: 'basic',
|
||||||
condition: (p) =>
|
condition: (p) =>
|
||||||
[
|
[
|
||||||
@@ -386,29 +55,28 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
].includes(p.cipher),
|
].includes(p.cipher),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'plugin',
|
name: 'obfs',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: 'plugin',
|
label: 'obfs',
|
||||||
options: SS_PLUGINS,
|
options: ['none', 'http', 'tls'],
|
||||||
defaultValue: 'none',
|
defaultValue: 'none',
|
||||||
group: 'plugin',
|
group: 'obfs',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'plugin_opts',
|
name: 'obfs_host',
|
||||||
type: 'textarea',
|
type: 'input',
|
||||||
label: 'plugin_opts',
|
label: 'obfs_host',
|
||||||
placeholder: (t: (key: string) => string, p: any) => {
|
placeholder: 'e.g. www.bing.com',
|
||||||
switch (p.plugin) {
|
group: 'obfs',
|
||||||
case 'simple-obfs':
|
condition: (p) => p.obfs && p.obfs !== 'none',
|
||||||
return 'obfs=http;obfs-host=www.bing.com;path=/';
|
},
|
||||||
case 'v2ray-plugin':
|
{
|
||||||
return 'WebSocket: mode=websocket;host=mydomain.me;path=/;tls=true\n\nQUIC: mode=quic;host=mydomain.me';
|
name: 'obfs_path',
|
||||||
default:
|
type: 'input',
|
||||||
return 'key=value;key2=value2';
|
label: 'obfs_path',
|
||||||
}
|
placeholder: 'e.g. /path/to/obfs',
|
||||||
},
|
group: 'obfs',
|
||||||
group: 'plugin',
|
condition: (p) => p.obfs && p.obfs !== 'none',
|
||||||
condition: (p) => ['simple-obfs', 'v2ray-plugin'].includes(p.plugin),
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
vmess: [
|
vmess: [
|
||||||
@@ -441,6 +109,7 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
name: 'host',
|
name: 'host',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'host',
|
label: 'host',
|
||||||
|
placeholder: 'e.g. www.bing.com',
|
||||||
group: 'transport',
|
group: 'transport',
|
||||||
condition: (p) => ['websocket', 'xhttp', 'httpupgrade'].includes(p.transport),
|
condition: (p) => ['websocket', 'xhttp', 'httpupgrade'].includes(p.transport),
|
||||||
},
|
},
|
||||||
@@ -448,6 +117,7 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
name: 'path',
|
name: 'path',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'path',
|
label: 'path',
|
||||||
|
placeholder: 'e.g. /path/to/obfs',
|
||||||
group: 'transport',
|
group: 'transport',
|
||||||
condition: (p) => ['websocket', 'xhttp', 'httpupgrade'].includes(p.transport),
|
condition: (p) => ['websocket', 'xhttp', 'httpupgrade'].includes(p.transport),
|
||||||
},
|
},
|
||||||
@@ -492,14 +162,6 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
placeholder: '1-65535',
|
placeholder: '1-65535',
|
||||||
group: 'basic',
|
group: 'basic',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'flow',
|
|
||||||
type: 'select',
|
|
||||||
label: 'flow',
|
|
||||||
options: FLOWS.vless,
|
|
||||||
defaultValue: 'none',
|
|
||||||
group: 'basic',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'transport',
|
name: 'transport',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -508,6 +170,15 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
defaultValue: 'tcp',
|
defaultValue: 'tcp',
|
||||||
group: 'transport',
|
group: 'transport',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'flow',
|
||||||
|
type: 'select',
|
||||||
|
label: 'flow',
|
||||||
|
options: FLOWS.vless,
|
||||||
|
defaultValue: 'none',
|
||||||
|
group: 'transport',
|
||||||
|
condition: (p) => p.transport === 'tcp',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'security',
|
name: 'security',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@@ -520,6 +191,7 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
name: 'host',
|
name: 'host',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'host',
|
label: 'host',
|
||||||
|
placeholder: 'e.g. www.bing.com',
|
||||||
group: 'transport',
|
group: 'transport',
|
||||||
condition: (p) => ['websocket', 'mkcp', 'httpupgrade', 'xhttp'].includes(p.transport),
|
condition: (p) => ['websocket', 'mkcp', 'httpupgrade', 'xhttp'].includes(p.transport),
|
||||||
},
|
},
|
||||||
@@ -527,6 +199,7 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
name: 'path',
|
name: 'path',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'path',
|
label: 'path',
|
||||||
|
placeholder: 'e.g. /path/to/obfs',
|
||||||
group: 'transport',
|
group: 'transport',
|
||||||
condition: (p) => ['websocket', 'mkcp', 'httpupgrade', 'xhttp'].includes(p.transport),
|
condition: (p) => ['websocket', 'mkcp', 'httpupgrade', 'xhttp'].includes(p.transport),
|
||||||
},
|
},
|
||||||
@@ -537,6 +210,23 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
group: 'transport',
|
group: 'transport',
|
||||||
condition: (p) => p.transport === 'grpc',
|
condition: (p) => p.transport === 'grpc',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'xhttp_mode',
|
||||||
|
type: 'select',
|
||||||
|
label: 'mode',
|
||||||
|
options: XHTTP_MODES,
|
||||||
|
defaultValue: 'auto',
|
||||||
|
group: 'transport',
|
||||||
|
condition: (p) => p.transport === 'xhttp',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'xhttp_extra',
|
||||||
|
type: 'textarea',
|
||||||
|
label: 'extra',
|
||||||
|
placeholder: '{}',
|
||||||
|
group: 'transport',
|
||||||
|
condition: (p) => p.transport === 'xhttp',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'sni',
|
name: 'sni',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
@@ -584,6 +274,13 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
label: 'security_private_key',
|
label: 'security_private_key',
|
||||||
placeholder: (t) => t('security_private_key_placeholder'),
|
placeholder: (t) => t('security_private_key_placeholder'),
|
||||||
group: 'reality',
|
group: 'reality',
|
||||||
|
generate: {
|
||||||
|
function: generateRealityKeyPair,
|
||||||
|
updateFields: {
|
||||||
|
reality_private_key: 'privateKey',
|
||||||
|
reality_public_key: 'publicKey',
|
||||||
|
},
|
||||||
|
},
|
||||||
condition: (p) => p.security === 'reality',
|
condition: (p) => p.security === 'reality',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -599,8 +296,84 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'security_short_id',
|
label: 'security_short_id',
|
||||||
group: 'reality',
|
group: 'reality',
|
||||||
|
generate: {
|
||||||
|
function: generateRealityShortId,
|
||||||
|
},
|
||||||
condition: (p) => p.security === 'reality',
|
condition: (p) => p.security === 'reality',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'encryption',
|
||||||
|
type: 'select',
|
||||||
|
label: 'encryption',
|
||||||
|
options: ENCRYPTION_TYPES,
|
||||||
|
defaultValue: 'none',
|
||||||
|
group: 'encryption',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'encryption_mode',
|
||||||
|
type: 'select',
|
||||||
|
label: 'encryption_mode',
|
||||||
|
options: ENCRYPTION_MODES,
|
||||||
|
defaultValue: 'native',
|
||||||
|
group: 'encryption',
|
||||||
|
condition: (p) => p.encryption === 'mlkem768x25519plus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'encryption_rtt',
|
||||||
|
type: 'select',
|
||||||
|
label: 'encryption_rtt',
|
||||||
|
options: ENCRYPTION_RTT,
|
||||||
|
defaultValue: '1rtt',
|
||||||
|
group: 'encryption',
|
||||||
|
condition: (p) => p.encryption === 'mlkem768x25519plus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'encryption_ticket',
|
||||||
|
type: 'input',
|
||||||
|
label: 'encryption_ticket',
|
||||||
|
placeholder: 'e.g. 600s',
|
||||||
|
group: 'encryption',
|
||||||
|
condition: (p) => p.encryption === 'mlkem768x25519plus' && p.encryption_rtt === '0rtt',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'encryption_server_padding',
|
||||||
|
type: 'input',
|
||||||
|
label: 'encryption_server_padding',
|
||||||
|
placeholder: 'e.g. 100-111-1111.75-0-111.50-0-3333',
|
||||||
|
group: 'encryption',
|
||||||
|
condition: (p) => p.encryption === 'mlkem768x25519plus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'encryption_private_key',
|
||||||
|
type: 'input',
|
||||||
|
label: 'encryption_private_key',
|
||||||
|
placeholder: (t) => t('encryption_private_key_placeholder'),
|
||||||
|
group: 'encryption',
|
||||||
|
generate: {
|
||||||
|
function: generateMLKEM768KeyPair,
|
||||||
|
updateFields: {
|
||||||
|
encryption_private_key: 'privateKey',
|
||||||
|
encryption_password: 'publicKey',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
condition: (p) => p.encryption === 'mlkem768x25519plus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'encryption_client_padding',
|
||||||
|
type: 'input',
|
||||||
|
label: 'encryption_client_padding',
|
||||||
|
placeholder: 'e.g. 100-111-1111.75-0-111.50-0-3333',
|
||||||
|
group: 'encryption',
|
||||||
|
condition: (p) => p.encryption === 'mlkem768x25519plus',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'encryption_password',
|
||||||
|
type: 'input',
|
||||||
|
label: 'encryption_password',
|
||||||
|
placeholder: (t) => t('encryption_password_placeholder'),
|
||||||
|
group: 'encryption',
|
||||||
|
condition: (p) => p.encryption === 'mlkem768x25519plus',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
trojan: [
|
trojan: [
|
||||||
{
|
{
|
||||||
@@ -632,6 +405,7 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
name: 'host',
|
name: 'host',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'host',
|
label: 'host',
|
||||||
|
placeholder: 'e.g. www.bing.com',
|
||||||
group: 'transport',
|
group: 'transport',
|
||||||
condition: (p) => ['websocket', 'xhttp', 'httpupgrade'].includes(p.transport),
|
condition: (p) => ['websocket', 'xhttp', 'httpupgrade'].includes(p.transport),
|
||||||
},
|
},
|
||||||
@@ -639,6 +413,7 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
name: 'path',
|
name: 'path',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'path',
|
label: 'path',
|
||||||
|
placeholder: 'e.g. /path/to/obfs',
|
||||||
group: 'transport',
|
group: 'transport',
|
||||||
condition: (p) => ['websocket', 'xhttp', 'httpupgrade'].includes(p.transport),
|
condition: (p) => ['websocket', 'xhttp', 'httpupgrade'].includes(p.transport),
|
||||||
},
|
},
|
||||||
@@ -699,13 +474,24 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
suffix: 'S',
|
suffix: 'S',
|
||||||
group: 'basic',
|
group: 'basic',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'obfs',
|
||||||
|
type: 'select',
|
||||||
|
label: 'obfs',
|
||||||
|
options: ['none', 'salamander'],
|
||||||
|
defaultValue: 'none',
|
||||||
|
group: 'obfs',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'obfs_password',
|
name: 'obfs_password',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: 'obfs_password',
|
label: 'obfs_password',
|
||||||
placeholder: (t) => t('obfs_password_placeholder'),
|
placeholder: (t) => t('obfs_password_placeholder'),
|
||||||
password: 16,
|
generate: {
|
||||||
group: 'basic',
|
function: () => generatePassword(16),
|
||||||
|
},
|
||||||
|
group: 'obfs',
|
||||||
|
condition: (p) => p.obfs && p.obfs !== 'none',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'up_mbps',
|
name: 'up_mbps',
|
||||||
@@ -870,7 +656,7 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
condition: (p) => p.security !== 'none',
|
condition: (p) => p.security !== 'none',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
meru: [
|
mieru: [
|
||||||
{
|
{
|
||||||
name: 'port',
|
name: 'port',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
@@ -892,7 +678,7 @@ export const PROTOCOL_FIELDS: Record<string, FieldConfig[]> = {
|
|||||||
name: 'transport',
|
name: 'transport',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: 'transport',
|
label: 'transport',
|
||||||
options: TRANSPORTS.meru,
|
options: TRANSPORTS.mieru,
|
||||||
defaultValue: 'tcp',
|
defaultValue: 'tcp',
|
||||||
group: 'transport',
|
group: 'transport',
|
||||||
},
|
},
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
// Re-export all constants
|
||||||
|
export {
|
||||||
|
ENCRYPTION_MODES,
|
||||||
|
ENCRYPTION_RTT,
|
||||||
|
ENCRYPTION_TYPES,
|
||||||
|
FINGERPRINTS,
|
||||||
|
FLOWS,
|
||||||
|
LABELS,
|
||||||
|
SECURITY,
|
||||||
|
SS_CIPHERS,
|
||||||
|
TRANSPORTS,
|
||||||
|
TUIC_CONGESTION,
|
||||||
|
TUIC_UDP_RELAY_MODES,
|
||||||
|
XHTTP_MODES,
|
||||||
|
getLabel,
|
||||||
|
multiplexLevels,
|
||||||
|
protocols,
|
||||||
|
} from './constants';
|
||||||
|
|
||||||
|
// Re-export all types
|
||||||
|
export type { FieldConfig, ProtocolType } from './types';
|
||||||
|
|
||||||
|
// Re-export all schemas
|
||||||
|
export { formSchema, protocolApiScheme } from './schemas';
|
||||||
|
|
||||||
|
// Re-export defaults
|
||||||
|
export { getProtocolDefaultConfig } from './defaults';
|
||||||
|
|
||||||
|
// Re-export fields
|
||||||
|
export { PROTOCOL_FIELDS } from './fields';
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
import { z } from 'zod';
|
||||||
|
import {
|
||||||
|
ENCRYPTION_MODES,
|
||||||
|
ENCRYPTION_RTT,
|
||||||
|
ENCRYPTION_TYPES,
|
||||||
|
FLOWS,
|
||||||
|
multiplexLevels,
|
||||||
|
SECURITY,
|
||||||
|
SS_CIPHERS,
|
||||||
|
TRANSPORTS,
|
||||||
|
TUIC_CONGESTION,
|
||||||
|
TUIC_UDP_RELAY_MODES,
|
||||||
|
XHTTP_MODES,
|
||||||
|
} from './constants';
|
||||||
|
|
||||||
|
const nullableString = z.string().nullish();
|
||||||
|
const nullableBool = z.boolean().nullish();
|
||||||
|
const nullablePort = z.number().int().min(0).max(65535).nullish();
|
||||||
|
|
||||||
|
const ss = z.object({
|
||||||
|
type: z.literal('shadowsocks'),
|
||||||
|
enable: nullableBool,
|
||||||
|
host: nullableString,
|
||||||
|
port: nullablePort,
|
||||||
|
cipher: z.enum(SS_CIPHERS).nullish(),
|
||||||
|
server_key: nullableString,
|
||||||
|
obfs: z.enum(['none', 'http', 'tls'] as const).nullish(),
|
||||||
|
obfs_host: nullableString,
|
||||||
|
obfs_path: nullableString,
|
||||||
|
});
|
||||||
|
|
||||||
|
const vmess = z.object({
|
||||||
|
type: z.literal('vmess'),
|
||||||
|
enable: nullableBool,
|
||||||
|
host: nullableString,
|
||||||
|
port: nullablePort,
|
||||||
|
transport: z.enum(TRANSPORTS.vmess).nullish(),
|
||||||
|
security: z.enum(SECURITY.vmess).nullish(),
|
||||||
|
path: nullableString,
|
||||||
|
service_name: nullableString,
|
||||||
|
sni: nullableString,
|
||||||
|
allow_insecure: nullableBool,
|
||||||
|
fingerprint: nullableString,
|
||||||
|
});
|
||||||
|
|
||||||
|
const vless = z.object({
|
||||||
|
type: z.literal('vless'),
|
||||||
|
enable: nullableBool,
|
||||||
|
host: nullableString,
|
||||||
|
port: nullablePort,
|
||||||
|
transport: z.enum(TRANSPORTS.vless).nullish(),
|
||||||
|
security: z.enum(SECURITY.vless).nullish(),
|
||||||
|
path: nullableString,
|
||||||
|
service_name: nullableString,
|
||||||
|
flow: z.enum(FLOWS.vless).nullish(),
|
||||||
|
sni: nullableString,
|
||||||
|
allow_insecure: nullableBool,
|
||||||
|
fingerprint: nullableString,
|
||||||
|
reality_server_addr: nullableString,
|
||||||
|
reality_server_port: nullablePort,
|
||||||
|
reality_private_key: nullableString,
|
||||||
|
reality_public_key: nullableString,
|
||||||
|
reality_short_id: nullableString,
|
||||||
|
xhttp_mode: z.enum(XHTTP_MODES).nullish(),
|
||||||
|
xhttp_extra: nullableString,
|
||||||
|
encryption: z.enum(ENCRYPTION_TYPES).nullish(),
|
||||||
|
encryption_mode: z.enum(ENCRYPTION_MODES).nullish(),
|
||||||
|
encryption_rtt: z.enum(ENCRYPTION_RTT).nullish(),
|
||||||
|
encryption_ticket: nullableString,
|
||||||
|
encryption_server_padding: nullableString,
|
||||||
|
encryption_private_key: nullableString,
|
||||||
|
encryption_client_padding: nullableString,
|
||||||
|
encryption_password: nullableString,
|
||||||
|
});
|
||||||
|
|
||||||
|
const trojan = z.object({
|
||||||
|
type: z.literal('trojan'),
|
||||||
|
enable: nullableBool,
|
||||||
|
host: nullableString,
|
||||||
|
port: nullablePort,
|
||||||
|
transport: z.enum(TRANSPORTS.trojan).nullish(),
|
||||||
|
security: z.enum(SECURITY.trojan).nullish(),
|
||||||
|
path: nullableString,
|
||||||
|
service_name: nullableString,
|
||||||
|
sni: nullableString,
|
||||||
|
allow_insecure: nullableBool,
|
||||||
|
fingerprint: nullableString,
|
||||||
|
});
|
||||||
|
|
||||||
|
const hysteria2 = z.object({
|
||||||
|
type: z.literal('hysteria2'),
|
||||||
|
enable: nullableBool,
|
||||||
|
hop_ports: nullableString,
|
||||||
|
hop_interval: z.number().nullish(),
|
||||||
|
obfs_password: nullableString,
|
||||||
|
obfs: z.enum(['none', 'salamander'] as const).nullish(),
|
||||||
|
port: nullablePort,
|
||||||
|
security: z.enum(SECURITY.hysteria2).nullish(),
|
||||||
|
sni: nullableString,
|
||||||
|
allow_insecure: nullableBool,
|
||||||
|
fingerprint: nullableString,
|
||||||
|
up_mbps: z.number().nullish(),
|
||||||
|
down_mbps: z.number().nullish(),
|
||||||
|
});
|
||||||
|
|
||||||
|
const tuic = z.object({
|
||||||
|
type: z.literal('tuic'),
|
||||||
|
enable: nullableBool,
|
||||||
|
host: nullableString,
|
||||||
|
port: nullablePort,
|
||||||
|
disable_sni: z.boolean().nullish(),
|
||||||
|
reduce_rtt: z.boolean().nullish(),
|
||||||
|
udp_relay_mode: z.enum(TUIC_UDP_RELAY_MODES).nullish(),
|
||||||
|
congestion_controller: z.enum(TUIC_CONGESTION).nullish(),
|
||||||
|
security: z.enum(SECURITY.tuic).nullish(),
|
||||||
|
sni: nullableString,
|
||||||
|
allow_insecure: nullableBool,
|
||||||
|
fingerprint: nullableString,
|
||||||
|
});
|
||||||
|
|
||||||
|
const anytls = z.object({
|
||||||
|
type: z.literal('anytls'),
|
||||||
|
enable: nullableBool,
|
||||||
|
port: nullablePort,
|
||||||
|
security: z.enum(SECURITY.anytls).nullish(),
|
||||||
|
sni: nullableString,
|
||||||
|
allow_insecure: nullableBool,
|
||||||
|
fingerprint: nullableString,
|
||||||
|
padding_scheme: nullableString,
|
||||||
|
});
|
||||||
|
|
||||||
|
const socks = z.object({
|
||||||
|
type: z.literal('socks'),
|
||||||
|
enable: nullableBool,
|
||||||
|
port: nullablePort,
|
||||||
|
});
|
||||||
|
|
||||||
|
const naive = z.object({
|
||||||
|
type: z.literal('naive'),
|
||||||
|
enable: nullableBool,
|
||||||
|
port: nullablePort,
|
||||||
|
security: z.enum(SECURITY.naive).nullish(),
|
||||||
|
sni: nullableString,
|
||||||
|
allow_insecure: nullableBool,
|
||||||
|
fingerprint: nullableString,
|
||||||
|
});
|
||||||
|
|
||||||
|
const http = z.object({
|
||||||
|
type: z.literal('http'),
|
||||||
|
enable: nullableBool,
|
||||||
|
port: nullablePort,
|
||||||
|
security: z.enum(SECURITY.http).nullish(),
|
||||||
|
sni: nullableString,
|
||||||
|
allow_insecure: nullableBool,
|
||||||
|
fingerprint: nullableString,
|
||||||
|
});
|
||||||
|
|
||||||
|
const mieru = z.object({
|
||||||
|
type: z.literal('mieru'),
|
||||||
|
enable: nullableBool,
|
||||||
|
port: nullablePort,
|
||||||
|
multiplex: z.enum(multiplexLevels).nullish(),
|
||||||
|
transport: z.enum(TRANSPORTS.mieru).nullish(),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const protocolApiScheme = z.discriminatedUnion('type', [
|
||||||
|
ss,
|
||||||
|
vmess,
|
||||||
|
vless,
|
||||||
|
trojan,
|
||||||
|
hysteria2,
|
||||||
|
tuic,
|
||||||
|
anytls,
|
||||||
|
socks,
|
||||||
|
naive,
|
||||||
|
http,
|
||||||
|
mieru,
|
||||||
|
]);
|
||||||
|
|
||||||
|
export const formSchema = z.object({
|
||||||
|
name: z.string().min(1),
|
||||||
|
address: z.string().min(1),
|
||||||
|
country: z.string().optional(),
|
||||||
|
city: z.string().optional(),
|
||||||
|
ratio: z.number().default(1),
|
||||||
|
protocols: z.array(protocolApiScheme),
|
||||||
|
});
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { protocols } from './constants';
|
||||||
|
|
||||||
|
export type FieldConfig = {
|
||||||
|
name: string;
|
||||||
|
type: 'input' | 'select' | 'switch' | 'number' | 'textarea';
|
||||||
|
label: string;
|
||||||
|
placeholder?: string | ((t: (key: string) => string, protocol: any) => string);
|
||||||
|
options?: readonly string[];
|
||||||
|
defaultValue?: any;
|
||||||
|
min?: number;
|
||||||
|
max?: number;
|
||||||
|
step?: number;
|
||||||
|
suffix?: string;
|
||||||
|
generate?: {
|
||||||
|
function: () => Promise<string | Record<string, string>> | string | Record<string, string>;
|
||||||
|
updateFields?: Record<string, string>;
|
||||||
|
};
|
||||||
|
condition?: (protocol: any, values: any) => boolean;
|
||||||
|
group?: 'basic' | 'transport' | 'security' | 'reality' | 'obfs' | 'encryption';
|
||||||
|
gridSpan?: 1 | 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ProtocolType = (typeof protocols)[number];
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
export { generateMLKEM768KeyPair } from './mlkem768';
|
||||||
|
export { generateRealityShortId } from './short-id';
|
||||||
|
export { generatePassword } from './uid';
|
||||||
|
export { generateRealityKeyPair } from './x25519';
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import mlkem from 'mlkem-wasm';
|
||||||
|
import { toB64Url } from './util';
|
||||||
|
|
||||||
|
export async function generateMLKEM768KeyPair() {
|
||||||
|
const mlkemKeyPair = await mlkem.generateKey({ name: 'ML-KEM-768' }, true, [
|
||||||
|
'encapsulateBits',
|
||||||
|
'decapsulateBits',
|
||||||
|
]);
|
||||||
|
const mlkemPublicKeyRaw = await mlkem.exportKey('raw-public', mlkemKeyPair.publicKey);
|
||||||
|
const mlkemPrivateKeyRaw = await mlkem.exportKey('raw-seed', mlkemKeyPair.privateKey);
|
||||||
|
|
||||||
|
return {
|
||||||
|
publicKey: toB64Url(new Uint8Array(mlkemPublicKeyRaw)),
|
||||||
|
privateKey: toB64Url(new Uint8Array(mlkemPrivateKeyRaw)),
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* Generate a short ID for Reality
|
||||||
|
* @returns A random hexadecimal string of length 2, 4, 6, 8, 10, 12, 14, or 16
|
||||||
|
*/
|
||||||
|
export function generateRealityShortId() {
|
||||||
|
const hex = '0123456789abcdef';
|
||||||
|
const lengths = [2, 4, 6, 8, 10, 12, 14, 16];
|
||||||
|
const idx = Math.floor(Math.random() * lengths.length);
|
||||||
|
const len = lengths[idx] ?? 16;
|
||||||
|
let out = '';
|
||||||
|
for (let i = 0; i < len; i++) {
|
||||||
|
out += hex.charAt(Math.floor(Math.random() * hex.length));
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { uid } from 'radash';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a random password
|
||||||
|
* @param length Length of the password
|
||||||
|
* @param charset Character set to use (defaults to alphanumeric)
|
||||||
|
* @returns Randomly generated password
|
||||||
|
*/
|
||||||
|
export function generatePassword(length = 16, charset?: string) {
|
||||||
|
return uid(length, charset).toLowerCase();
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export function toB64Url(bytes: Uint8Array) {
|
||||||
|
return btoa(String.fromCharCode(...bytes))
|
||||||
|
.replace(/\+/g, '-')
|
||||||
|
.replace(/\//g, '_')
|
||||||
|
.replace(/=+$/g, '');
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { x25519 } from '@noble/curves/ed25519';
|
||||||
|
import { toB64Url } from './util';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a Reality key pair
|
||||||
|
* @returns An object containing the private and public keys in base64url format
|
||||||
|
*/
|
||||||
|
export function generateRealityKeyPair() {
|
||||||
|
const { secretKey, publicKey } = x25519.keygen();
|
||||||
|
return { privateKey: toB64Url(secretKey), publicKey: toB64Url(publicKey) };
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
'use client';
|
'use client';
|
||||||
// Online users detail moved to separate component
|
|
||||||
import { ProTable, ProTableActions } from '@/components/pro-table';
|
import { ProTable, ProTableActions } from '@/components/pro-table';
|
||||||
import {
|
import {
|
||||||
createServer,
|
createServer,
|
||||||
@@ -10,6 +10,8 @@ import {
|
|||||||
resetSortWithServer,
|
resetSortWithServer,
|
||||||
updateServer,
|
updateServer,
|
||||||
} from '@/services/admin/server';
|
} from '@/services/admin/server';
|
||||||
|
import { useNode } from '@/store/node';
|
||||||
|
import { useServer } from '@/store/server';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { Badge } from '@workspace/ui/components/badge';
|
import { Badge } from '@workspace/ui/components/badge';
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
@@ -23,18 +25,6 @@ import OnlineUsersCell from './online-users-cell';
|
|||||||
import ServerConfig from './server-config';
|
import ServerConfig from './server-config';
|
||||||
import ServerForm from './server-form';
|
import ServerForm from './server-form';
|
||||||
|
|
||||||
type ProtocolName = 'shadowsocks' | 'vmess' | 'vless' | 'trojan' | 'hysteria2' | 'tuic' | 'anytls';
|
|
||||||
|
|
||||||
const PROTOCOL_COLORS: Record<ProtocolName, string> = {
|
|
||||||
shadowsocks: 'bg-green-500',
|
|
||||||
vmess: 'bg-rose-500',
|
|
||||||
vless: 'bg-blue-500',
|
|
||||||
trojan: 'bg-yellow-500',
|
|
||||||
hysteria2: 'bg-purple-500',
|
|
||||||
tuic: 'bg-cyan-500',
|
|
||||||
anytls: 'bg-gray-500',
|
|
||||||
};
|
|
||||||
|
|
||||||
function PctBar({ value }: { value: number }) {
|
function PctBar({ value }: { value: number }) {
|
||||||
const v = value.toFixed(2);
|
const v = value.toFixed(2);
|
||||||
return (
|
return (
|
||||||
@@ -69,6 +59,8 @@ function RegionIpCell({
|
|||||||
|
|
||||||
export default function ServersPage() {
|
export default function ServersPage() {
|
||||||
const t = useTranslations('servers');
|
const t = useTranslations('servers');
|
||||||
|
const { isServerReferencedByNodes } = useNode();
|
||||||
|
const { fetchServers } = useServer();
|
||||||
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [migrating, setMigrating] = useState(false);
|
const [migrating, setMigrating] = useState(false);
|
||||||
@@ -129,6 +121,7 @@ export default function ServersPage() {
|
|||||||
await createServer(values as unknown as API.CreateServerRequest);
|
await createServer(values as unknown as API.CreateServerRequest);
|
||||||
toast.success(t('created'));
|
toast.success(t('created'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchServers();
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -163,23 +156,16 @@ export default function ServersPage() {
|
|||||||
accessorKey: 'protocols',
|
accessorKey: 'protocols',
|
||||||
header: t('protocols'),
|
header: t('protocols'),
|
||||||
cell: ({ row }) => {
|
cell: ({ row }) => {
|
||||||
const list = (row.original.protocols || []) as API.Protocol[];
|
const list = row.original.protocols.filter(
|
||||||
if (!list.length) return t('noData');
|
(p) => p.enable !== false,
|
||||||
|
) as API.Protocol[];
|
||||||
|
if (!list.length) return '—';
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-wrap gap-1'>
|
<div className='flex flex-wrap gap-1'>
|
||||||
{list.map((p, idx) => {
|
{list.map((p, idx) => {
|
||||||
const proto = ((p as any)?.type || '') as ProtocolName | '';
|
|
||||||
if (!proto) return null;
|
|
||||||
const color = PROTOCOL_COLORS[proto as ProtocolName];
|
|
||||||
const port = (p as any)?.port as number | undefined;
|
|
||||||
const label = `${proto}${port ? ` (${port})` : ''}`;
|
|
||||||
return (
|
return (
|
||||||
<Badge
|
<Badge key={idx} variant='outline'>
|
||||||
key={idx}
|
{p.type} ({p.port})
|
||||||
variant='outline'
|
|
||||||
className={cn('text-primary-foreground', color)}
|
|
||||||
>
|
|
||||||
{label}
|
|
||||||
</Badge>
|
</Badge>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -272,6 +258,7 @@ export default function ServersPage() {
|
|||||||
});
|
});
|
||||||
toast.success(t('updated'));
|
toast.success(t('updated'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchServers();
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -282,13 +269,18 @@ export default function ServersPage() {
|
|||||||
/>,
|
/>,
|
||||||
<ConfirmButton
|
<ConfirmButton
|
||||||
key='delete'
|
key='delete'
|
||||||
trigger={<Button variant='destructive'>{t('delete')}</Button>}
|
trigger={
|
||||||
|
<Button variant='destructive' disabled={isServerReferencedByNodes(row.id)}>
|
||||||
|
{t('delete')}
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
title={t('confirmDeleteTitle')}
|
title={t('confirmDeleteTitle')}
|
||||||
description={t('confirmDeleteDesc')}
|
description={t('confirmDeleteDesc')}
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
await deleteServer({ id: row.id } as any);
|
await deleteServer({ id: row.id } as any);
|
||||||
toast.success(t('deleted'));
|
toast.success(t('deleted'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchServers();
|
||||||
}}
|
}}
|
||||||
cancelText={t('cancel')}
|
cancelText={t('cancel')}
|
||||||
confirmText={t('confirm')}
|
confirmText={t('confirm')}
|
||||||
@@ -311,6 +303,7 @@ export default function ServersPage() {
|
|||||||
await createServer(body);
|
await createServer(body);
|
||||||
toast.success(t('copied'));
|
toast.success(t('copied'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchServers();
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -318,16 +311,22 @@ export default function ServersPage() {
|
|||||||
</Button>,
|
</Button>,
|
||||||
],
|
],
|
||||||
batchRender(rows) {
|
batchRender(rows) {
|
||||||
|
const hasReferencedServers = rows.some((row) => isServerReferencedByNodes(row.id));
|
||||||
return [
|
return [
|
||||||
<ConfirmButton
|
<ConfirmButton
|
||||||
key='delete'
|
key='delete'
|
||||||
trigger={<Button variant='destructive'>{t('delete')}</Button>}
|
trigger={
|
||||||
|
<Button variant='destructive' disabled={hasReferencedServers}>
|
||||||
|
{t('delete')}
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
title={t('confirmDeleteTitle')}
|
title={t('confirmDeleteTitle')}
|
||||||
description={t('confirmDeleteDesc')}
|
description={t('confirmDeleteDesc')}
|
||||||
onConfirm={async () => {
|
onConfirm={async () => {
|
||||||
await Promise.all(rows.map((r) => deleteServer({ id: r.id })));
|
await Promise.all(rows.map((r) => deleteServer({ id: r.id })));
|
||||||
toast.success(t('deleted'));
|
toast.success(t('deleted'));
|
||||||
ref.current?.refresh();
|
ref.current?.refresh();
|
||||||
|
fetchServers();
|
||||||
}}
|
}}
|
||||||
cancelText={t('cancel')}
|
cancelText={t('cancel')}
|
||||||
confirmText={t('confirm')}
|
confirmText={t('confirm')}
|
||||||
@@ -361,6 +360,7 @@ export default function ServersPage() {
|
|||||||
sort: item.sort,
|
sort: item.sort,
|
||||||
})) as API.SortItem[],
|
})) as API.SortItem[],
|
||||||
});
|
});
|
||||||
|
toast.success(t('sorted_success'));
|
||||||
}
|
}
|
||||||
return updatedItems;
|
return updatedItems;
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import { useNode } from '@/store/node';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import {
|
import {
|
||||||
Accordion,
|
Accordion,
|
||||||
@@ -38,7 +39,6 @@ import { EnhancedInput } from '@workspace/ui/custom-components/enhanced-input';
|
|||||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||||
import { cn } from '@workspace/ui/lib/utils';
|
import { cn } from '@workspace/ui/lib/utils';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { uid } from 'radash';
|
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useForm, useWatch } from 'react-hook-form';
|
import { useForm, useWatch } from 'react-hook-form';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
@@ -49,18 +49,19 @@ import {
|
|||||||
getProtocolDefaultConfig,
|
getProtocolDefaultConfig,
|
||||||
PROTOCOL_FIELDS,
|
PROTOCOL_FIELDS,
|
||||||
protocols as PROTOCOLS,
|
protocols as PROTOCOLS,
|
||||||
ServerFormValues,
|
|
||||||
} from './form-schema';
|
} from './form-schema';
|
||||||
|
|
||||||
function DynamicField({
|
function DynamicField({
|
||||||
field,
|
field,
|
||||||
control,
|
control,
|
||||||
|
form,
|
||||||
protocolIndex,
|
protocolIndex,
|
||||||
protocolData,
|
protocolData,
|
||||||
t,
|
t,
|
||||||
}: {
|
}: {
|
||||||
field: FieldConfig;
|
field: FieldConfig;
|
||||||
control: any;
|
control: any;
|
||||||
|
form: any;
|
||||||
protocolIndex: number;
|
protocolIndex: number;
|
||||||
protocolData: any;
|
protocolData: any;
|
||||||
t: (key: string) => string;
|
t: (key: string) => string;
|
||||||
@@ -97,17 +98,29 @@ function DynamicField({
|
|||||||
}
|
}
|
||||||
onValueChange={(v) => fieldProps.onChange(v)}
|
onValueChange={(v) => fieldProps.onChange(v)}
|
||||||
suffix={
|
suffix={
|
||||||
field.password ? (
|
field.generate ? (
|
||||||
<Button
|
<Button
|
||||||
type='button'
|
type='button'
|
||||||
variant='ghost'
|
variant='ghost'
|
||||||
onClick={() => {
|
onClick={async () => {
|
||||||
const length = field.password || 16;
|
const result = await field.generate!.function();
|
||||||
const result = uid(length).toLowerCase();
|
if (typeof result === 'string') {
|
||||||
fieldProps.onChange(result);
|
fieldProps.onChange(result);
|
||||||
|
} else if (field.generate!.updateFields) {
|
||||||
|
Object.entries(field.generate!.updateFields).forEach(
|
||||||
|
([fieldName, resultKey]) => {
|
||||||
|
const fullFieldName = `protocols.${protocolIndex}.${fieldName}`;
|
||||||
|
form.setValue(fullFieldName, (result as any)[resultKey]);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
if (result.privateKey) {
|
||||||
|
fieldProps.onChange(result.privateKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon icon='mdi:refresh' className='h-4 w-4' />
|
<Icon icon='mdi:key' className='h-4 w-4' />
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
field.suffix
|
field.suffix
|
||||||
@@ -225,7 +238,7 @@ function DynamicField({
|
|||||||
field.placeholder
|
field.placeholder
|
||||||
? typeof field.placeholder === 'function'
|
? typeof field.placeholder === 'function'
|
||||||
? field.placeholder(t, protocolData)
|
? field.placeholder(t, protocolData)
|
||||||
: t(field.placeholder)
|
: field.placeholder
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
onChange={(e) => fieldProps.onChange(e.target.value)}
|
onChange={(e) => fieldProps.onChange(e.target.value)}
|
||||||
@@ -246,6 +259,7 @@ function renderFieldsByGroup(
|
|||||||
fields: FieldConfig[],
|
fields: FieldConfig[],
|
||||||
group: string,
|
group: string,
|
||||||
control: any,
|
control: any,
|
||||||
|
form: any,
|
||||||
protocolIndex: number,
|
protocolIndex: number,
|
||||||
protocolData: any,
|
protocolData: any,
|
||||||
t: (key: string) => string,
|
t: (key: string) => string,
|
||||||
@@ -260,6 +274,7 @@ function renderFieldsByGroup(
|
|||||||
key={field.name}
|
key={field.name}
|
||||||
field={field}
|
field={field}
|
||||||
control={control}
|
control={control}
|
||||||
|
form={form}
|
||||||
protocolIndex={protocolIndex}
|
protocolIndex={protocolIndex}
|
||||||
protocolData={protocolData}
|
protocolData={protocolData}
|
||||||
t={t}
|
t={t}
|
||||||
@@ -274,6 +289,7 @@ function renderGroupCard(
|
|||||||
fields: FieldConfig[],
|
fields: FieldConfig[],
|
||||||
group: string,
|
group: string,
|
||||||
control: any,
|
control: any,
|
||||||
|
form: any,
|
||||||
protocolIndex: number,
|
protocolIndex: number,
|
||||||
protocolData: any,
|
protocolData: any,
|
||||||
t: (key: string) => string,
|
t: (key: string) => string,
|
||||||
@@ -294,7 +310,7 @@ function renderGroupCard(
|
|||||||
{t(title)}
|
{t(title)}
|
||||||
</legend>
|
</legend>
|
||||||
<div className='p-4 pt-2'>
|
<div className='p-4 pt-2'>
|
||||||
{renderFieldsByGroup(fields, group, control, protocolIndex, protocolData, t)}
|
{renderFieldsByGroup(fields, group, control, form, protocolIndex, protocolData, t)}
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
@@ -305,14 +321,16 @@ export default function ServerForm(props: {
|
|||||||
trigger: string;
|
trigger: string;
|
||||||
title: string;
|
title: string;
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
initialValues?: Partial<ServerFormValues>;
|
initialValues?: Partial<API.Server>;
|
||||||
onSubmit: (values: ServerFormValues) => Promise<boolean> | boolean;
|
onSubmit: (values: Partial<API.Server>) => Promise<boolean> | boolean;
|
||||||
}) {
|
}) {
|
||||||
const { trigger, title, loading, initialValues, onSubmit } = props;
|
const { trigger, title, loading, initialValues, onSubmit } = props;
|
||||||
const t = useTranslations('servers');
|
const t = useTranslations('servers');
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [accordionValue, setAccordionValue] = useState<string>();
|
const [accordionValue, setAccordionValue] = useState<string>();
|
||||||
|
|
||||||
|
const { isProtocolUsedInNodes } = useNode();
|
||||||
|
|
||||||
const form = useForm({
|
const form = useForm({
|
||||||
resolver: zodResolver(formSchema),
|
resolver: zodResolver(formSchema),
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
@@ -321,7 +339,7 @@ export default function ServerForm(props: {
|
|||||||
country: '',
|
country: '',
|
||||||
city: '',
|
city: '',
|
||||||
ratio: 1,
|
ratio: 1,
|
||||||
protocols: [],
|
protocols: [] as any[],
|
||||||
...initialValues,
|
...initialValues,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -348,24 +366,18 @@ export default function ServerForm(props: {
|
|||||||
}, [initialValues]);
|
}, [initialValues]);
|
||||||
|
|
||||||
async function handleSubmit(values: Record<string, any>) {
|
async function handleSubmit(values: Record<string, any>) {
|
||||||
const filtered = (values?.protocols || []).filter((p: any, index: number) => {
|
const filteredProtocols = (values?.protocols || []).filter((protocol: any) => {
|
||||||
const port = Number(p?.port);
|
const port = Number(protocol?.port);
|
||||||
const protocolType = PROTOCOLS[index];
|
return protocol && Number.isFinite(port) && port > 0 && port <= 65535;
|
||||||
return protocolType && p && Number.isFinite(port) && port > 0 && port <= 65535;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (filtered.length === 0) {
|
|
||||||
toast.error(t('validation_failed'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = {
|
const result = {
|
||||||
name: values.name,
|
name: values.name,
|
||||||
country: values.country,
|
country: values.country,
|
||||||
city: values.city,
|
city: values.city,
|
||||||
ratio: Number(values.ratio || 1),
|
ratio: values.ratio || 1,
|
||||||
address: values.address,
|
address: values.address,
|
||||||
protocols: filtered,
|
protocols: filteredProtocols,
|
||||||
};
|
};
|
||||||
|
|
||||||
const ok = await onSubmit(result);
|
const ok = await onSubmit(result);
|
||||||
@@ -491,6 +503,7 @@ export default function ServerForm(props: {
|
|||||||
{t('protocol_configurations_desc')}
|
{t('protocol_configurations_desc')}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Accordion
|
<Accordion
|
||||||
type='single'
|
type='single'
|
||||||
collapsible
|
collapsible
|
||||||
@@ -504,56 +517,96 @@ export default function ServerForm(props: {
|
|||||||
PROTOCOLS.findIndex((t) => t === type),
|
PROTOCOLS.findIndex((t) => t === type),
|
||||||
);
|
);
|
||||||
const current = (protocolsValues[i] || {}) as Record<string, any>;
|
const current = (protocolsValues[i] || {}) as Record<string, any>;
|
||||||
const isEnabled = current.port && Number(current.port) > 0;
|
const isEnabled = current?.enable !== false;
|
||||||
const fields = PROTOCOL_FIELDS[type] || [];
|
const fields = PROTOCOL_FIELDS[type] || [];
|
||||||
return (
|
return (
|
||||||
<AccordionItem key={type} value={type} className='mb-2 rounded-lg border'>
|
<AccordionItem key={type} value={type} className='mb-2 rounded-lg border'>
|
||||||
<AccordionTrigger className='px-4 py-3 hover:no-underline'>
|
<AccordionTrigger className='px-4 py-3 hover:no-underline'>
|
||||||
<div className='flex w-full items-center justify-between'>
|
<div className='flex w-full items-center justify-between'>
|
||||||
<div className='flex flex-col items-start'>
|
<div className='flex flex-col items-start gap-1'>
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-1'>
|
||||||
<span className='font-medium capitalize'>{type}</span>
|
<span className='font-medium capitalize'>{type}</span>
|
||||||
</div>
|
{current.transport && (
|
||||||
<span
|
<Badge variant='secondary' className='text-xs'>
|
||||||
className={cn(
|
{current.transport.toUpperCase()}
|
||||||
'text-muted-foreground text-xs',
|
</Badge>
|
||||||
isEnabled && 'text-green-500',
|
|
||||||
)}
|
)}
|
||||||
>
|
{current.security && current.security !== 'none' && (
|
||||||
{isEnabled ? t('enabled') : t('disabled')}
|
<Badge variant='outline' className='text-xs'>
|
||||||
</span>
|
{current.security.toUpperCase()}
|
||||||
|
</Badge>
|
||||||
|
)}
|
||||||
|
{current.port && <Badge className='text-xs'>{current.port}</Badge>}
|
||||||
|
</div>
|
||||||
|
<div className='flex items-center gap-1'>
|
||||||
|
<span
|
||||||
|
className={cn(
|
||||||
|
'text-xs',
|
||||||
|
isEnabled ? 'text-green-500' : 'text-muted-foreground',
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{isEnabled ? t('enabled') : t('disabled')}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='mr-2 flex items-center gap-1'>
|
<Switch
|
||||||
{current.transport && (
|
className='mr-2'
|
||||||
<Badge variant='secondary' className='text-xs'>
|
checked={!!isEnabled}
|
||||||
{current.transport.toUpperCase()}
|
disabled={Boolean(
|
||||||
</Badge>
|
initialValues?.id &&
|
||||||
|
isProtocolUsedInNodes(initialValues?.id || 0, type),
|
||||||
)}
|
)}
|
||||||
{current.security && current.security !== 'none' && (
|
onCheckedChange={(checked) => {
|
||||||
<Badge variant='outline' className='text-xs'>
|
form.setValue(`protocols.${i}.enable`, checked);
|
||||||
{current.security.toUpperCase()}
|
}}
|
||||||
</Badge>
|
onClick={(e) => e.stopPropagation()}
|
||||||
)}
|
/>
|
||||||
|
|
||||||
{current.port && <Badge className='text-xs'>{current.port}</Badge>}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</AccordionTrigger>
|
</AccordionTrigger>
|
||||||
<AccordionContent className='px-4 pb-4 pt-0'>
|
<AccordionContent className='px-4 pb-4 pt-0'>
|
||||||
<div className='-mx-4 space-y-4 rounded-b-lg border-t px-4 pt-4'>
|
<div className='-mx-4 space-y-4 rounded-b-lg border-t px-4 pt-4'>
|
||||||
{renderGroupCard('basic', fields, 'basic', control, i, current, t)}
|
{renderGroupCard('basic', fields, 'basic', control, form, i, current, t)}
|
||||||
{renderGroupCard('plugin', fields, 'plugin', control, i, current, t)}
|
{renderGroupCard('obfs', fields, 'obfs', control, form, i, current, t)}
|
||||||
{renderGroupCard(
|
{renderGroupCard(
|
||||||
'transport',
|
'transport',
|
||||||
fields,
|
fields,
|
||||||
'transport',
|
'transport',
|
||||||
control,
|
control,
|
||||||
|
form,
|
||||||
|
i,
|
||||||
|
current,
|
||||||
|
t,
|
||||||
|
)}
|
||||||
|
{renderGroupCard(
|
||||||
|
'security',
|
||||||
|
fields,
|
||||||
|
'security',
|
||||||
|
control,
|
||||||
|
form,
|
||||||
|
i,
|
||||||
|
current,
|
||||||
|
t,
|
||||||
|
)}
|
||||||
|
{renderGroupCard(
|
||||||
|
'reality',
|
||||||
|
fields,
|
||||||
|
'reality',
|
||||||
|
control,
|
||||||
|
form,
|
||||||
|
i,
|
||||||
|
current,
|
||||||
|
t,
|
||||||
|
)}
|
||||||
|
{renderGroupCard(
|
||||||
|
'encryption',
|
||||||
|
fields,
|
||||||
|
'encryption',
|
||||||
|
control,
|
||||||
|
form,
|
||||||
i,
|
i,
|
||||||
current,
|
current,
|
||||||
t,
|
t,
|
||||||
)}
|
)}
|
||||||
{renderGroupCard('security', fields, 'security', control, i, current, t)}
|
|
||||||
{renderGroupCard('reality', fields, 'reality', control, i, current, t)}
|
|
||||||
</div>
|
</div>
|
||||||
</AccordionContent>
|
</AccordionContent>
|
||||||
</AccordionItem>
|
</AccordionItem>
|
||||||
@@ -576,7 +629,8 @@ export default function ServerForm(props: {
|
|||||||
return false;
|
return false;
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{loading && <Icon icon='mdi:loading' className='mr-2 animate-spin' />} {t('confirm')}
|
{loading && <Icon icon='mdi:loading' className='mr-2 animate-spin' />}
|
||||||
|
{t('confirm')}
|
||||||
</Button>
|
</Button>
|
||||||
</SheetFooter>
|
</SheetFooter>
|
||||||
</SheetContent>
|
</SheetContent>
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ import { useRef, useState } from 'react';
|
|||||||
import { useForm } from 'react-hook-form';
|
import { useForm } from 'react-hook-form';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
import { subscribeSchema } from './schema';
|
||||||
import { TemplatePreview } from './template-preview';
|
import { TemplatePreview } from './template-preview';
|
||||||
|
|
||||||
const createClientFormSchema = (t: any) =>
|
const createClientFormSchema = (t: any) =>
|
||||||
@@ -313,7 +314,21 @@ export function ProtocolForm() {
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
request={request}
|
request={request}
|
||||||
header={{
|
header={{
|
||||||
title: <h2 className='text-lg font-semibold'>{t('protocol.title')}</h2>,
|
title: (
|
||||||
|
<div className='flex items-center justify-between'>
|
||||||
|
<h2 className='text-lg font-semibold'>{t('protocol.title')}</h2>
|
||||||
|
<a
|
||||||
|
href='https://github.com/perfect-panel/subscription-template'
|
||||||
|
target='_blank'
|
||||||
|
rel='noreferrer'
|
||||||
|
className='text-primary inline-flex items-center gap-2 rounded-md px-3 py-1 text-sm font-medium hover:underline'
|
||||||
|
>
|
||||||
|
<Icon icon='mdi:github' className='h-4 w-4' />
|
||||||
|
<span>Template Repo</span>
|
||||||
|
<Icon icon='mdi:open-in-new' className='text-muted-foreground h-4 w-4' />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
toolbar: <Button onClick={handleAdd}>{t('actions.add')}</Button>,
|
toolbar: <Button onClick={handleAdd}>{t('actions.add')}</Button>,
|
||||||
}}
|
}}
|
||||||
actions={{
|
actions={{
|
||||||
@@ -648,137 +663,7 @@ export function ProtocolForm() {
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<GoTemplateEditor
|
<GoTemplateEditor
|
||||||
showLineNumbers
|
showLineNumbers
|
||||||
schema={{
|
schema={subscribeSchema}
|
||||||
SiteName: { type: 'string', description: 'Site name' },
|
|
||||||
SubscribeName: { type: 'string', description: 'Subscribe name' },
|
|
||||||
Proxies: {
|
|
||||||
type: 'array',
|
|
||||||
description: 'Array of proxy nodes',
|
|
||||||
items: {
|
|
||||||
type: 'object',
|
|
||||||
properties: {
|
|
||||||
Name: { type: 'string', description: 'Node name' },
|
|
||||||
Server: { type: 'string', description: 'Server host' },
|
|
||||||
Port: { type: 'number', description: 'Server port' },
|
|
||||||
Type: { type: 'string', description: 'Proxy type' },
|
|
||||||
Tags: {
|
|
||||||
type: 'array',
|
|
||||||
description: 'Node tags',
|
|
||||||
items: { type: 'string' },
|
|
||||||
},
|
|
||||||
Sort: { type: 'number', description: 'Node sort order' },
|
|
||||||
// Security Options
|
|
||||||
Security: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Security protocol',
|
|
||||||
},
|
|
||||||
SNI: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Server Name Indication for TLS',
|
|
||||||
},
|
|
||||||
AllowInsecure: {
|
|
||||||
type: 'boolean',
|
|
||||||
description:
|
|
||||||
'Allow insecure connections (skip certificate verification)',
|
|
||||||
},
|
|
||||||
Fingerprint: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Client fingerprint for TLS connections',
|
|
||||||
},
|
|
||||||
RealityServerAddr: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Reality server address',
|
|
||||||
},
|
|
||||||
RealityServerPort: {
|
|
||||||
type: 'number',
|
|
||||||
description: 'Reality server port',
|
|
||||||
},
|
|
||||||
RealityPrivateKey: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Reality private key for authentication',
|
|
||||||
},
|
|
||||||
RealityPublicKey: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Reality public key for authentication',
|
|
||||||
},
|
|
||||||
RealityShortId: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Reality short ID for authentication',
|
|
||||||
},
|
|
||||||
// Transport Options
|
|
||||||
Transport: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Transport protocol (e.g., ws, http, grpc)',
|
|
||||||
},
|
|
||||||
Host: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'For WebSocket/HTTP/HTTPS',
|
|
||||||
},
|
|
||||||
Path: { type: 'string', description: 'For HTTP/HTTPS' },
|
|
||||||
ServiceName: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'For gRPC',
|
|
||||||
},
|
|
||||||
// Shadowsocks Options
|
|
||||||
Method: { type: 'string', description: 'Encryption method' },
|
|
||||||
ServerKey: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'For Shadowsocks 2022',
|
|
||||||
},
|
|
||||||
// Vmess/Vless/Trojan Options
|
|
||||||
Flow: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Flow for Vmess/Vless/Trojan',
|
|
||||||
},
|
|
||||||
// Hysteria2 Options
|
|
||||||
HopPorts: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Comma-separated list of hop ports',
|
|
||||||
},
|
|
||||||
HopInterval: {
|
|
||||||
type: 'number',
|
|
||||||
description: 'Interval for hop ports in seconds',
|
|
||||||
},
|
|
||||||
ObfsPassword: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Obfuscation password for Hysteria2',
|
|
||||||
},
|
|
||||||
// Tuic Options
|
|
||||||
DisableSNI: {
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'Disable SNI',
|
|
||||||
},
|
|
||||||
ReduceRtt: {
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'Reduce RTT',
|
|
||||||
},
|
|
||||||
UDPRelayMode: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'UDP relay mode (e.g., "full", "partial")',
|
|
||||||
},
|
|
||||||
CongestionController: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Congestion controller (e.g., "cubic", "bbr")',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
UserInfo: {
|
|
||||||
type: 'object',
|
|
||||||
description: 'User information',
|
|
||||||
properties: {
|
|
||||||
Password: { type: 'string', description: 'User password' },
|
|
||||||
ExpiredAt: { type: 'string', description: 'Expiration date' },
|
|
||||||
Download: { type: 'number', description: 'Downloaded bytes' },
|
|
||||||
Upload: { type: 'number', description: 'Uploaded bytes' },
|
|
||||||
Traffic: { type: 'number', description: 'Total traffic bytes' },
|
|
||||||
SubscribeURL: {
|
|
||||||
type: 'string',
|
|
||||||
description: 'Subscription URL',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
enableSprig
|
enableSprig
|
||||||
value={field.value || ''}
|
value={field.value || ''}
|
||||||
onChange={(value) => field.onChange(value)}
|
onChange={(value) => field.onChange(value)}
|
||||||
|
|||||||
@@ -0,0 +1,225 @@
|
|||||||
|
export const subscribeSchema = {
|
||||||
|
SiteName: { type: 'string', description: 'Site name' },
|
||||||
|
SubscribeName: { type: 'string', description: 'Subscribe name' },
|
||||||
|
Proxies: {
|
||||||
|
type: 'array',
|
||||||
|
description: 'Array of proxy nodes',
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
Name: { type: 'string', description: 'Node name' },
|
||||||
|
Server: { type: 'string', description: 'Server host' },
|
||||||
|
Port: { type: 'number', description: 'Server port' },
|
||||||
|
Type: { type: 'string', description: 'Proxy type' },
|
||||||
|
Tags: {
|
||||||
|
type: 'array',
|
||||||
|
description: 'Node tags',
|
||||||
|
items: { type: 'string' },
|
||||||
|
},
|
||||||
|
Sort: { type: 'number', description: 'Node sort order' },
|
||||||
|
// Security Options
|
||||||
|
Security: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Security protocol',
|
||||||
|
},
|
||||||
|
SNI: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Server Name Indication for TLS',
|
||||||
|
},
|
||||||
|
AllowInsecure: {
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'Allow insecure connections (skip certificate verification)',
|
||||||
|
},
|
||||||
|
Fingerprint: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Client fingerprint for TLS connections',
|
||||||
|
},
|
||||||
|
RealityServerAddr: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Reality server address',
|
||||||
|
},
|
||||||
|
RealityServerPort: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'Reality server port',
|
||||||
|
},
|
||||||
|
RealityPrivateKey: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Reality private key for authentication',
|
||||||
|
},
|
||||||
|
RealityPublicKey: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Reality public key for authentication',
|
||||||
|
},
|
||||||
|
RealityShortId: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Reality short ID for authentication',
|
||||||
|
},
|
||||||
|
// Transport Options
|
||||||
|
Transport: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Transport protocol (e.g., ws, http, grpc)',
|
||||||
|
},
|
||||||
|
Host: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'For WebSocket/HTTP/HTTPS',
|
||||||
|
},
|
||||||
|
Path: { type: 'string', description: 'For HTTP/HTTPS' },
|
||||||
|
ServiceName: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'For gRPC',
|
||||||
|
},
|
||||||
|
// Shadowsocks Options
|
||||||
|
Method: { type: 'string', description: 'Encryption method' },
|
||||||
|
ServerKey: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'For Shadowsocks 2022',
|
||||||
|
},
|
||||||
|
// Vmess/Vless/Trojan Options
|
||||||
|
Flow: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Flow for Vmess/Vless/Trojan',
|
||||||
|
},
|
||||||
|
// Hysteria2 Options
|
||||||
|
HopPorts: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Comma-separated list of hop ports',
|
||||||
|
},
|
||||||
|
HopInterval: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'Interval for hop ports in seconds',
|
||||||
|
},
|
||||||
|
ObfsPassword: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Obfuscation password for Hysteria2',
|
||||||
|
},
|
||||||
|
// Tuic Options
|
||||||
|
DisableSNI: {
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'Disable SNI',
|
||||||
|
},
|
||||||
|
ReduceRtt: {
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'Reduce RTT',
|
||||||
|
},
|
||||||
|
UDPRelayMode: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'UDP relay mode (e.g., "full", "partial")',
|
||||||
|
},
|
||||||
|
CongestionController: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Congestion controller (e.g., "cubic", "bbr")',
|
||||||
|
},
|
||||||
|
// Hysteria2 additional options
|
||||||
|
UpMbps: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'Upload bandwidth in Mbps',
|
||||||
|
},
|
||||||
|
DownMbps: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'Download bandwidth in Mbps',
|
||||||
|
},
|
||||||
|
// VLESS encryption options
|
||||||
|
Encryption: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Encryption type for VLESS',
|
||||||
|
},
|
||||||
|
EncryptionMode: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Encryption mode (e.g., "native", "xorpub", "random")',
|
||||||
|
},
|
||||||
|
EncryptionRtt: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Encryption RTT (e.g., "0rtt", "1rtt")',
|
||||||
|
},
|
||||||
|
EncryptionTicket: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Encryption ticket',
|
||||||
|
},
|
||||||
|
EncryptionServerPadding: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Server padding for encryption',
|
||||||
|
},
|
||||||
|
EncryptionClientPadding: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Client padding for encryption',
|
||||||
|
},
|
||||||
|
EncryptionPassword: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Encryption password',
|
||||||
|
},
|
||||||
|
EncryptionPrivateKey: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Private key for encryption',
|
||||||
|
},
|
||||||
|
// XHTTP options
|
||||||
|
XhttpMode: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'XHTTP mode (e.g., "auto", "packet-up", "stream-up", "stream-one")',
|
||||||
|
},
|
||||||
|
XhttpExtra: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'XHTTP extra parameters',
|
||||||
|
},
|
||||||
|
// Shadowsocks obfs options (combined with Hysteria2 obfs)
|
||||||
|
ObfsHost: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Obfuscation host',
|
||||||
|
},
|
||||||
|
ObfsPath: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Obfuscation path',
|
||||||
|
},
|
||||||
|
// Shadowsocks cipher
|
||||||
|
Cipher: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Shadowsocks cipher method',
|
||||||
|
},
|
||||||
|
// AnyTLS options
|
||||||
|
PaddingScheme: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Padding scheme for AnyTLS',
|
||||||
|
},
|
||||||
|
// Mieru options
|
||||||
|
Multiplex: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Multiplex level (e.g., "none", "low", "middle", "high")',
|
||||||
|
},
|
||||||
|
// General protocol field
|
||||||
|
Enable: {
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'Whether this protocol is enabled',
|
||||||
|
},
|
||||||
|
// UUID for vmess/vless
|
||||||
|
UUID: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'User UUID for vmess/vless protocols',
|
||||||
|
},
|
||||||
|
// Alternative ID for vmess
|
||||||
|
AlterId: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'Alternative ID for vmess (deprecated)',
|
||||||
|
},
|
||||||
|
// Password for trojan/tuic
|
||||||
|
Password: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Password for authentication',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
UserInfo: {
|
||||||
|
type: 'object',
|
||||||
|
description: 'User information',
|
||||||
|
properties: {
|
||||||
|
Password: { type: 'string', description: 'User password' },
|
||||||
|
ExpiredAt: { type: 'string', description: 'Expiration date' },
|
||||||
|
Download: { type: 'number', description: 'Downloaded bytes' },
|
||||||
|
Upload: { type: 'number', description: 'Uploaded bytes' },
|
||||||
|
Traffic: { type: 'number', description: 'Total traffic bytes' },
|
||||||
|
SubscribeURL: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'Subscription URL',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -3,7 +3,13 @@
|
|||||||
import { previewSubscribeTemplate } from '@/services/admin/application';
|
import { previewSubscribeTemplate } from '@/services/admin/application';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
import { Sheet, SheetContent, SheetHeader, SheetTitle } from '@workspace/ui/components/sheet';
|
import {
|
||||||
|
Sheet,
|
||||||
|
SheetContent,
|
||||||
|
SheetHeader,
|
||||||
|
SheetTitle,
|
||||||
|
SheetTrigger,
|
||||||
|
} from '@workspace/ui/components/sheet';
|
||||||
import { MonacoEditor } from '@workspace/ui/custom-components/editor/monaco-editor';
|
import { MonacoEditor } from '@workspace/ui/custom-components/editor/monaco-editor';
|
||||||
import { Icon } from '@workspace/ui/custom-components/icon';
|
import { Icon } from '@workspace/ui/custom-components/icon';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
@@ -68,35 +74,33 @@ export function TemplatePreview({ applicationId, output_format }: TemplatePrevie
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOpenChange = (newOpen: boolean) => {
|
|
||||||
setIsOpen(newOpen);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Sheet open={isOpen} onOpenChange={setIsOpen}>
|
||||||
<Button variant='ghost' size='sm' onClick={() => setIsOpen(true)}>
|
<SheetTrigger asChild>
|
||||||
<Icon icon='mdi:eye' className='mr-2 h-4 w-4' />
|
<Button variant='ghost'>
|
||||||
{t('preview')}
|
<Icon icon='mdi:eye' className='h-4 w-4' />
|
||||||
</Button>
|
{t('preview')}
|
||||||
<Sheet open={isOpen} onOpenChange={handleOpenChange}>
|
</Button>
|
||||||
<SheetHeader>
|
</SheetTrigger>
|
||||||
<SheetTitle></SheetTitle>
|
<SheetHeader>
|
||||||
</SheetHeader>
|
<SheetTitle></SheetTitle>
|
||||||
<SheetContent className='w-[800px] max-w-[90vw] md:max-w-screen-md'>
|
</SheetHeader>
|
||||||
{isLoading ? (
|
<SheetContent className='w-[800px] max-w-[90vw] pt-10 md:max-w-screen-md'>
|
||||||
<div className='flex items-center justify-center'>
|
{isLoading ? (
|
||||||
<Icon icon='mdi:loading' className='h-6 w-6 animate-spin' />
|
<div className='flex items-center justify-center'>
|
||||||
<span className='ml-2'>{t('loading')}</span>
|
<Icon icon='mdi:loading' className='h-6 w-6 animate-spin' />
|
||||||
</div>
|
<span className='ml-2'>{t('loading')}</span>
|
||||||
) : (
|
</div>
|
||||||
<MonacoEditor
|
) : (
|
||||||
title={t('title')}
|
<MonacoEditor
|
||||||
value={getDisplayContent()}
|
title={t('title')}
|
||||||
language={mapLanguage(output_format)}
|
value={getDisplayContent()}
|
||||||
/>
|
language={mapLanguage(output_format)}
|
||||||
)}
|
showLineNumbers
|
||||||
</SheetContent>
|
readOnly
|
||||||
</Sheet>
|
/>
|
||||||
</>
|
)}
|
||||||
|
</SheetContent>
|
||||||
|
</Sheet>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { getSubscribeList } from '@/services/admin/subscribe';
|
|
||||||
import { getRegisterConfig, updateRegisterConfig } from '@/services/admin/system';
|
import { getRegisterConfig, updateRegisterConfig } from '@/services/admin/system';
|
||||||
|
import { useSubscribe } from '@/store/subscribe';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
@@ -61,17 +61,7 @@ export default function RegisterConfig() {
|
|||||||
enabled: open,
|
enabled: open,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data: subscribe } = useQuery({
|
const { subscribes } = useSubscribe();
|
||||||
queryKey: ['getSubscribeList', 'all'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await getSubscribeList({
|
|
||||||
page: 1,
|
|
||||||
size: 9999,
|
|
||||||
});
|
|
||||||
return data.data?.list as API.Subscribe[];
|
|
||||||
},
|
|
||||||
enabled: open,
|
|
||||||
});
|
|
||||||
|
|
||||||
const form = useForm<RegisterFormData>({
|
const form = useForm<RegisterFormData>({
|
||||||
resolver: zodResolver(registerSchema),
|
resolver: zodResolver(registerSchema),
|
||||||
@@ -268,12 +258,10 @@ export default function RegisterConfig() {
|
|||||||
field.onChange(value);
|
field.onChange(value);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
options={
|
options={subscribes?.map((item) => ({
|
||||||
subscribe?.map((item) => ({
|
label: item.name!,
|
||||||
label: item.name,
|
value: item.id!,
|
||||||
value: item.id,
|
}))}
|
||||||
})) || []
|
|
||||||
}
|
|
||||||
className='bg-secondary w-32 rounded-r-none'
|
className='bg-secondary w-32 rounded-r-none'
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import { Display } from '@/components/display';
|
import { Display } from '@/components/display';
|
||||||
import { ProTable, ProTableActions } from '@/components/pro-table';
|
import { ProTable, ProTableActions } from '@/components/pro-table';
|
||||||
import { getSubscribeList } from '@/services/admin/subscribe';
|
|
||||||
import {
|
import {
|
||||||
createUser,
|
createUser,
|
||||||
deleteUser,
|
deleteUser,
|
||||||
@@ -10,6 +9,7 @@ import {
|
|||||||
getUserList,
|
getUserList,
|
||||||
updateUserBasicInfo,
|
updateUserBasicInfo,
|
||||||
} from '@/services/admin/user';
|
} from '@/services/admin/user';
|
||||||
|
import { useSubscribe } from '@/store/subscribe';
|
||||||
import { formatDate } from '@/utils/common';
|
import { formatDate } from '@/utils/common';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { Badge } from '@workspace/ui/components/badge';
|
import { Badge } from '@workspace/ui/components/badge';
|
||||||
@@ -49,16 +49,7 @@ export default function Page() {
|
|||||||
const ref = useRef<ProTableActions>(null);
|
const ref = useRef<ProTableActions>(null);
|
||||||
const sp = useSearchParams();
|
const sp = useSearchParams();
|
||||||
|
|
||||||
const { data: subscribeList } = useQuery({
|
const { subscribes } = useSubscribe();
|
||||||
queryKey: ['getSubscribeList', 'all'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await getSubscribeList({
|
|
||||||
page: 1,
|
|
||||||
size: 9999,
|
|
||||||
});
|
|
||||||
return data.data?.list as API.SubscribeGroup[];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const initialFilters = {
|
const initialFilters = {
|
||||||
search: sp.get('search') || undefined,
|
search: sp.get('search') || undefined,
|
||||||
@@ -194,9 +185,9 @@ export default function Page() {
|
|||||||
{
|
{
|
||||||
key: 'subscribe_id',
|
key: 'subscribe_id',
|
||||||
placeholder: t('subscription'),
|
placeholder: t('subscription'),
|
||||||
options: subscribeList?.map((item) => ({
|
options: subscribes?.map((item) => ({
|
||||||
label: item.name,
|
label: item.name!,
|
||||||
value: String(item.id),
|
value: String(item.id!),
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import { getSubscribeList } from '@/services/admin/subscribe';
|
import { useSubscribe } from '@/store/subscribe';
|
||||||
import { zodResolver } from '@hookform/resolvers/zod';
|
import { zodResolver } from '@hookform/resolvers/zod';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
|
||||||
import { Button } from '@workspace/ui/components/button';
|
import { Button } from '@workspace/ui/components/button';
|
||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
@@ -74,16 +73,7 @@ export function SubscriptionForm({ trigger, title, loading, initialData, onSubmi
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const { data: subscribe } = useQuery({
|
const { subscribes } = useSubscribe();
|
||||||
queryKey: ['getSubscribeList', 'all'],
|
|
||||||
queryFn: async () => {
|
|
||||||
const { data } = await getSubscribeList({
|
|
||||||
page: 1,
|
|
||||||
size: 9999,
|
|
||||||
});
|
|
||||||
return data.data?.list as API.Subscribe[];
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Sheet open={open} onOpenChange={setOpen}>
|
<Sheet open={open} onOpenChange={setOpen}>
|
||||||
@@ -117,9 +107,9 @@ export function SubscriptionForm({ trigger, title, loading, initialData, onSubmi
|
|||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
form.setValue(field.name, value);
|
form.setValue(field.name, value);
|
||||||
}}
|
}}
|
||||||
options={subscribe?.map((item: API.Subscribe) => ({
|
options={subscribes?.map((item) => ({
|
||||||
value: item.id,
|
value: item.id!,
|
||||||
label: item.name,
|
label: item.name!,
|
||||||
}))}
|
}))}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Vyberte protokol…",
|
"select_protocol": "Vyberte protokol…",
|
||||||
"select_server": "Vyberte server…",
|
"select_server": "Vyberte server…",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
|
"sorted_success": "Úspěšně seřazeno",
|
||||||
"tags": "Štítky",
|
"tags": "Štítky",
|
||||||
"tags_description": "Štítek pro skupinování oprávnění (včetně vazby na plán a dodací politiky).",
|
"tags_description": "Štítek pro skupinování oprávnění (včetně vazby na plán a dodací politiky).",
|
||||||
"tags_placeholder": "Použijte Enter nebo čárku (,) pro přidání více štítků",
|
"tags_placeholder": "Použijte Enter nebo čárku (,) pro přidání více štítků",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Zadejte šířku pásma, nechte prázdné pro BBR",
|
"bandwidth_placeholder": "Zadejte šířku pásma, nechte prázdné pro BBR",
|
||||||
"basic": "Základní konfigurace",
|
"basic": "Základní konfigurace",
|
||||||
"cancel": "Zrušit",
|
"cancel": "Zrušit",
|
||||||
|
"cipher": "Šifrovací algoritmus",
|
||||||
"city": "Město",
|
"city": "Město",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Upravit server",
|
"drawerEditTitle": "Upravit server",
|
||||||
"edit": "Upravit",
|
"edit": "Upravit",
|
||||||
"enabled": "Povoleno",
|
"enabled": "Povoleno",
|
||||||
"encryption_method": "Metoda šifrování",
|
"encryption": "Metoda šifrování",
|
||||||
|
"encryption_client_padding": "Padding klienta",
|
||||||
|
"encryption_mode": "Režim",
|
||||||
|
"encryption_password": "Heslo",
|
||||||
|
"encryption_password_placeholder": "Nechte prázdné pro automatickou generaci, nahraďte ručně pro postkvantové šifrování",
|
||||||
|
"encryption_private_key": "Soukromý klíč",
|
||||||
|
"encryption_private_key_placeholder": "Nechte prázdné pro automatickou generaci, nahraďte ručně pro postkvantové šifrování",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Padding serveru",
|
||||||
|
"encryption_ticket": "Čas lístku",
|
||||||
"expireTime": "Čas vypršení",
|
"expireTime": "Čas vypršení",
|
||||||
"expired": "Vypršelo",
|
"expired": "Vypršelo",
|
||||||
|
"extra": "Další konfigurace",
|
||||||
"flow": "Tok",
|
"flow": "Tok",
|
||||||
"hop_interval": "Interval skoku",
|
"hop_interval": "Interval skoku",
|
||||||
"hop_ports": "Porty skoku",
|
"hop_ports": "Porty skoku",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Migrace dat se nezdařila",
|
"migrateFailed": "Migrace dat se nezdařila",
|
||||||
"migrated": "Data byla úspěšně migrována",
|
"migrated": "Data byla úspěšně migrována",
|
||||||
"migrating": "Probíhá migrace...",
|
"migrating": "Probíhá migrace...",
|
||||||
|
"mode": "Režim",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Název",
|
"name": "Název",
|
||||||
"noData": "Žádná data",
|
"noData": "Žádná data",
|
||||||
"notAvailable": "Není k dispozici",
|
"notAvailable": "Není k dispozici",
|
||||||
|
"obfs": "Obfuskování",
|
||||||
|
"obfs_host": "Obfs hostitel",
|
||||||
"obfs_password": "Heslo pro obfuskaci",
|
"obfs_password": "Heslo pro obfuskaci",
|
||||||
"obfs_password_placeholder": "Zadejte heslo pro obfuskaci",
|
"obfs_password_placeholder": "Zadejte heslo pro obfuskaci",
|
||||||
|
"obfs_path": "Obfs cesta",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"online": "Online",
|
"online": "Online",
|
||||||
"onlineUsers": "Online uživatelé",
|
"onlineUsers": "Online uživatelé",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Servery",
|
"pageTitle": "Servery",
|
||||||
"path": "Cesta",
|
"path": "Cesta",
|
||||||
"please_select": "Prosím vyberte",
|
"please_select": "Prosím vyberte",
|
||||||
"plugin": "Konfigurace pluginu",
|
|
||||||
"plugin_opts": "Možnosti pluginu",
|
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"protocol_configurations": "Konfigurace protokolu",
|
"protocol_configurations": "Konfigurace protokolu",
|
||||||
"protocol_configurations_desc": "Povolit a nakonfigurovat požadované typy protokolů",
|
"protocol_configurations_desc": "Povolit a nakonfigurovat požadované typy protokolů",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Vyberte metodu šifrování",
|
"select_encryption_method": "Vyberte metodu šifrování",
|
||||||
"server_key": "Klíč serveru",
|
"server_key": "Klíč serveru",
|
||||||
"service_name": "Název služby",
|
"service_name": "Název služby",
|
||||||
|
"sorted_success": "Úspěšně seřazeno",
|
||||||
"status": "Stav",
|
"status": "Stav",
|
||||||
"subscribeId": "ID předplatného",
|
"subscribeId": "ID předplatného",
|
||||||
"subscription": "Předplatné",
|
"subscription": "Předplatné",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Protokoll auswählen…",
|
"select_protocol": "Protokoll auswählen…",
|
||||||
"select_server": "Server auswählen…",
|
"select_server": "Server auswählen…",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
|
"sorted_success": "Erfolgreich sortiert",
|
||||||
"tags": "Tags",
|
"tags": "Tags",
|
||||||
"tags_description": "Berechtigungsgruppierungs-Tag (einschließlich Planbindung und Lieferrichtlinien).",
|
"tags_description": "Berechtigungsgruppierungs-Tag (einschließlich Planbindung und Lieferrichtlinien).",
|
||||||
"tags_placeholder": "Verwenden Sie Enter oder Komma (,) um mehrere Tags hinzuzufügen",
|
"tags_placeholder": "Verwenden Sie Enter oder Komma (,) um mehrere Tags hinzuzufügen",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Geben Sie die Bandbreite ein, lassen Sie das Feld leer für BBR",
|
"bandwidth_placeholder": "Geben Sie die Bandbreite ein, lassen Sie das Feld leer für BBR",
|
||||||
"basic": "Grundkonfiguration",
|
"basic": "Grundkonfiguration",
|
||||||
"cancel": "Abbrechen",
|
"cancel": "Abbrechen",
|
||||||
|
"cipher": "Verschlüsselungsalgorithmus",
|
||||||
"city": "Stadt",
|
"city": "Stadt",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Server bearbeiten",
|
"drawerEditTitle": "Server bearbeiten",
|
||||||
"edit": "Bearbeiten",
|
"edit": "Bearbeiten",
|
||||||
"enabled": "Aktiviert",
|
"enabled": "Aktiviert",
|
||||||
"encryption_method": "Verschlüsselungsmethode",
|
"encryption": "Verschlüsselungsmethode",
|
||||||
|
"encryption_client_padding": "Client-Padding",
|
||||||
|
"encryption_mode": "Modus",
|
||||||
|
"encryption_password": "Passwort",
|
||||||
|
"encryption_password_placeholder": "Leer lassen für automatische Generierung, manuell ersetzen für post-quanten Verschlüsselung",
|
||||||
|
"encryption_private_key": "Privater Schlüssel",
|
||||||
|
"encryption_private_key_placeholder": "Leer lassen für automatische Generierung, manuell ersetzen für post-quanten Verschlüsselung",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Server-Padding",
|
||||||
|
"encryption_ticket": "Ticketzeit",
|
||||||
"expireTime": "Ablaufzeit",
|
"expireTime": "Ablaufzeit",
|
||||||
"expired": "Abgelaufen",
|
"expired": "Abgelaufen",
|
||||||
|
"extra": "Zusätzliche Konfiguration",
|
||||||
"flow": "Fluss",
|
"flow": "Fluss",
|
||||||
"hop_interval": "Hop-Intervall",
|
"hop_interval": "Hop-Intervall",
|
||||||
"hop_ports": "Hop-Ports",
|
"hop_ports": "Hop-Ports",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Datenmigration fehlgeschlagen",
|
"migrateFailed": "Datenmigration fehlgeschlagen",
|
||||||
"migrated": "Daten erfolgreich migriert",
|
"migrated": "Daten erfolgreich migriert",
|
||||||
"migrating": "Wird migriert...",
|
"migrating": "Wird migriert...",
|
||||||
|
"mode": "Modus",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"noData": "Keine Daten",
|
"noData": "Keine Daten",
|
||||||
"notAvailable": "Nicht verfügbar",
|
"notAvailable": "Nicht verfügbar",
|
||||||
|
"obfs": "Obfuskation",
|
||||||
|
"obfs_host": "Obfs-Host",
|
||||||
"obfs_password": "Obfuskationspasswort",
|
"obfs_password": "Obfuskationspasswort",
|
||||||
"obfs_password_placeholder": "Obfuskationspasswort eingeben",
|
"obfs_password_placeholder": "Obfuskationspasswort eingeben",
|
||||||
|
"obfs_path": "Obfs-Pfad",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"online": "Online",
|
"online": "Online",
|
||||||
"onlineUsers": "Online-Benutzer",
|
"onlineUsers": "Online-Benutzer",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Server",
|
"pageTitle": "Server",
|
||||||
"path": "Pfad",
|
"path": "Pfad",
|
||||||
"please_select": "Bitte auswählen",
|
"please_select": "Bitte auswählen",
|
||||||
"plugin": "Plugin-Konfiguration",
|
|
||||||
"plugin_opts": "Plugin-Optionen",
|
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"protocol_configurations": "Protokollkonfigurationen",
|
"protocol_configurations": "Protokollkonfigurationen",
|
||||||
"protocol_configurations_desc": "Aktivieren und konfigurieren Sie die erforderlichen Protokolltypen",
|
"protocol_configurations_desc": "Aktivieren und konfigurieren Sie die erforderlichen Protokolltypen",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Verschlüsselungsmethode auswählen",
|
"select_encryption_method": "Verschlüsselungsmethode auswählen",
|
||||||
"server_key": "Server-Schlüssel",
|
"server_key": "Server-Schlüssel",
|
||||||
"service_name": "Dienstname",
|
"service_name": "Dienstname",
|
||||||
|
"sorted_success": "Erfolgreich sortiert",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
"subscribeId": "Abonnement-ID",
|
"subscribeId": "Abonnement-ID",
|
||||||
"subscription": "Abonnement",
|
"subscription": "Abonnement",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Select protocol…",
|
"select_protocol": "Select protocol…",
|
||||||
"select_server": "Select server…",
|
"select_server": "Select server…",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
|
"sorted_success": "Sorted successfully",
|
||||||
"tags": "Tags",
|
"tags": "Tags",
|
||||||
"tags_description": "Permission grouping tag (incl. plan binding and delivery policies).",
|
"tags_description": "Permission grouping tag (incl. plan binding and delivery policies).",
|
||||||
"tags_placeholder": "Use Enter or comma (,) to add multiple tags",
|
"tags_placeholder": "Use Enter or comma (,) to add multiple tags",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Enter bandwidth, leave empty for BBR",
|
"bandwidth_placeholder": "Enter bandwidth, leave empty for BBR",
|
||||||
"basic": "Basic Configuration",
|
"basic": "Basic Configuration",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
|
"cipher": "Encryption Algorithm",
|
||||||
"city": "City",
|
"city": "City",
|
||||||
"config": {
|
"config": {
|
||||||
"title": "Node configuration",
|
"title": "Node configuration",
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Edit Server",
|
"drawerEditTitle": "Edit Server",
|
||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"enabled": "Enabled",
|
"enabled": "Enabled",
|
||||||
"encryption_method": "Encryption method",
|
"encryption": "Encryption Method",
|
||||||
|
"encryption_client_padding": "Client Padding",
|
||||||
|
"encryption_mode": "Mode",
|
||||||
|
"encryption_password": "Password",
|
||||||
|
"encryption_password_placeholder": "Leave empty for auto-generation, replace manually for post-quantum encryption",
|
||||||
|
"encryption_private_key": "Private Key",
|
||||||
|
"encryption_private_key_placeholder": "Leave empty for auto-generation, replace manually for post-quantum encryption",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Server Padding",
|
||||||
|
"encryption_ticket": "Ticket time",
|
||||||
"expireTime": "Expire time",
|
"expireTime": "Expire time",
|
||||||
"expired": "Expired",
|
"expired": "Expired",
|
||||||
|
"extra": "Extra Configuration",
|
||||||
"flow": "Flow",
|
"flow": "Flow",
|
||||||
"hop_interval": "Hop interval",
|
"hop_interval": "Hop interval",
|
||||||
"hop_ports": "Hop ports",
|
"hop_ports": "Hop ports",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Data migration failed",
|
"migrateFailed": "Data migration failed",
|
||||||
"migrated": "Data migrated successfully",
|
"migrated": "Data migrated successfully",
|
||||||
"migrating": "Migrating...",
|
"migrating": "Migrating...",
|
||||||
|
"mode": "Mode",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"noData": "No data",
|
"noData": "No data",
|
||||||
"notAvailable": "N/A",
|
"notAvailable": "N/A",
|
||||||
|
"obfs": "Obfuscation",
|
||||||
|
"obfs_host": "Obfs Host",
|
||||||
"obfs_password": "Obfuscation password",
|
"obfs_password": "Obfuscation password",
|
||||||
"obfs_password_placeholder": "Enter obfuscation password",
|
"obfs_password_placeholder": "Enter obfuscation password",
|
||||||
|
"obfs_path": "Obfs Path",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"online": "Online",
|
"online": "Online",
|
||||||
"onlineUsers": "Online users",
|
"onlineUsers": "Online users",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Servers",
|
"pageTitle": "Servers",
|
||||||
"path": "Path",
|
"path": "Path",
|
||||||
"please_select": "Please select",
|
"please_select": "Please select",
|
||||||
"plugin": "Plugin Configuration",
|
|
||||||
"plugin_opts": "Plugin Options",
|
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"protocol_configurations": "Protocol Configurations",
|
"protocol_configurations": "Protocol Configurations",
|
||||||
"protocol_configurations_desc": "Enable and configure the required protocol types",
|
"protocol_configurations_desc": "Enable and configure the required protocol types",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Select encryption method",
|
"select_encryption_method": "Select encryption method",
|
||||||
"server_key": "Server key",
|
"server_key": "Server key",
|
||||||
"service_name": "Service name",
|
"service_name": "Service name",
|
||||||
|
"sorted_success": "Sorted successfully",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
"subscribeId": "Subscription ID",
|
"subscribeId": "Subscription ID",
|
||||||
"subscription": "Subscription",
|
"subscription": "Subscription",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Seleccionar protocolo…",
|
"select_protocol": "Seleccionar protocolo…",
|
||||||
"select_server": "Seleccionar servidor…",
|
"select_server": "Seleccionar servidor…",
|
||||||
"server": "Servidor",
|
"server": "Servidor",
|
||||||
|
"sorted_success": "Ordenado con éxito",
|
||||||
"tags": "Etiquetas",
|
"tags": "Etiquetas",
|
||||||
"tags_description": "Etiqueta de agrupación de permisos (incl. vinculación de planes y políticas de entrega).",
|
"tags_description": "Etiqueta de agrupación de permisos (incl. vinculación de planes y políticas de entrega).",
|
||||||
"tags_placeholder": "Usa Enter o coma (,) para añadir múltiples etiquetas",
|
"tags_placeholder": "Usa Enter o coma (,) para añadir múltiples etiquetas",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Introduce el ancho de banda, deja vacío para BBR",
|
"bandwidth_placeholder": "Introduce el ancho de banda, deja vacío para BBR",
|
||||||
"basic": "Configuración Básica",
|
"basic": "Configuración Básica",
|
||||||
"cancel": "Cancelar",
|
"cancel": "Cancelar",
|
||||||
|
"cipher": "Algoritmo de Cifrado",
|
||||||
"city": "Ciudad",
|
"city": "Ciudad",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Editar Servidor",
|
"drawerEditTitle": "Editar Servidor",
|
||||||
"edit": "Editar",
|
"edit": "Editar",
|
||||||
"enabled": "Habilitado",
|
"enabled": "Habilitado",
|
||||||
"encryption_method": "Método de cifrado",
|
"encryption": "Método de Cifrado",
|
||||||
|
"encryption_client_padding": "Relleno del Cliente",
|
||||||
|
"encryption_mode": "Modo",
|
||||||
|
"encryption_password": "Contraseña",
|
||||||
|
"encryption_password_placeholder": "Dejar vacío para auto-generación, reemplazar manualmente para cifrado post-cuántico",
|
||||||
|
"encryption_private_key": "Clave Privada",
|
||||||
|
"encryption_private_key_placeholder": "Dejar vacío para auto-generación, reemplazar manualmente para cifrado post-cuántico",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Relleno del Servidor",
|
||||||
|
"encryption_ticket": "Tiempo de Ticket",
|
||||||
"expireTime": "Tiempo de expiración",
|
"expireTime": "Tiempo de expiración",
|
||||||
"expired": "Expirado",
|
"expired": "Expirado",
|
||||||
|
"extra": "Configuración Extra",
|
||||||
"flow": "Flujo",
|
"flow": "Flujo",
|
||||||
"hop_interval": "Intervalo de salto",
|
"hop_interval": "Intervalo de salto",
|
||||||
"hop_ports": "Puertos de salto",
|
"hop_ports": "Puertos de salto",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "La migración de datos falló",
|
"migrateFailed": "La migración de datos falló",
|
||||||
"migrated": "Datos migrados con éxito",
|
"migrated": "Datos migrados con éxito",
|
||||||
"migrating": "Migrando...",
|
"migrating": "Migrando...",
|
||||||
|
"mode": "Modo",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Nombre",
|
"name": "Nombre",
|
||||||
"noData": "Sin datos",
|
"noData": "Sin datos",
|
||||||
"notAvailable": "N/A",
|
"notAvailable": "N/A",
|
||||||
|
"obfs": "Ofuscación",
|
||||||
|
"obfs_host": "Host de Ofuscación",
|
||||||
"obfs_password": "Contraseña de ofuscación",
|
"obfs_password": "Contraseña de ofuscación",
|
||||||
"obfs_password_placeholder": "Ingrese la contraseña de ofuscación",
|
"obfs_password_placeholder": "Ingrese la contraseña de ofuscación",
|
||||||
|
"obfs_path": "Ruta de Ofuscación",
|
||||||
"offline": "Desconectado",
|
"offline": "Desconectado",
|
||||||
"online": "Conectado",
|
"online": "Conectado",
|
||||||
"onlineUsers": "Usuarios en línea",
|
"onlineUsers": "Usuarios en línea",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Servidores",
|
"pageTitle": "Servidores",
|
||||||
"path": "Ruta",
|
"path": "Ruta",
|
||||||
"please_select": "Por favor seleccione",
|
"please_select": "Por favor seleccione",
|
||||||
"plugin": "Configuración del Plugin",
|
|
||||||
"plugin_opts": "Opciones del Plugin",
|
|
||||||
"port": "Puerto",
|
"port": "Puerto",
|
||||||
"protocol_configurations": "Configuraciones de Protocolo",
|
"protocol_configurations": "Configuraciones de Protocolo",
|
||||||
"protocol_configurations_desc": "Habilitar y configurar los tipos de protocolo requeridos",
|
"protocol_configurations_desc": "Habilitar y configurar los tipos de protocolo requeridos",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Seleccionar método de cifrado",
|
"select_encryption_method": "Seleccionar método de cifrado",
|
||||||
"server_key": "Clave del servidor",
|
"server_key": "Clave del servidor",
|
||||||
"service_name": "Nombre del servicio",
|
"service_name": "Nombre del servicio",
|
||||||
|
"sorted_success": "Ordenado con éxito",
|
||||||
"status": "Estado",
|
"status": "Estado",
|
||||||
"subscribeId": "ID de suscripción",
|
"subscribeId": "ID de suscripción",
|
||||||
"subscription": "Suscripción",
|
"subscription": "Suscripción",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Seleccionar protocolo…",
|
"select_protocol": "Seleccionar protocolo…",
|
||||||
"select_server": "Seleccionar servidor…",
|
"select_server": "Seleccionar servidor…",
|
||||||
"server": "Servidor",
|
"server": "Servidor",
|
||||||
|
"sorted_success": "Ordenado con éxito",
|
||||||
"tags": "Etiquetas",
|
"tags": "Etiquetas",
|
||||||
"tags_description": "Etiqueta de agrupación de permisos (incl. vinculación de planes y políticas de entrega).",
|
"tags_description": "Etiqueta de agrupación de permisos (incl. vinculación de planes y políticas de entrega).",
|
||||||
"tags_placeholder": "Usa Enter o coma (,) para agregar múltiples etiquetas",
|
"tags_placeholder": "Usa Enter o coma (,) para agregar múltiples etiquetas",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Ingresa el ancho de banda, deja vacío para BBR",
|
"bandwidth_placeholder": "Ingresa el ancho de banda, deja vacío para BBR",
|
||||||
"basic": "Configuración Básica",
|
"basic": "Configuración Básica",
|
||||||
"cancel": "Cancelar",
|
"cancel": "Cancelar",
|
||||||
|
"cipher": "Algoritmo de Cifrado",
|
||||||
"city": "Ciudad",
|
"city": "Ciudad",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Editar Servidor",
|
"drawerEditTitle": "Editar Servidor",
|
||||||
"edit": "Editar",
|
"edit": "Editar",
|
||||||
"enabled": "Habilitado",
|
"enabled": "Habilitado",
|
||||||
"encryption_method": "Método de encriptación",
|
"encryption": "Método de Cifrado",
|
||||||
|
"encryption_client_padding": "Relleno del Cliente",
|
||||||
|
"encryption_mode": "Modo",
|
||||||
|
"encryption_password": "Contraseña",
|
||||||
|
"encryption_password_placeholder": "Dejar vacío para auto-generación, reemplazar manualmente para cifrado post-cuántico",
|
||||||
|
"encryption_private_key": "Clave Privada",
|
||||||
|
"encryption_private_key_placeholder": "Dejar vacío para auto-generación, reemplazar manualmente para cifrado post-cuántico",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Relleno del Servidor",
|
||||||
|
"encryption_ticket": "Tiempo de Ticket",
|
||||||
"expireTime": "Tiempo de expiración",
|
"expireTime": "Tiempo de expiración",
|
||||||
"expired": "Expirado",
|
"expired": "Expirado",
|
||||||
|
"extra": "Configuración Extra",
|
||||||
"flow": "Flujo",
|
"flow": "Flujo",
|
||||||
"hop_interval": "Intervalo de salto",
|
"hop_interval": "Intervalo de salto",
|
||||||
"hop_ports": "Puertos de salto",
|
"hop_ports": "Puertos de salto",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "La migración de datos falló",
|
"migrateFailed": "La migración de datos falló",
|
||||||
"migrated": "Datos migrados con éxito",
|
"migrated": "Datos migrados con éxito",
|
||||||
"migrating": "Migrando...",
|
"migrating": "Migrando...",
|
||||||
|
"mode": "Modo",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Nombre",
|
"name": "Nombre",
|
||||||
"noData": "Sin datos",
|
"noData": "Sin datos",
|
||||||
"notAvailable": "N/A",
|
"notAvailable": "N/A",
|
||||||
|
"obfs": "Ofuscación",
|
||||||
|
"obfs_host": "Host de Ofuscación",
|
||||||
"obfs_password": "Contraseña de ofuscación",
|
"obfs_password": "Contraseña de ofuscación",
|
||||||
"obfs_password_placeholder": "Ingresa la contraseña de ofuscación",
|
"obfs_password_placeholder": "Ingresa la contraseña de ofuscación",
|
||||||
|
"obfs_path": "Ruta de Ofuscación",
|
||||||
"offline": "Desconectado",
|
"offline": "Desconectado",
|
||||||
"online": "Conectado",
|
"online": "Conectado",
|
||||||
"onlineUsers": "Usuarios en línea",
|
"onlineUsers": "Usuarios en línea",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Servidores",
|
"pageTitle": "Servidores",
|
||||||
"path": "Ruta",
|
"path": "Ruta",
|
||||||
"please_select": "Por favor selecciona",
|
"please_select": "Por favor selecciona",
|
||||||
"plugin": "Configuración del Plugin",
|
|
||||||
"plugin_opts": "Opciones del Plugin",
|
|
||||||
"port": "Puerto",
|
"port": "Puerto",
|
||||||
"protocol_configurations": "Configuraciones de Protocolo",
|
"protocol_configurations": "Configuraciones de Protocolo",
|
||||||
"protocol_configurations_desc": "Habilitar y configurar los tipos de protocolo requeridos",
|
"protocol_configurations_desc": "Habilitar y configurar los tipos de protocolo requeridos",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Selecciona el método de encriptación",
|
"select_encryption_method": "Selecciona el método de encriptación",
|
||||||
"server_key": "Clave del servidor",
|
"server_key": "Clave del servidor",
|
||||||
"service_name": "Nombre del servicio",
|
"service_name": "Nombre del servicio",
|
||||||
|
"sorted_success": "Ordenado con éxito",
|
||||||
"status": "Estado",
|
"status": "Estado",
|
||||||
"subscribeId": "ID de suscripción",
|
"subscribeId": "ID de suscripción",
|
||||||
"subscription": "Suscripción",
|
"subscription": "Suscripción",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "پروتکل را انتخاب کنید…",
|
"select_protocol": "پروتکل را انتخاب کنید…",
|
||||||
"select_server": "سرور را انتخاب کنید…",
|
"select_server": "سرور را انتخاب کنید…",
|
||||||
"server": "سرور",
|
"server": "سرور",
|
||||||
|
"sorted_success": "با موفقیت مرتب شد",
|
||||||
"tags": "برچسبها",
|
"tags": "برچسبها",
|
||||||
"tags_description": "برچسب گروهبندی مجوز (شامل پیوند برنامه و سیاستهای تحویل).",
|
"tags_description": "برچسب گروهبندی مجوز (شامل پیوند برنامه و سیاستهای تحویل).",
|
||||||
"tags_placeholder": "برای افزودن چندین برچسب از Enter یا ویرگول (,) استفاده کنید",
|
"tags_placeholder": "برای افزودن چندین برچسب از Enter یا ویرگول (,) استفاده کنید",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "عرض پهنای باند، برای BBR خالی بگذارید",
|
"bandwidth_placeholder": "عرض پهنای باند، برای BBR خالی بگذارید",
|
||||||
"basic": "پیکربندی پایه",
|
"basic": "پیکربندی پایه",
|
||||||
"cancel": "لغو",
|
"cancel": "لغو",
|
||||||
|
"cipher": "الگوریتم رمزنگاری",
|
||||||
"city": "شهر",
|
"city": "شهر",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "ویرایش سرور",
|
"drawerEditTitle": "ویرایش سرور",
|
||||||
"edit": "ویرایش",
|
"edit": "ویرایش",
|
||||||
"enabled": "فعال",
|
"enabled": "فعال",
|
||||||
"encryption_method": "روش رمزنگاری",
|
"encryption": "روش رمزنگاری",
|
||||||
|
"encryption_client_padding": "پدینگ کلاینت",
|
||||||
|
"encryption_mode": "حالت",
|
||||||
|
"encryption_password": "گذرواژه",
|
||||||
|
"encryption_password_placeholder": "برای تولید خودکار خالی بگذارید، به صورت دستی برای رمزنگاری پساکوانتومی جایگزین کنید",
|
||||||
|
"encryption_private_key": "کلید خصوصی",
|
||||||
|
"encryption_private_key_placeholder": "برای تولید خودکار خالی بگذارید، به صورت دستی برای رمزنگاری پساکوانتومی جایگزین کنید",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "پدینگ سرور",
|
||||||
|
"encryption_ticket": "زمان بلیط",
|
||||||
"expireTime": "زمان انقضا",
|
"expireTime": "زمان انقضا",
|
||||||
"expired": "منقضی شده",
|
"expired": "منقضی شده",
|
||||||
|
"extra": "پیکربندی اضافی",
|
||||||
"flow": "جریان",
|
"flow": "جریان",
|
||||||
"hop_interval": "فاصله پرش",
|
"hop_interval": "فاصله پرش",
|
||||||
"hop_ports": "پورتهای پرش",
|
"hop_ports": "پورتهای پرش",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "انتقال داده ناموفق بود",
|
"migrateFailed": "انتقال داده ناموفق بود",
|
||||||
"migrated": "داده با موفقیت منتقل شد",
|
"migrated": "داده با موفقیت منتقل شد",
|
||||||
"migrating": "در حال انتقال...",
|
"migrating": "در حال انتقال...",
|
||||||
|
"mode": "حالت",
|
||||||
"multiplex": "چندمنظوره",
|
"multiplex": "چندمنظوره",
|
||||||
"name": "نام",
|
"name": "نام",
|
||||||
"noData": "هیچ دادهای",
|
"noData": "هیچ دادهای",
|
||||||
"notAvailable": "غیرقابل دسترسی",
|
"notAvailable": "غیرقابل دسترسی",
|
||||||
|
"obfs": "پنهانسازی",
|
||||||
|
"obfs_host": "میزبان پنهانسازی",
|
||||||
"obfs_password": "رمز عبور اختفا",
|
"obfs_password": "رمز عبور اختفا",
|
||||||
"obfs_password_placeholder": "رمز عبور اختفا را وارد کنید",
|
"obfs_password_placeholder": "رمز عبور اختفا را وارد کنید",
|
||||||
|
"obfs_path": "مسیر پنهانسازی",
|
||||||
"offline": "آفلاین",
|
"offline": "آفلاین",
|
||||||
"online": "آنلاین",
|
"online": "آنلاین",
|
||||||
"onlineUsers": "کاربران آنلاین",
|
"onlineUsers": "کاربران آنلاین",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "سرورها",
|
"pageTitle": "سرورها",
|
||||||
"path": "مسیر",
|
"path": "مسیر",
|
||||||
"please_select": "لطفاً انتخاب کنید",
|
"please_select": "لطفاً انتخاب کنید",
|
||||||
"plugin": "پیکربندی پلاگین",
|
|
||||||
"plugin_opts": "گزینههای پلاگین",
|
|
||||||
"port": "پورت",
|
"port": "پورت",
|
||||||
"protocol_configurations": "پیکربندیهای پروتکل",
|
"protocol_configurations": "پیکربندیهای پروتکل",
|
||||||
"protocol_configurations_desc": "پروتکلهای مورد نیاز را فعال و پیکربندی کنید",
|
"protocol_configurations_desc": "پروتکلهای مورد نیاز را فعال و پیکربندی کنید",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "روش رمزنگاری را انتخاب کنید",
|
"select_encryption_method": "روش رمزنگاری را انتخاب کنید",
|
||||||
"server_key": "کلید سرور",
|
"server_key": "کلید سرور",
|
||||||
"service_name": "نام سرویس",
|
"service_name": "نام سرویس",
|
||||||
|
"sorted_success": "با موفقیت مرتب شد",
|
||||||
"status": "وضعیت",
|
"status": "وضعیت",
|
||||||
"subscribeId": "شناسه اشتراک",
|
"subscribeId": "شناسه اشتراک",
|
||||||
"subscription": "اشتراک",
|
"subscription": "اشتراک",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Valitse protokolla…",
|
"select_protocol": "Valitse protokolla…",
|
||||||
"select_server": "Valitse palvelin…",
|
"select_server": "Valitse palvelin…",
|
||||||
"server": "Palvelin",
|
"server": "Palvelin",
|
||||||
|
"sorted_success": "Lajiteltu onnistuneesti",
|
||||||
"tags": "Tunnisteet",
|
"tags": "Tunnisteet",
|
||||||
"tags_description": "Oikeuksien ryhmittelytunniste (mukaan lukien suunnitelman sitominen ja toimituskäytännöt).",
|
"tags_description": "Oikeuksien ryhmittelytunniste (mukaan lukien suunnitelman sitominen ja toimituskäytännöt).",
|
||||||
"tags_placeholder": "Käytä Enteriä tai pilkkua (,) lisätäksesi useita tunnisteita",
|
"tags_placeholder": "Käytä Enteriä tai pilkkua (,) lisätäksesi useita tunnisteita",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Syötä kaistanleveys, jätä tyhjäksi BBR:lle",
|
"bandwidth_placeholder": "Syötä kaistanleveys, jätä tyhjäksi BBR:lle",
|
||||||
"basic": "Perusasetukset",
|
"basic": "Perusasetukset",
|
||||||
"cancel": "Peruuta",
|
"cancel": "Peruuta",
|
||||||
|
"cipher": "Salausalgoritmi",
|
||||||
"city": "Kaupunki",
|
"city": "Kaupunki",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Muokkaa palvelinta",
|
"drawerEditTitle": "Muokkaa palvelinta",
|
||||||
"edit": "Muokkaa",
|
"edit": "Muokkaa",
|
||||||
"enabled": "Käytössä",
|
"enabled": "Käytössä",
|
||||||
"encryption_method": "Salausmenetelmä",
|
"encryption": "Salausmenetelmä",
|
||||||
|
"encryption_client_padding": "Asiakkaan täyte",
|
||||||
|
"encryption_mode": "Tila",
|
||||||
|
"encryption_password": "Salasana",
|
||||||
|
"encryption_password_placeholder": "Jätä tyhjäksi automaattista generointia varten, vaihda manuaalisesti post-kvanttisalausta varten",
|
||||||
|
"encryption_private_key": "Yksityinen avain",
|
||||||
|
"encryption_private_key_placeholder": "Jätä tyhjäksi automaattista generointia varten, vaihda manuaalisesti post-kvanttisalausta varten",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Palvelimen täyte",
|
||||||
|
"encryption_ticket": "Lippuaika",
|
||||||
"expireTime": "Voimassaoloaika",
|
"expireTime": "Voimassaoloaika",
|
||||||
"expired": "Vanhentunut",
|
"expired": "Vanhentunut",
|
||||||
|
"extra": "Lisäasetukset",
|
||||||
"flow": "Virta",
|
"flow": "Virta",
|
||||||
"hop_interval": "Hyppyvälit",
|
"hop_interval": "Hyppyvälit",
|
||||||
"hop_ports": "Hyppysatamat",
|
"hop_ports": "Hyppysatamat",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Tietojen siirto epäonnistui",
|
"migrateFailed": "Tietojen siirto epäonnistui",
|
||||||
"migrated": "Tiedot siirretty onnistuneesti",
|
"migrated": "Tiedot siirretty onnistuneesti",
|
||||||
"migrating": "Siirretään...",
|
"migrating": "Siirretään...",
|
||||||
|
"mode": "Tila",
|
||||||
"multiplex": "Monistamo",
|
"multiplex": "Monistamo",
|
||||||
"name": "Nimi",
|
"name": "Nimi",
|
||||||
"noData": "Ei tietoja",
|
"noData": "Ei tietoja",
|
||||||
"notAvailable": "Ei saatavilla",
|
"notAvailable": "Ei saatavilla",
|
||||||
|
"obfs": "Häilytys",
|
||||||
|
"obfs_host": "Häilytys isäntä",
|
||||||
"obfs_password": "Häilytyssalasana",
|
"obfs_password": "Häilytyssalasana",
|
||||||
"obfs_password_placeholder": "Syötä häilytyssalasana",
|
"obfs_password_placeholder": "Syötä häilytyssalasana",
|
||||||
|
"obfs_path": "Häilytys polku",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"online": "Online",
|
"online": "Online",
|
||||||
"onlineUsers": "Verkossa olevat käyttäjät",
|
"onlineUsers": "Verkossa olevat käyttäjät",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Palvelimet",
|
"pageTitle": "Palvelimet",
|
||||||
"path": "Polku",
|
"path": "Polku",
|
||||||
"please_select": "Ole hyvä ja valitse",
|
"please_select": "Ole hyvä ja valitse",
|
||||||
"plugin": "Laajennuksen asetukset",
|
|
||||||
"plugin_opts": "Laajennusvaihtoehdot",
|
|
||||||
"port": "Portti",
|
"port": "Portti",
|
||||||
"protocol_configurations": "Protokolla-asetukset",
|
"protocol_configurations": "Protokolla-asetukset",
|
||||||
"protocol_configurations_desc": "Ota käyttöön ja määritä tarvittavat protokollatyypit",
|
"protocol_configurations_desc": "Ota käyttöön ja määritä tarvittavat protokollatyypit",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Valitse salausmenetelmä",
|
"select_encryption_method": "Valitse salausmenetelmä",
|
||||||
"server_key": "Palvelimen avain",
|
"server_key": "Palvelimen avain",
|
||||||
"service_name": "Palvelun nimi",
|
"service_name": "Palvelun nimi",
|
||||||
|
"sorted_success": "Lajiteltu onnistuneesti",
|
||||||
"status": "Tila",
|
"status": "Tila",
|
||||||
"subscribeId": "Tilauksen ID",
|
"subscribeId": "Tilauksen ID",
|
||||||
"subscription": "Tilauksen",
|
"subscription": "Tilauksen",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Sélectionner un protocole…",
|
"select_protocol": "Sélectionner un protocole…",
|
||||||
"select_server": "Sélectionner un serveur…",
|
"select_server": "Sélectionner un serveur…",
|
||||||
"server": "Serveur",
|
"server": "Serveur",
|
||||||
|
"sorted_success": "Trié avec succès",
|
||||||
"tags": "Étiquettes",
|
"tags": "Étiquettes",
|
||||||
"tags_description": "Étiquette de regroupement de permissions (y compris l'association de plan et les politiques de livraison).",
|
"tags_description": "Étiquette de regroupement de permissions (y compris l'association de plan et les politiques de livraison).",
|
||||||
"tags_placeholder": "Utilisez Entrée ou une virgule (,) pour ajouter plusieurs étiquettes",
|
"tags_placeholder": "Utilisez Entrée ou une virgule (,) pour ajouter plusieurs étiquettes",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Entrez la bande passante, laissez vide pour BBR",
|
"bandwidth_placeholder": "Entrez la bande passante, laissez vide pour BBR",
|
||||||
"basic": "Configuration de base",
|
"basic": "Configuration de base",
|
||||||
"cancel": "Annuler",
|
"cancel": "Annuler",
|
||||||
|
"cipher": "Algorithme de chiffrement",
|
||||||
"city": "Ville",
|
"city": "Ville",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Modifier le serveur",
|
"drawerEditTitle": "Modifier le serveur",
|
||||||
"edit": "Modifier",
|
"edit": "Modifier",
|
||||||
"enabled": "Activé",
|
"enabled": "Activé",
|
||||||
"encryption_method": "Méthode de chiffrement",
|
"encryption": "Méthode de chiffrement",
|
||||||
|
"encryption_client_padding": "Remplissage client",
|
||||||
|
"encryption_mode": "Mode",
|
||||||
|
"encryption_password": "Mot de passe",
|
||||||
|
"encryption_password_placeholder": "Laissez vide pour une génération automatique, remplacez manuellement pour un chiffrement post-quantique",
|
||||||
|
"encryption_private_key": "Clé privée",
|
||||||
|
"encryption_private_key_placeholder": "Laissez vide pour une génération automatique, remplacez manuellement pour un chiffrement post-quantique",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Remplissage serveur",
|
||||||
|
"encryption_ticket": "Temps de ticket",
|
||||||
"expireTime": "Temps d'expiration",
|
"expireTime": "Temps d'expiration",
|
||||||
"expired": "Expiré",
|
"expired": "Expiré",
|
||||||
|
"extra": "Configuration supplémentaire",
|
||||||
"flow": "Flux",
|
"flow": "Flux",
|
||||||
"hop_interval": "Intervalle de saut",
|
"hop_interval": "Intervalle de saut",
|
||||||
"hop_ports": "Ports de saut",
|
"hop_ports": "Ports de saut",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Échec de la migration des données",
|
"migrateFailed": "Échec de la migration des données",
|
||||||
"migrated": "Données migrées avec succès",
|
"migrated": "Données migrées avec succès",
|
||||||
"migrating": "Migration en cours...",
|
"migrating": "Migration en cours...",
|
||||||
|
"mode": "Mode",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Nom",
|
"name": "Nom",
|
||||||
"noData": "Aucune donnée",
|
"noData": "Aucune donnée",
|
||||||
"notAvailable": "N/A",
|
"notAvailable": "N/A",
|
||||||
|
"obfs": "Obfuscation",
|
||||||
|
"obfs_host": "Hôte Obfs",
|
||||||
"obfs_password": "Mot de passe d'obfuscation",
|
"obfs_password": "Mot de passe d'obfuscation",
|
||||||
"obfs_password_placeholder": "Entrez le mot de passe d'obfuscation",
|
"obfs_password_placeholder": "Entrez le mot de passe d'obfuscation",
|
||||||
|
"obfs_path": "Chemin Obfs",
|
||||||
"offline": "Hors ligne",
|
"offline": "Hors ligne",
|
||||||
"online": "En ligne",
|
"online": "En ligne",
|
||||||
"onlineUsers": "Utilisateurs en ligne",
|
"onlineUsers": "Utilisateurs en ligne",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Serveurs",
|
"pageTitle": "Serveurs",
|
||||||
"path": "Chemin",
|
"path": "Chemin",
|
||||||
"please_select": "Veuillez sélectionner",
|
"please_select": "Veuillez sélectionner",
|
||||||
"plugin": "Configuration du plugin",
|
|
||||||
"plugin_opts": "Options du plugin",
|
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"protocol_configurations": "Configurations de protocole",
|
"protocol_configurations": "Configurations de protocole",
|
||||||
"protocol_configurations_desc": "Activer et configurer les types de protocole requis",
|
"protocol_configurations_desc": "Activer et configurer les types de protocole requis",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Sélectionner la méthode de chiffrement",
|
"select_encryption_method": "Sélectionner la méthode de chiffrement",
|
||||||
"server_key": "Clé du serveur",
|
"server_key": "Clé du serveur",
|
||||||
"service_name": "Nom du service",
|
"service_name": "Nom du service",
|
||||||
|
"sorted_success": "Trié avec succès",
|
||||||
"status": "Statut",
|
"status": "Statut",
|
||||||
"subscribeId": "ID d'abonnement",
|
"subscribeId": "ID d'abonnement",
|
||||||
"subscription": "Abonnement",
|
"subscription": "Abonnement",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "प्रोटोकॉल चुनें…",
|
"select_protocol": "प्रोटोकॉल चुनें…",
|
||||||
"select_server": "सर्वर चुनें…",
|
"select_server": "सर्वर चुनें…",
|
||||||
"server": "सर्वर",
|
"server": "सर्वर",
|
||||||
|
"sorted_success": "सफलतापूर्वक क्रमबद्ध किया गया",
|
||||||
"tags": "टैग",
|
"tags": "टैग",
|
||||||
"tags_description": "अनुमति समूह टैग (योजना बाइंडिंग और वितरण नीतियों सहित)।",
|
"tags_description": "अनुमति समूह टैग (योजना बाइंडिंग और वितरण नीतियों सहित)।",
|
||||||
"tags_placeholder": "एकाधिक टैग जोड़ने के लिए Enter या कॉमा (,) का उपयोग करें",
|
"tags_placeholder": "एकाधिक टैग जोड़ने के लिए Enter या कॉमा (,) का उपयोग करें",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "बैंडविड्थ दर्ज करें, BBR के लिए खाली छोड़ें",
|
"bandwidth_placeholder": "बैंडविड्थ दर्ज करें, BBR के लिए खाली छोड़ें",
|
||||||
"basic": "बुनियादी कॉन्फ़िगरेशन",
|
"basic": "बुनियादी कॉन्फ़िगरेशन",
|
||||||
"cancel": "रद्द करें",
|
"cancel": "रद्द करें",
|
||||||
|
"cipher": "एन्क्रिप्शन एल्गोरिदम",
|
||||||
"city": "शहर",
|
"city": "शहर",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "सर्वर संपादित करें",
|
"drawerEditTitle": "सर्वर संपादित करें",
|
||||||
"edit": "संपादित करें",
|
"edit": "संपादित करें",
|
||||||
"enabled": "सक्षम",
|
"enabled": "सक्षम",
|
||||||
"encryption_method": "एन्क्रिप्शन विधि",
|
"encryption": "एन्क्रिप्शन विधि",
|
||||||
|
"encryption_client_padding": "क्लाइंट पैडिंग",
|
||||||
|
"encryption_mode": "मोड",
|
||||||
|
"encryption_password": "पासवर्ड",
|
||||||
|
"encryption_password_placeholder": "स्वतः उत्पन्न करने के लिए खाली छोड़ें, पोस्ट-क्वांटम एन्क्रिप्शन के लिए मैन्युअल रूप से बदलें",
|
||||||
|
"encryption_private_key": "निजी कुंजी",
|
||||||
|
"encryption_private_key_placeholder": "स्वतः उत्पन्न करने के लिए खाली छोड़ें, पोस्ट-क्वांटम एन्क्रिप्शन के लिए मैन्युअल रूप से बदलें",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "सर्वर पैडिंग",
|
||||||
|
"encryption_ticket": "टिकट समय",
|
||||||
"expireTime": "समाप्ति समय",
|
"expireTime": "समाप्ति समय",
|
||||||
"expired": "समय समाप्त",
|
"expired": "समय समाप्त",
|
||||||
|
"extra": "अतिरिक्त कॉन्फ़िगरेशन",
|
||||||
"flow": "प्रवाह",
|
"flow": "प्रवाह",
|
||||||
"hop_interval": "हॉप अंतराल",
|
"hop_interval": "हॉप अंतराल",
|
||||||
"hop_ports": "हॉप पोर्ट",
|
"hop_ports": "हॉप पोर्ट",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "डेटा माइग्रेशन विफल",
|
"migrateFailed": "डेटा माइग्रेशन विफल",
|
||||||
"migrated": "डेटा सफलतापूर्वक माइग्रेट किया गया",
|
"migrated": "डेटा सफलतापूर्वक माइग्रेट किया गया",
|
||||||
"migrating": "माइग्रेट किया जा रहा है...",
|
"migrating": "माइग्रेट किया जा रहा है...",
|
||||||
|
"mode": "मोड",
|
||||||
"multiplex": "मल्टीप्लेक्स",
|
"multiplex": "मल्टीप्लेक्स",
|
||||||
"name": "नाम",
|
"name": "नाम",
|
||||||
"noData": "कोई डेटा नहीं",
|
"noData": "कोई डेटा नहीं",
|
||||||
"notAvailable": "उपलब्ध नहीं",
|
"notAvailable": "उपलब्ध नहीं",
|
||||||
|
"obfs": "ओबफस्केशन",
|
||||||
|
"obfs_host": "ओबफ्स होस्ट",
|
||||||
"obfs_password": "अवशोषण पासवर्ड",
|
"obfs_password": "अवशोषण पासवर्ड",
|
||||||
"obfs_password_placeholder": "अवशोषण पासवर्ड दर्ज करें",
|
"obfs_password_placeholder": "अवशोषण पासवर्ड दर्ज करें",
|
||||||
|
"obfs_path": "ओबफ्स पथ",
|
||||||
"offline": "ऑफलाइन",
|
"offline": "ऑफलाइन",
|
||||||
"online": "ऑनलाइन",
|
"online": "ऑनलाइन",
|
||||||
"onlineUsers": "ऑनलाइन उपयोगकर्ता",
|
"onlineUsers": "ऑनलाइन उपयोगकर्ता",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "सर्वर",
|
"pageTitle": "सर्वर",
|
||||||
"path": "पथ",
|
"path": "पथ",
|
||||||
"please_select": "कृपया चुनें",
|
"please_select": "कृपया चुनें",
|
||||||
"plugin": "प्लगइन कॉन्फ़िगरेशन",
|
|
||||||
"plugin_opts": "प्लगइन विकल्प",
|
|
||||||
"port": "पोर्ट",
|
"port": "पोर्ट",
|
||||||
"protocol_configurations": "प्रोटोकॉल कॉन्फ़िगरेशन",
|
"protocol_configurations": "प्रोटोकॉल कॉन्फ़िगरेशन",
|
||||||
"protocol_configurations_desc": "आवश्यक प्रोटोकॉल प्रकारों को सक्षम और कॉन्फ़िगर करें",
|
"protocol_configurations_desc": "आवश्यक प्रोटोकॉल प्रकारों को सक्षम और कॉन्फ़िगर करें",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "एन्क्रिप्शन विधि चुनें",
|
"select_encryption_method": "एन्क्रिप्शन विधि चुनें",
|
||||||
"server_key": "सर्वर कुंजी",
|
"server_key": "सर्वर कुंजी",
|
||||||
"service_name": "सेवा का नाम",
|
"service_name": "सेवा का नाम",
|
||||||
|
"sorted_success": "सफलता से क्रमबद्ध किया गया",
|
||||||
"status": "स्थिति",
|
"status": "स्थिति",
|
||||||
"subscribeId": "सदस्यता आईडी",
|
"subscribeId": "सदस्यता आईडी",
|
||||||
"subscription": "सदस्यता",
|
"subscription": "सदस्यता",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Válassza ki a protokollt…",
|
"select_protocol": "Válassza ki a protokollt…",
|
||||||
"select_server": "Válassza ki a szervert…",
|
"select_server": "Válassza ki a szervert…",
|
||||||
"server": "Szerver",
|
"server": "Szerver",
|
||||||
|
"sorted_success": "Sikeresen rendezve",
|
||||||
"tags": "Címkék",
|
"tags": "Címkék",
|
||||||
"tags_description": "Engedélyezési csoportosító címke (beleértve a tervkötést és a szállítási irányelveket).",
|
"tags_description": "Engedélyezési csoportosító címke (beleértve a tervkötést és a szállítási irányelveket).",
|
||||||
"tags_placeholder": "Több címke hozzáadásához használja az Entert vagy a vesszőt (,)",
|
"tags_placeholder": "Több címke hozzáadásához használja az Entert vagy a vesszőt (,)",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Adja meg a sávszélességet, hagyja üresen a BBR-hez",
|
"bandwidth_placeholder": "Adja meg a sávszélességet, hagyja üresen a BBR-hez",
|
||||||
"basic": "Alapértelmezett Beállítások",
|
"basic": "Alapértelmezett Beállítások",
|
||||||
"cancel": "Mégse",
|
"cancel": "Mégse",
|
||||||
|
"cipher": "Titkosítási algoritmus",
|
||||||
"city": "Város",
|
"city": "Város",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Szerver szerkesztése",
|
"drawerEditTitle": "Szerver szerkesztése",
|
||||||
"edit": "Szerkesztés",
|
"edit": "Szerkesztés",
|
||||||
"enabled": "Engedélyezve",
|
"enabled": "Engedélyezve",
|
||||||
"encryption_method": "Titkosítási módszer",
|
"encryption": "Titkosítási módszer",
|
||||||
|
"encryption_client_padding": "Kliens kitöltés",
|
||||||
|
"encryption_mode": "Mód",
|
||||||
|
"encryption_password": "Jelszó",
|
||||||
|
"encryption_password_placeholder": "Hagyja üresen az automatikus generáláshoz, cserélje ki kézzel a poszt-kvantum titkosításhoz",
|
||||||
|
"encryption_private_key": "Privát kulcs",
|
||||||
|
"encryption_private_key_placeholder": "Hagyja üresen az automatikus generáláshoz, cserélje ki kézzel a poszt-kvantum titkosításhoz",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Szerver kitöltés",
|
||||||
|
"encryption_ticket": "Jegy idő",
|
||||||
"expireTime": "Lejárati idő",
|
"expireTime": "Lejárati idő",
|
||||||
"expired": "Lejárt",
|
"expired": "Lejárt",
|
||||||
|
"extra": "További konfiguráció",
|
||||||
"flow": "Forgalom",
|
"flow": "Forgalom",
|
||||||
"hop_interval": "Ugrás időköz",
|
"hop_interval": "Ugrás időköz",
|
||||||
"hop_ports": "Ugrás portok",
|
"hop_ports": "Ugrás portok",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Az adatok migrálása sikertelen",
|
"migrateFailed": "Az adatok migrálása sikertelen",
|
||||||
"migrated": "Az adatok sikeresen migrálva",
|
"migrated": "Az adatok sikeresen migrálva",
|
||||||
"migrating": "Migrálás...",
|
"migrating": "Migrálás...",
|
||||||
|
"mode": "Mód",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Név",
|
"name": "Név",
|
||||||
"noData": "Nincs adat",
|
"noData": "Nincs adat",
|
||||||
"notAvailable": "N/A",
|
"notAvailable": "N/A",
|
||||||
|
"obfs": "Obfuszkálás",
|
||||||
|
"obfs_host": "Obfs gazda",
|
||||||
"obfs_password": "Obfuszkálás jelszó",
|
"obfs_password": "Obfuszkálás jelszó",
|
||||||
"obfs_password_placeholder": "Adja meg az obfuszkálás jelszót",
|
"obfs_password_placeholder": "Adja meg az obfuszkálás jelszót",
|
||||||
|
"obfs_path": "Obfs útvonal",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"online": "Online",
|
"online": "Online",
|
||||||
"onlineUsers": "Online felhasználók",
|
"onlineUsers": "Online felhasználók",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Szerverek",
|
"pageTitle": "Szerverek",
|
||||||
"path": "Útvonal",
|
"path": "Útvonal",
|
||||||
"please_select": "Kérjük, válasszon",
|
"please_select": "Kérjük, válasszon",
|
||||||
"plugin": "Bővítmény Beállítások",
|
|
||||||
"plugin_opts": "Bővítmény Opciók",
|
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"protocol_configurations": "Protokoll Beállítások",
|
"protocol_configurations": "Protokoll Beállítások",
|
||||||
"protocol_configurations_desc": "Engedélyezze és konfigurálja a szükséges protokolltípusokat",
|
"protocol_configurations_desc": "Engedélyezze és konfigurálja a szükséges protokolltípusokat",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Válassza ki a titkosítási módszert",
|
"select_encryption_method": "Válassza ki a titkosítási módszert",
|
||||||
"server_key": "Szerver kulcs",
|
"server_key": "Szerver kulcs",
|
||||||
"service_name": "Szolgáltatás neve",
|
"service_name": "Szolgáltatás neve",
|
||||||
|
"sorted_success": "Sikeresen rendezve",
|
||||||
"status": "Állapot",
|
"status": "Állapot",
|
||||||
"subscribeId": "Előfizetési ID",
|
"subscribeId": "Előfizetési ID",
|
||||||
"subscription": "Előfizetés",
|
"subscription": "Előfizetés",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "プロトコルを選択…",
|
"select_protocol": "プロトコルを選択…",
|
||||||
"select_server": "サーバーを選択…",
|
"select_server": "サーバーを選択…",
|
||||||
"server": "サーバー",
|
"server": "サーバー",
|
||||||
|
"sorted_success": "正常にソートされました",
|
||||||
"tags": "タグ",
|
"tags": "タグ",
|
||||||
"tags_description": "権限グループ化タグ(プランバインディングおよび配信ポリシーを含む)。",
|
"tags_description": "権限グループ化タグ(プランバインディングおよび配信ポリシーを含む)。",
|
||||||
"tags_placeholder": "複数のタグを追加するにはEnterまたはカンマ(,)を使用してください",
|
"tags_placeholder": "複数のタグを追加するにはEnterまたはカンマ(,)を使用してください",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "帯域幅を入力してください。BBRの場合は空白のままにしてください。",
|
"bandwidth_placeholder": "帯域幅を入力してください。BBRの場合は空白のままにしてください。",
|
||||||
"basic": "基本設定",
|
"basic": "基本設定",
|
||||||
"cancel": "キャンセル",
|
"cancel": "キャンセル",
|
||||||
|
"cipher": "暗号化アルゴリズム",
|
||||||
"city": "都市",
|
"city": "都市",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "サーバーを編集",
|
"drawerEditTitle": "サーバーを編集",
|
||||||
"edit": "編集",
|
"edit": "編集",
|
||||||
"enabled": "有効",
|
"enabled": "有効",
|
||||||
"encryption_method": "暗号化方式",
|
"encryption": "暗号化方式",
|
||||||
|
"encryption_client_padding": "クライアントパディング",
|
||||||
|
"encryption_mode": "モード",
|
||||||
|
"encryption_password": "パスワード",
|
||||||
|
"encryption_password_placeholder": "自動生成のために空白のままにし、ポスト量子暗号化のために手動で置き換えてください",
|
||||||
|
"encryption_private_key": "秘密鍵",
|
||||||
|
"encryption_private_key_placeholder": "自動生成のために空白のままにし、ポスト量子暗号化のために手動で置き換えてください",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "サーバーパディング",
|
||||||
|
"encryption_ticket": "チケット時間",
|
||||||
"expireTime": "有効期限",
|
"expireTime": "有効期限",
|
||||||
"expired": "期限切れ",
|
"expired": "期限切れ",
|
||||||
|
"extra": "追加設定",
|
||||||
"flow": "フロー",
|
"flow": "フロー",
|
||||||
"hop_interval": "ホップ間隔",
|
"hop_interval": "ホップ間隔",
|
||||||
"hop_ports": "ホップポート",
|
"hop_ports": "ホップポート",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "データの移行に失敗しました",
|
"migrateFailed": "データの移行に失敗しました",
|
||||||
"migrated": "データが正常に移行されました",
|
"migrated": "データが正常に移行されました",
|
||||||
"migrating": "移行中...",
|
"migrating": "移行中...",
|
||||||
|
"mode": "モード",
|
||||||
"multiplex": "マルチプレックス",
|
"multiplex": "マルチプレックス",
|
||||||
"name": "名前",
|
"name": "名前",
|
||||||
"noData": "データなし",
|
"noData": "データなし",
|
||||||
"notAvailable": "利用不可",
|
"notAvailable": "利用不可",
|
||||||
|
"obfs": "難読化",
|
||||||
|
"obfs_host": "難読化ホスト",
|
||||||
"obfs_password": "難読化パスワード",
|
"obfs_password": "難読化パスワード",
|
||||||
"obfs_password_placeholder": "難読化パスワードを入力してください",
|
"obfs_password_placeholder": "難読化パスワードを入力してください",
|
||||||
|
"obfs_path": "難読化パス",
|
||||||
"offline": "オフライン",
|
"offline": "オフライン",
|
||||||
"online": "オンライン",
|
"online": "オンライン",
|
||||||
"onlineUsers": "オンラインユーザー",
|
"onlineUsers": "オンラインユーザー",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "サーバー",
|
"pageTitle": "サーバー",
|
||||||
"path": "パス",
|
"path": "パス",
|
||||||
"please_select": "選択してください",
|
"please_select": "選択してください",
|
||||||
"plugin": "プラグイン設定",
|
|
||||||
"plugin_opts": "プラグインオプション",
|
|
||||||
"port": "ポート",
|
"port": "ポート",
|
||||||
"protocol_configurations": "プロトコル設定",
|
"protocol_configurations": "プロトコル設定",
|
||||||
"protocol_configurations_desc": "必要なプロトコルタイプを有効にして設定します",
|
"protocol_configurations_desc": "必要なプロトコルタイプを有効にして設定します",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "暗号化方式を選択",
|
"select_encryption_method": "暗号化方式を選択",
|
||||||
"server_key": "サーバーキー",
|
"server_key": "サーバーキー",
|
||||||
"service_name": "サービス名",
|
"service_name": "サービス名",
|
||||||
|
"sorted_success": "正常にソートされました",
|
||||||
"status": "ステータス",
|
"status": "ステータス",
|
||||||
"subscribeId": "サブスクリプションID",
|
"subscribeId": "サブスクリプションID",
|
||||||
"subscription": "サブスクリプション",
|
"subscription": "サブスクリプション",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "프로토콜 선택…",
|
"select_protocol": "프로토콜 선택…",
|
||||||
"select_server": "서버 선택…",
|
"select_server": "서버 선택…",
|
||||||
"server": "서버",
|
"server": "서버",
|
||||||
|
"sorted_success": "정렬이 완료되었습니다.",
|
||||||
"tags": "태그",
|
"tags": "태그",
|
||||||
"tags_description": "권한 그룹화 태그(계획 바인딩 및 배포 정책 포함).",
|
"tags_description": "권한 그룹화 태그(계획 바인딩 및 배포 정책 포함).",
|
||||||
"tags_placeholder": "여러 태그를 추가하려면 Enter 또는 쉼표(,)를 사용하세요",
|
"tags_placeholder": "여러 태그를 추가하려면 Enter 또는 쉼표(,)를 사용하세요",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "대역폭을 입력하세요. BBR을 사용하려면 비워 두세요.",
|
"bandwidth_placeholder": "대역폭을 입력하세요. BBR을 사용하려면 비워 두세요.",
|
||||||
"basic": "기본 설정",
|
"basic": "기본 설정",
|
||||||
"cancel": "취소",
|
"cancel": "취소",
|
||||||
|
"cipher": "암호화 알고리즘",
|
||||||
"city": "도시",
|
"city": "도시",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "서버 편집",
|
"drawerEditTitle": "서버 편집",
|
||||||
"edit": "편집",
|
"edit": "편집",
|
||||||
"enabled": "활성화됨",
|
"enabled": "활성화됨",
|
||||||
"encryption_method": "암호화 방법",
|
"encryption": "암호화 방법",
|
||||||
|
"encryption_client_padding": "클라이언트 패딩",
|
||||||
|
"encryption_mode": "모드",
|
||||||
|
"encryption_password": "비밀번호",
|
||||||
|
"encryption_password_placeholder": "자동 생성하려면 비워 두고, 포스트 양자 암호화를 위해 수동으로 교체하세요",
|
||||||
|
"encryption_private_key": "개인 키",
|
||||||
|
"encryption_private_key_placeholder": "자동 생성하려면 비워 두고, 포스트 양자 암호화를 위해 수동으로 교체하세요",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "서버 패딩",
|
||||||
|
"encryption_ticket": "티켓 시간",
|
||||||
"expireTime": "만료 시간",
|
"expireTime": "만료 시간",
|
||||||
"expired": "만료됨",
|
"expired": "만료됨",
|
||||||
|
"extra": "추가 구성",
|
||||||
"flow": "흐름",
|
"flow": "흐름",
|
||||||
"hop_interval": "홉 간격",
|
"hop_interval": "홉 간격",
|
||||||
"hop_ports": "홉 포트",
|
"hop_ports": "홉 포트",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "데이터 마이그레이션 실패",
|
"migrateFailed": "데이터 마이그레이션 실패",
|
||||||
"migrated": "데이터가 성공적으로 마이그레이션되었습니다",
|
"migrated": "데이터가 성공적으로 마이그레이션되었습니다",
|
||||||
"migrating": "마이그레이션 중...",
|
"migrating": "마이그레이션 중...",
|
||||||
|
"mode": "모드",
|
||||||
"multiplex": "멀티플렉스",
|
"multiplex": "멀티플렉스",
|
||||||
"name": "이름",
|
"name": "이름",
|
||||||
"noData": "데이터 없음",
|
"noData": "데이터 없음",
|
||||||
"notAvailable": "사용 불가",
|
"notAvailable": "사용 불가",
|
||||||
|
"obfs": "난독화",
|
||||||
|
"obfs_host": "난독화 호스트",
|
||||||
"obfs_password": "난독화 비밀번호",
|
"obfs_password": "난독화 비밀번호",
|
||||||
"obfs_password_placeholder": "난독화 비밀번호를 입력하세요",
|
"obfs_password_placeholder": "난독화 비밀번호를 입력하세요",
|
||||||
|
"obfs_path": "난독화 경로",
|
||||||
"offline": "오프라인",
|
"offline": "오프라인",
|
||||||
"online": "온라인",
|
"online": "온라인",
|
||||||
"onlineUsers": "온라인 사용자",
|
"onlineUsers": "온라인 사용자",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "서버",
|
"pageTitle": "서버",
|
||||||
"path": "경로",
|
"path": "경로",
|
||||||
"please_select": "선택해 주세요",
|
"please_select": "선택해 주세요",
|
||||||
"plugin": "플러그인 설정",
|
|
||||||
"plugin_opts": "플러그인 옵션",
|
|
||||||
"port": "포트",
|
"port": "포트",
|
||||||
"protocol_configurations": "프로토콜 설정",
|
"protocol_configurations": "프로토콜 설정",
|
||||||
"protocol_configurations_desc": "필요한 프로토콜 유형을 활성화하고 구성합니다",
|
"protocol_configurations_desc": "필요한 프로토콜 유형을 활성화하고 구성합니다",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "암호화 방법 선택",
|
"select_encryption_method": "암호화 방법 선택",
|
||||||
"server_key": "서버 키",
|
"server_key": "서버 키",
|
||||||
"service_name": "서비스 이름",
|
"service_name": "서비스 이름",
|
||||||
|
"sorted_success": "정렬이 완료되었습니다.",
|
||||||
"status": "상태",
|
"status": "상태",
|
||||||
"subscribeId": "구독 ID",
|
"subscribeId": "구독 ID",
|
||||||
"subscription": "구독",
|
"subscription": "구독",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Velg protokoll…",
|
"select_protocol": "Velg protokoll…",
|
||||||
"select_server": "Velg server…",
|
"select_server": "Velg server…",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
|
"sorted_success": "Sortert med suksess",
|
||||||
"tags": "Tagger",
|
"tags": "Tagger",
|
||||||
"tags_description": "Tillatelsesgrupperingstagg (inkl. planbinding og leveringspolicyer).",
|
"tags_description": "Tillatelsesgrupperingstagg (inkl. planbinding og leveringspolicyer).",
|
||||||
"tags_placeholder": "Bruk Enter eller komma (,) for å legge til flere tagger",
|
"tags_placeholder": "Bruk Enter eller komma (,) for å legge til flere tagger",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Skriv inn båndbredde, la stå tomt for BBR",
|
"bandwidth_placeholder": "Skriv inn båndbredde, la stå tomt for BBR",
|
||||||
"basic": "Grunnleggende Konfigurasjon",
|
"basic": "Grunnleggende Konfigurasjon",
|
||||||
"cancel": "Avbryt",
|
"cancel": "Avbryt",
|
||||||
|
"cipher": "Krypteringsalgoritme",
|
||||||
"city": "By",
|
"city": "By",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Rediger server",
|
"drawerEditTitle": "Rediger server",
|
||||||
"edit": "Rediger",
|
"edit": "Rediger",
|
||||||
"enabled": "Aktivert",
|
"enabled": "Aktivert",
|
||||||
"encryption_method": "Krypteringsmetode",
|
"encryption": "Krypteringsmetode",
|
||||||
|
"encryption_client_padding": "Klient Padding",
|
||||||
|
"encryption_mode": "Modus",
|
||||||
|
"encryption_password": "Passord",
|
||||||
|
"encryption_password_placeholder": "La stå tom for automatisk generering, erstatt manuelt for post-kvantum kryptering",
|
||||||
|
"encryption_private_key": "Privat nøkkel",
|
||||||
|
"encryption_private_key_placeholder": "La stå tom for automatisk generering, erstatt manuelt for post-kvantum kryptering",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Server Padding",
|
||||||
|
"encryption_ticket": "Billettid",
|
||||||
"expireTime": "Utløpstid",
|
"expireTime": "Utløpstid",
|
||||||
"expired": "Utløpt",
|
"expired": "Utløpt",
|
||||||
|
"extra": "Ekstra konfigurasjon",
|
||||||
"flow": "Flyt",
|
"flow": "Flyt",
|
||||||
"hop_interval": "Hoppintervall",
|
"hop_interval": "Hoppintervall",
|
||||||
"hop_ports": "Hoppporter",
|
"hop_ports": "Hoppporter",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Datamigrering mislyktes",
|
"migrateFailed": "Datamigrering mislyktes",
|
||||||
"migrated": "Data migrert med suksess",
|
"migrated": "Data migrert med suksess",
|
||||||
"migrating": "Migrerer...",
|
"migrating": "Migrerer...",
|
||||||
|
"mode": "Modus",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Navn",
|
"name": "Navn",
|
||||||
"noData": "Ingen data",
|
"noData": "Ingen data",
|
||||||
"notAvailable": "Ikke tilgjengelig",
|
"notAvailable": "Ikke tilgjengelig",
|
||||||
|
"obfs": "Obfuskering",
|
||||||
|
"obfs_host": "Obfs Vert",
|
||||||
"obfs_password": "Obfuskasjonspassord",
|
"obfs_password": "Obfuskasjonspassord",
|
||||||
"obfs_password_placeholder": "Skriv inn obfuskasjonspassord",
|
"obfs_password_placeholder": "Skriv inn obfuskasjonspassord",
|
||||||
|
"obfs_path": "Obfs Sti",
|
||||||
"offline": "Frakoblet",
|
"offline": "Frakoblet",
|
||||||
"online": "På nett",
|
"online": "På nett",
|
||||||
"onlineUsers": "Brukere på nett",
|
"onlineUsers": "Brukere på nett",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Servere",
|
"pageTitle": "Servere",
|
||||||
"path": "Sti",
|
"path": "Sti",
|
||||||
"please_select": "Vennligst velg",
|
"please_select": "Vennligst velg",
|
||||||
"plugin": "Plugin Konfigurasjon",
|
|
||||||
"plugin_opts": "Plugin Alternativer",
|
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"protocol_configurations": "Protokoll Konfigurasjoner",
|
"protocol_configurations": "Protokoll Konfigurasjoner",
|
||||||
"protocol_configurations_desc": "Aktiver og konfigurer de nødvendige protokolltypene",
|
"protocol_configurations_desc": "Aktiver og konfigurer de nødvendige protokolltypene",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Velg krypteringsmetode",
|
"select_encryption_method": "Velg krypteringsmetode",
|
||||||
"server_key": "Servernøkkel",
|
"server_key": "Servernøkkel",
|
||||||
"service_name": "Tjenestenavn",
|
"service_name": "Tjenestenavn",
|
||||||
|
"sorted_success": "Sortert med suksess",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
"subscribeId": "Abonnements-ID",
|
"subscribeId": "Abonnements-ID",
|
||||||
"subscription": "Abonnement",
|
"subscription": "Abonnement",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Wybierz protokół…",
|
"select_protocol": "Wybierz protokół…",
|
||||||
"select_server": "Wybierz serwer…",
|
"select_server": "Wybierz serwer…",
|
||||||
"server": "Serwer",
|
"server": "Serwer",
|
||||||
|
"sorted_success": "Posortowano pomyślnie",
|
||||||
"tags": "Tagi",
|
"tags": "Tagi",
|
||||||
"tags_description": "Tag grupujący uprawnienia (w tym powiązania planu i polityki dostarczania).",
|
"tags_description": "Tag grupujący uprawnienia (w tym powiązania planu i polityki dostarczania).",
|
||||||
"tags_placeholder": "Użyj Enter lub przecinka (,) aby dodać wiele tagów",
|
"tags_placeholder": "Użyj Enter lub przecinka (,) aby dodać wiele tagów",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Wprowadź przepustowość, pozostaw puste dla BBR",
|
"bandwidth_placeholder": "Wprowadź przepustowość, pozostaw puste dla BBR",
|
||||||
"basic": "Podstawowa konfiguracja",
|
"basic": "Podstawowa konfiguracja",
|
||||||
"cancel": "Anuluj",
|
"cancel": "Anuluj",
|
||||||
|
"cipher": "Algorytm szyfrowania",
|
||||||
"city": "Miasto",
|
"city": "Miasto",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Edytuj serwer",
|
"drawerEditTitle": "Edytuj serwer",
|
||||||
"edit": "Edytuj",
|
"edit": "Edytuj",
|
||||||
"enabled": "Włączony",
|
"enabled": "Włączony",
|
||||||
"encryption_method": "Metoda szyfrowania",
|
"encryption": "Metoda szyfrowania",
|
||||||
|
"encryption_client_padding": "Padding klienta",
|
||||||
|
"encryption_mode": "Tryb",
|
||||||
|
"encryption_password": "Hasło",
|
||||||
|
"encryption_password_placeholder": "Pozostaw puste dla automatycznego generowania, zastąp ręcznie dla szyfrowania post-kwantowego",
|
||||||
|
"encryption_private_key": "Klucz prywatny",
|
||||||
|
"encryption_private_key_placeholder": "Pozostaw puste dla automatycznego generowania, zastąp ręcznie dla szyfrowania post-kwantowego",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Padding serwera",
|
||||||
|
"encryption_ticket": "Czas biletu",
|
||||||
"expireTime": "Czas wygaśnięcia",
|
"expireTime": "Czas wygaśnięcia",
|
||||||
"expired": "Wygasł",
|
"expired": "Wygasł",
|
||||||
|
"extra": "Dodatkowa konfiguracja",
|
||||||
"flow": "Przepływ",
|
"flow": "Przepływ",
|
||||||
"hop_interval": "Interwał skoku",
|
"hop_interval": "Interwał skoku",
|
||||||
"hop_ports": "Porty skoku",
|
"hop_ports": "Porty skoku",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Migracja danych nie powiodła się",
|
"migrateFailed": "Migracja danych nie powiodła się",
|
||||||
"migrated": "Dane zostały pomyślnie zmigrowane",
|
"migrated": "Dane zostały pomyślnie zmigrowane",
|
||||||
"migrating": "Migracja...",
|
"migrating": "Migracja...",
|
||||||
|
"mode": "Tryb",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Nazwa",
|
"name": "Nazwa",
|
||||||
"noData": "Brak danych",
|
"noData": "Brak danych",
|
||||||
"notAvailable": "N/D",
|
"notAvailable": "N/D",
|
||||||
|
"obfs": "Obfuskacja",
|
||||||
|
"obfs_host": "Host obfuskacji",
|
||||||
"obfs_password": "Hasło obfuskacji",
|
"obfs_password": "Hasło obfuskacji",
|
||||||
"obfs_password_placeholder": "Wprowadź hasło obfuskacji",
|
"obfs_password_placeholder": "Wprowadź hasło obfuskacji",
|
||||||
|
"obfs_path": "Ścieżka obfuskacji",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"online": "Online",
|
"online": "Online",
|
||||||
"onlineUsers": "Użytkownicy online",
|
"onlineUsers": "Użytkownicy online",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Serwery",
|
"pageTitle": "Serwery",
|
||||||
"path": "Ścieżka",
|
"path": "Ścieżka",
|
||||||
"please_select": "Proszę wybrać",
|
"please_select": "Proszę wybrać",
|
||||||
"plugin": "Konfiguracja wtyczki",
|
|
||||||
"plugin_opts": "Opcje wtyczki",
|
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"protocol_configurations": "Konfiguracje protokołów",
|
"protocol_configurations": "Konfiguracje protokołów",
|
||||||
"protocol_configurations_desc": "Włącz i skonfiguruj wymagane typy protokołów",
|
"protocol_configurations_desc": "Włącz i skonfiguruj wymagane typy protokołów",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Wybierz metodę szyfrowania",
|
"select_encryption_method": "Wybierz metodę szyfrowania",
|
||||||
"server_key": "Klucz serwera",
|
"server_key": "Klucz serwera",
|
||||||
"service_name": "Nazwa usługi",
|
"service_name": "Nazwa usługi",
|
||||||
|
"sorted_success": "Posortowano pomyślnie",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
"subscribeId": "ID subskrypcji",
|
"subscribeId": "ID subskrypcji",
|
||||||
"subscription": "Subskrypcja",
|
"subscription": "Subskrypcja",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Selecionar protocolo…",
|
"select_protocol": "Selecionar protocolo…",
|
||||||
"select_server": "Selecionar servidor…",
|
"select_server": "Selecionar servidor…",
|
||||||
"server": "Servidor",
|
"server": "Servidor",
|
||||||
|
"sorted_success": "Ordenado com sucesso",
|
||||||
"tags": "Tags",
|
"tags": "Tags",
|
||||||
"tags_description": "Tag de agrupamento de permissões (incl. vinculação de plano e políticas de entrega).",
|
"tags_description": "Tag de agrupamento de permissões (incl. vinculação de plano e políticas de entrega).",
|
||||||
"tags_placeholder": "Use Enter ou vírgula (,) para adicionar várias tags",
|
"tags_placeholder": "Use Enter ou vírgula (,) para adicionar várias tags",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Insira a largura de banda, deixe em branco para BBR",
|
"bandwidth_placeholder": "Insira a largura de banda, deixe em branco para BBR",
|
||||||
"basic": "Configuração Básica",
|
"basic": "Configuração Básica",
|
||||||
"cancel": "Cancelar",
|
"cancel": "Cancelar",
|
||||||
|
"cipher": "Algoritmo de Criptografia",
|
||||||
"city": "Cidade",
|
"city": "Cidade",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Editar Servidor",
|
"drawerEditTitle": "Editar Servidor",
|
||||||
"edit": "Editar",
|
"edit": "Editar",
|
||||||
"enabled": "Ativado",
|
"enabled": "Ativado",
|
||||||
"encryption_method": "Método de criptografia",
|
"encryption": "Método de Criptografia",
|
||||||
|
"encryption_client_padding": "Preenchimento do Cliente",
|
||||||
|
"encryption_mode": "Modo",
|
||||||
|
"encryption_password": "Senha",
|
||||||
|
"encryption_password_placeholder": "Deixe em branco para auto-geração, substitua manualmente para criptografia pós-quântica",
|
||||||
|
"encryption_private_key": "Chave Privada",
|
||||||
|
"encryption_private_key_placeholder": "Deixe em branco para auto-geração, substitua manualmente para criptografia pós-quântica",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Preenchimento do Servidor",
|
||||||
|
"encryption_ticket": "Tempo do Ticket",
|
||||||
"expireTime": "Tempo de expiração",
|
"expireTime": "Tempo de expiração",
|
||||||
"expired": "Expirado",
|
"expired": "Expirado",
|
||||||
|
"extra": "Configuração Extra",
|
||||||
"flow": "Fluxo",
|
"flow": "Fluxo",
|
||||||
"hop_interval": "Intervalo de salto",
|
"hop_interval": "Intervalo de salto",
|
||||||
"hop_ports": "Portas de salto",
|
"hop_ports": "Portas de salto",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "A migração de dados falhou",
|
"migrateFailed": "A migração de dados falhou",
|
||||||
"migrated": "Dados migrados com sucesso",
|
"migrated": "Dados migrados com sucesso",
|
||||||
"migrating": "Migrando...",
|
"migrating": "Migrando...",
|
||||||
|
"mode": "Modo",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Nome",
|
"name": "Nome",
|
||||||
"noData": "Sem dados",
|
"noData": "Sem dados",
|
||||||
"notAvailable": "N/D",
|
"notAvailable": "N/D",
|
||||||
|
"obfs": "Ofuscação",
|
||||||
|
"obfs_host": "Host de Ofuscação",
|
||||||
"obfs_password": "Senha de ofuscação",
|
"obfs_password": "Senha de ofuscação",
|
||||||
"obfs_password_placeholder": "Insira a senha de ofuscação",
|
"obfs_password_placeholder": "Insira a senha de ofuscação",
|
||||||
|
"obfs_path": "Caminho de Ofuscação",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"online": "Online",
|
"online": "Online",
|
||||||
"onlineUsers": "Usuários online",
|
"onlineUsers": "Usuários online",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Servidores",
|
"pageTitle": "Servidores",
|
||||||
"path": "Caminho",
|
"path": "Caminho",
|
||||||
"please_select": "Por favor, selecione",
|
"please_select": "Por favor, selecione",
|
||||||
"plugin": "Configuração do Plugin",
|
|
||||||
"plugin_opts": "Opções do Plugin",
|
|
||||||
"port": "Porta",
|
"port": "Porta",
|
||||||
"protocol_configurations": "Configurações de Protocolo",
|
"protocol_configurations": "Configurações de Protocolo",
|
||||||
"protocol_configurations_desc": "Ative e configure os tipos de protocolo necessários",
|
"protocol_configurations_desc": "Ative e configure os tipos de protocolo necessários",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Selecionar método de criptografia",
|
"select_encryption_method": "Selecionar método de criptografia",
|
||||||
"server_key": "Chave do servidor",
|
"server_key": "Chave do servidor",
|
||||||
"service_name": "Nome do serviço",
|
"service_name": "Nome do serviço",
|
||||||
|
"sorted_success": "Ordenado com sucesso",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
"subscribeId": "ID de assinatura",
|
"subscribeId": "ID de assinatura",
|
||||||
"subscription": "Assinatura",
|
"subscription": "Assinatura",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Selectează protocolul…",
|
"select_protocol": "Selectează protocolul…",
|
||||||
"select_server": "Selectează serverul…",
|
"select_server": "Selectează serverul…",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
|
"sorted_success": "Sortat cu succes",
|
||||||
"tags": "Etichete",
|
"tags": "Etichete",
|
||||||
"tags_description": "Etichetă de grupare a permisiunilor (incluzând legarea planului și politicile de livrare).",
|
"tags_description": "Etichetă de grupare a permisiunilor (incluzând legarea planului și politicile de livrare).",
|
||||||
"tags_placeholder": "Folosește Enter sau virgulă (,) pentru a adăuga mai multe etichete",
|
"tags_placeholder": "Folosește Enter sau virgulă (,) pentru a adăuga mai multe etichete",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Introduceți lățimea de bandă, lăsați liber pentru BBR",
|
"bandwidth_placeholder": "Introduceți lățimea de bandă, lăsați liber pentru BBR",
|
||||||
"basic": "Configurare de bază",
|
"basic": "Configurare de bază",
|
||||||
"cancel": "Anulează",
|
"cancel": "Anulează",
|
||||||
|
"cipher": "Algoritm de criptare",
|
||||||
"city": "Oraș",
|
"city": "Oraș",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Editează Server",
|
"drawerEditTitle": "Editează Server",
|
||||||
"edit": "Editează",
|
"edit": "Editează",
|
||||||
"enabled": "Activat",
|
"enabled": "Activat",
|
||||||
"encryption_method": "Metodă de criptare",
|
"encryption": "Metodă de criptare",
|
||||||
|
"encryption_client_padding": "Padding client",
|
||||||
|
"encryption_mode": "Mod",
|
||||||
|
"encryption_password": "Parolă",
|
||||||
|
"encryption_password_placeholder": "Lăsați gol pentru generare automată, înlocuiți manual pentru criptare post-cuantică",
|
||||||
|
"encryption_private_key": "Cheie privată",
|
||||||
|
"encryption_private_key_placeholder": "Lăsați gol pentru generare automată, înlocuiți manual pentru criptare post-cuantică",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Padding server",
|
||||||
|
"encryption_ticket": "Timp bilet",
|
||||||
"expireTime": "Timp de expirare",
|
"expireTime": "Timp de expirare",
|
||||||
"expired": "Expirat",
|
"expired": "Expirat",
|
||||||
|
"extra": "Configurație suplimentară",
|
||||||
"flow": "Flux",
|
"flow": "Flux",
|
||||||
"hop_interval": "Interval de hop",
|
"hop_interval": "Interval de hop",
|
||||||
"hop_ports": "Porturi hop",
|
"hop_ports": "Porturi hop",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Migrarea datelor a eșuat",
|
"migrateFailed": "Migrarea datelor a eșuat",
|
||||||
"migrated": "Datele au fost migrate cu succes",
|
"migrated": "Datele au fost migrate cu succes",
|
||||||
"migrating": "Se migrează...",
|
"migrating": "Se migrează...",
|
||||||
|
"mode": "Mod",
|
||||||
"multiplex": "Multiplex",
|
"multiplex": "Multiplex",
|
||||||
"name": "Nume",
|
"name": "Nume",
|
||||||
"noData": "Fără date",
|
"noData": "Fără date",
|
||||||
"notAvailable": "N/A",
|
"notAvailable": "N/A",
|
||||||
|
"obfs": "Obfuscare",
|
||||||
|
"obfs_host": "Host Obfs",
|
||||||
"obfs_password": "Parola de obfuscare",
|
"obfs_password": "Parola de obfuscare",
|
||||||
"obfs_password_placeholder": "Introdu parola de obfuscare",
|
"obfs_password_placeholder": "Introdu parola de obfuscare",
|
||||||
|
"obfs_path": "Cale Obfs",
|
||||||
"offline": "Offline",
|
"offline": "Offline",
|
||||||
"online": "Online",
|
"online": "Online",
|
||||||
"onlineUsers": "Utilizatori online",
|
"onlineUsers": "Utilizatori online",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Servere",
|
"pageTitle": "Servere",
|
||||||
"path": "Cale",
|
"path": "Cale",
|
||||||
"please_select": "Te rog selectează",
|
"please_select": "Te rog selectează",
|
||||||
"plugin": "Configurare plugin",
|
|
||||||
"plugin_opts": "Opțiuni plugin",
|
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"protocol_configurations": "Configurări protocol",
|
"protocol_configurations": "Configurări protocol",
|
||||||
"protocol_configurations_desc": "Activează și configurează tipurile de protocol necesare",
|
"protocol_configurations_desc": "Activează și configurează tipurile de protocol necesare",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Selectează metoda de criptare",
|
"select_encryption_method": "Selectează metoda de criptare",
|
||||||
"server_key": "Cheie server",
|
"server_key": "Cheie server",
|
||||||
"service_name": "Nume serviciu",
|
"service_name": "Nume serviciu",
|
||||||
|
"sorted_success": "Sortat cu succes",
|
||||||
"status": "Stare",
|
"status": "Stare",
|
||||||
"subscribeId": "ID abonament",
|
"subscribeId": "ID abonament",
|
||||||
"subscription": "Abonament",
|
"subscription": "Abonament",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Выберите протокол…",
|
"select_protocol": "Выберите протокол…",
|
||||||
"select_server": "Выберите сервер…",
|
"select_server": "Выберите сервер…",
|
||||||
"server": "Сервер",
|
"server": "Сервер",
|
||||||
|
"sorted_success": "Успешно отсортировано",
|
||||||
"tags": "Теги",
|
"tags": "Теги",
|
||||||
"tags_description": "Тег для группировки разрешений (включая привязку плана и политики доставки).",
|
"tags_description": "Тег для группировки разрешений (включая привязку плана и политики доставки).",
|
||||||
"tags_placeholder": "Используйте Enter или запятую (,) для добавления нескольких тегов",
|
"tags_placeholder": "Используйте Enter или запятую (,) для добавления нескольких тегов",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Введите пропускную способность, оставьте пустым для BBR",
|
"bandwidth_placeholder": "Введите пропускную способность, оставьте пустым для BBR",
|
||||||
"basic": "Базовая конфигурация",
|
"basic": "Базовая конфигурация",
|
||||||
"cancel": "Отмена",
|
"cancel": "Отмена",
|
||||||
|
"cipher": "Алгоритм шифрования",
|
||||||
"city": "Город",
|
"city": "Город",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Редактировать сервер",
|
"drawerEditTitle": "Редактировать сервер",
|
||||||
"edit": "Редактировать",
|
"edit": "Редактировать",
|
||||||
"enabled": "Включено",
|
"enabled": "Включено",
|
||||||
"encryption_method": "Метод шифрования",
|
"encryption": "Метод шифрования",
|
||||||
|
"encryption_client_padding": "Дополнение клиента",
|
||||||
|
"encryption_mode": "Режим",
|
||||||
|
"encryption_password": "Пароль",
|
||||||
|
"encryption_password_placeholder": "Оставьте пустым для авто-генерации, замените вручную для пост-квантового шифрования",
|
||||||
|
"encryption_private_key": "Закрытый ключ",
|
||||||
|
"encryption_private_key_placeholder": "Оставьте пустым для авто-генерации, замените вручную для пост-квантового шифрования",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Дополнение сервера",
|
||||||
|
"encryption_ticket": "Время билета",
|
||||||
"expireTime": "Время истечения",
|
"expireTime": "Время истечения",
|
||||||
"expired": "Истекло",
|
"expired": "Истекло",
|
||||||
|
"extra": "Дополнительная конфигурация",
|
||||||
"flow": "Поток",
|
"flow": "Поток",
|
||||||
"hop_interval": "Интервал перехода",
|
"hop_interval": "Интервал перехода",
|
||||||
"hop_ports": "Порты перехода",
|
"hop_ports": "Порты перехода",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Ошибка при переносе данных",
|
"migrateFailed": "Ошибка при переносе данных",
|
||||||
"migrated": "Данные успешно перенесены",
|
"migrated": "Данные успешно перенесены",
|
||||||
"migrating": "Перенос данных...",
|
"migrating": "Перенос данных...",
|
||||||
|
"mode": "Режим",
|
||||||
"multiplex": "Мультиплекс",
|
"multiplex": "Мультиплекс",
|
||||||
"name": "Имя",
|
"name": "Имя",
|
||||||
"noData": "Нет данных",
|
"noData": "Нет данных",
|
||||||
"notAvailable": "Недоступно",
|
"notAvailable": "Недоступно",
|
||||||
|
"obfs": "Обфускация",
|
||||||
|
"obfs_host": "Обфусцированный хост",
|
||||||
"obfs_password": "Пароль обфускации",
|
"obfs_password": "Пароль обфускации",
|
||||||
"obfs_password_placeholder": "Введите пароль обфускации",
|
"obfs_password_placeholder": "Введите пароль обфускации",
|
||||||
|
"obfs_path": "Обфусцированный путь",
|
||||||
"offline": "Офлайн",
|
"offline": "Офлайн",
|
||||||
"online": "Онлайн",
|
"online": "Онлайн",
|
||||||
"onlineUsers": "Онлайн пользователи",
|
"onlineUsers": "Онлайн пользователи",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Серверы",
|
"pageTitle": "Серверы",
|
||||||
"path": "Путь",
|
"path": "Путь",
|
||||||
"please_select": "Пожалуйста, выберите",
|
"please_select": "Пожалуйста, выберите",
|
||||||
"plugin": "Конфигурация плагина",
|
|
||||||
"plugin_opts": "Опции плагина",
|
|
||||||
"port": "Порт",
|
"port": "Порт",
|
||||||
"protocol_configurations": "Конфигурации протоколов",
|
"protocol_configurations": "Конфигурации протоколов",
|
||||||
"protocol_configurations_desc": "Включите и настройте необходимые типы протоколов",
|
"protocol_configurations_desc": "Включите и настройте необходимые типы протоколов",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Выберите метод шифрования",
|
"select_encryption_method": "Выберите метод шифрования",
|
||||||
"server_key": "Ключ сервера",
|
"server_key": "Ключ сервера",
|
||||||
"service_name": "Имя службы",
|
"service_name": "Имя службы",
|
||||||
|
"sorted_success": "Успешно отсортировано",
|
||||||
"status": "Статус",
|
"status": "Статус",
|
||||||
"subscribeId": "ID подписки",
|
"subscribeId": "ID подписки",
|
||||||
"subscription": "Подписка",
|
"subscription": "Подписка",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "เลือกโปรโตคอล…",
|
"select_protocol": "เลือกโปรโตคอล…",
|
||||||
"select_server": "เลือกเซิร์ฟเวอร์…",
|
"select_server": "เลือกเซิร์ฟเวอร์…",
|
||||||
"server": "เซิร์ฟเวอร์",
|
"server": "เซิร์ฟเวอร์",
|
||||||
|
"sorted_success": "เรียงลำดับเรียบร้อยแล้ว",
|
||||||
"tags": "แท็ก",
|
"tags": "แท็ก",
|
||||||
"tags_description": "แท็กการจัดกลุ่มสิทธิ์ (รวมถึงการผูกแผนและนโยบายการจัดส่ง)",
|
"tags_description": "แท็กการจัดกลุ่มสิทธิ์ (รวมถึงการผูกแผนและนโยบายการจัดส่ง)",
|
||||||
"tags_placeholder": "ใช้ Enter หรือเครื่องหมายจุลภาค (,) เพื่อเพิ่มแท็กหลายรายการ",
|
"tags_placeholder": "ใช้ Enter หรือเครื่องหมายจุลภาค (,) เพื่อเพิ่มแท็กหลายรายการ",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "กรุณากรอกแบนด์วิธ ทิ้งว่างไว้สำหรับ BBR",
|
"bandwidth_placeholder": "กรุณากรอกแบนด์วิธ ทิ้งว่างไว้สำหรับ BBR",
|
||||||
"basic": "การตั้งค่าพื้นฐาน",
|
"basic": "การตั้งค่าพื้นฐาน",
|
||||||
"cancel": "ยกเลิก",
|
"cancel": "ยกเลิก",
|
||||||
|
"cipher": "อัลกอริธึมการเข้ารหัส",
|
||||||
"city": "เมือง",
|
"city": "เมือง",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "แก้ไขเซิร์ฟเวอร์",
|
"drawerEditTitle": "แก้ไขเซิร์ฟเวอร์",
|
||||||
"edit": "แก้ไข",
|
"edit": "แก้ไข",
|
||||||
"enabled": "เปิดใช้งาน",
|
"enabled": "เปิดใช้งาน",
|
||||||
"encryption_method": "วิธีการเข้ารหัส",
|
"encryption": "วิธีการเข้ารหัส",
|
||||||
|
"encryption_client_padding": "การเติมข้อมูลของลูกค้า",
|
||||||
|
"encryption_mode": "โหมด",
|
||||||
|
"encryption_password": "รหัสผ่าน",
|
||||||
|
"encryption_password_placeholder": "ปล่อยว่างเพื่อสร้างอัตโนมัติ เปลี่ยนด้วยตนเองสำหรับการเข้ารหัสหลังควอนตัม",
|
||||||
|
"encryption_private_key": "กุญแจส่วนตัว",
|
||||||
|
"encryption_private_key_placeholder": "ปล่อยว่างเพื่อสร้างอัตโนมัติ เปลี่ยนด้วยตนเองสำหรับการเข้ารหัสหลังควอนตัม",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "การเติมข้อมูลของเซิร์ฟเวอร์",
|
||||||
|
"encryption_ticket": "เวลาตั๋ว",
|
||||||
"expireTime": "เวลาหมดอายุ",
|
"expireTime": "เวลาหมดอายุ",
|
||||||
"expired": "หมดอายุ",
|
"expired": "หมดอายุ",
|
||||||
|
"extra": "การกำหนดค่าพิเศษ",
|
||||||
"flow": "การไหล",
|
"flow": "การไหล",
|
||||||
"hop_interval": "ช่วงเวลาการกระโดด",
|
"hop_interval": "ช่วงเวลาการกระโดด",
|
||||||
"hop_ports": "พอร์ตการกระโดด",
|
"hop_ports": "พอร์ตการกระโดด",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "การย้ายข้อมูลล้มเหลว",
|
"migrateFailed": "การย้ายข้อมูลล้มเหลว",
|
||||||
"migrated": "ย้ายข้อมูลสำเร็จ",
|
"migrated": "ย้ายข้อมูลสำเร็จ",
|
||||||
"migrating": "กำลังย้ายข้อมูล...",
|
"migrating": "กำลังย้ายข้อมูล...",
|
||||||
|
"mode": "โหมด",
|
||||||
"multiplex": "หลายช่อง",
|
"multiplex": "หลายช่อง",
|
||||||
"name": "ชื่อ",
|
"name": "ชื่อ",
|
||||||
"noData": "ไม่มีข้อมูล",
|
"noData": "ไม่มีข้อมูล",
|
||||||
"notAvailable": "ไม่สามารถใช้ได้",
|
"notAvailable": "ไม่สามารถใช้ได้",
|
||||||
|
"obfs": "การทำให้ไม่สามารถอ่านได้",
|
||||||
|
"obfs_host": "โฮสต์การทำให้ไม่สามารถอ่านได้",
|
||||||
"obfs_password": "รหัสผ่านการปกปิด",
|
"obfs_password": "รหัสผ่านการปกปิด",
|
||||||
"obfs_password_placeholder": "กรอกรหัสผ่านการปกปิด",
|
"obfs_password_placeholder": "กรอกรหัสผ่านการปกปิด",
|
||||||
|
"obfs_path": "เส้นทางการทำให้ไม่สามารถอ่านได้",
|
||||||
"offline": "ออฟไลน์",
|
"offline": "ออฟไลน์",
|
||||||
"online": "ออนไลน์",
|
"online": "ออนไลน์",
|
||||||
"onlineUsers": "ผู้ใช้งานออนไลน์",
|
"onlineUsers": "ผู้ใช้งานออนไลน์",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "เซิร์ฟเวอร์",
|
"pageTitle": "เซิร์ฟเวอร์",
|
||||||
"path": "เส้นทาง",
|
"path": "เส้นทาง",
|
||||||
"please_select": "กรุณาเลือก",
|
"please_select": "กรุณาเลือก",
|
||||||
"plugin": "การตั้งค่าปลั๊กอิน",
|
|
||||||
"plugin_opts": "ตัวเลือกปลั๊กอิน",
|
|
||||||
"port": "พอร์ต",
|
"port": "พอร์ต",
|
||||||
"protocol_configurations": "การตั้งค่าโปรโตคอล",
|
"protocol_configurations": "การตั้งค่าโปรโตคอล",
|
||||||
"protocol_configurations_desc": "เปิดใช้งานและกำหนดค่าประเภทโปรโตคอลที่ต้องการ",
|
"protocol_configurations_desc": "เปิดใช้งานและกำหนดค่าประเภทโปรโตคอลที่ต้องการ",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "เลือกวิธีการเข้ารหัส",
|
"select_encryption_method": "เลือกวิธีการเข้ารหัส",
|
||||||
"server_key": "คีย์เซิร์ฟเวอร์",
|
"server_key": "คีย์เซิร์ฟเวอร์",
|
||||||
"service_name": "ชื่อบริการ",
|
"service_name": "ชื่อบริการ",
|
||||||
|
"sorted_success": "เรียงลำดับเรียบร้อยแล้ว",
|
||||||
"status": "สถานะ",
|
"status": "สถานะ",
|
||||||
"subscribeId": "ID การสมัครสมาชิก",
|
"subscribeId": "ID การสมัครสมาชิก",
|
||||||
"subscription": "การสมัครสมาชิก",
|
"subscription": "การสมัครสมาชิก",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Protokol seçin…",
|
"select_protocol": "Protokol seçin…",
|
||||||
"select_server": "Sunucu seçin…",
|
"select_server": "Sunucu seçin…",
|
||||||
"server": "Sunucu",
|
"server": "Sunucu",
|
||||||
|
"sorted_success": "Başarıyla sıralandı",
|
||||||
"tags": "Etiketler",
|
"tags": "Etiketler",
|
||||||
"tags_description": "İzin gruplama etiketi (plan bağlama ve teslimat politikaları dahil).",
|
"tags_description": "İzin gruplama etiketi (plan bağlama ve teslimat politikaları dahil).",
|
||||||
"tags_placeholder": "Birden fazla etiket eklemek için Enter veya virgül (,) kullanın",
|
"tags_placeholder": "Birden fazla etiket eklemek için Enter veya virgül (,) kullanın",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Bant genişliğini girin, BBR için boş bırakın",
|
"bandwidth_placeholder": "Bant genişliğini girin, BBR için boş bırakın",
|
||||||
"basic": "Temel Yapılandırma",
|
"basic": "Temel Yapılandırma",
|
||||||
"cancel": "İptal",
|
"cancel": "İptal",
|
||||||
|
"cipher": "Şifreleme Algoritması",
|
||||||
"city": "Şehir",
|
"city": "Şehir",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Sunucuyu Düzenle",
|
"drawerEditTitle": "Sunucuyu Düzenle",
|
||||||
"edit": "Düzenle",
|
"edit": "Düzenle",
|
||||||
"enabled": "Etkin",
|
"enabled": "Etkin",
|
||||||
"encryption_method": "Şifreleme yöntemi",
|
"encryption": "Şifreleme Yöntemi",
|
||||||
|
"encryption_client_padding": "İstemci Dolgusu",
|
||||||
|
"encryption_mode": "Mod",
|
||||||
|
"encryption_password": "Şifre",
|
||||||
|
"encryption_password_placeholder": "Otomatik oluşturma için boş bırakın, post-kuantum şifreleme için manuel olarak değiştirin",
|
||||||
|
"encryption_private_key": "Özel Anahtar",
|
||||||
|
"encryption_private_key_placeholder": "Otomatik oluşturma için boş bırakın, post-kuantum şifreleme için manuel olarak değiştirin",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Sunucu Dolgusu",
|
||||||
|
"encryption_ticket": "Bilet süresi",
|
||||||
"expireTime": "Son kullanma zamanı",
|
"expireTime": "Son kullanma zamanı",
|
||||||
"expired": "Süresi dolmuş",
|
"expired": "Süresi dolmuş",
|
||||||
|
"extra": "Ek Yapılandırma",
|
||||||
"flow": "Akış",
|
"flow": "Akış",
|
||||||
"hop_interval": "Atlama aralığı",
|
"hop_interval": "Atlama aralığı",
|
||||||
"hop_ports": "Atlama portları",
|
"hop_ports": "Atlama portları",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Veri taşıma işlemi başarısız oldu",
|
"migrateFailed": "Veri taşıma işlemi başarısız oldu",
|
||||||
"migrated": "Veri başarıyla taşındı",
|
"migrated": "Veri başarıyla taşındı",
|
||||||
"migrating": "Taşınıyor...",
|
"migrating": "Taşınıyor...",
|
||||||
|
"mode": "Mod",
|
||||||
"multiplex": "Çoklu Salon",
|
"multiplex": "Çoklu Salon",
|
||||||
"name": "İsim",
|
"name": "İsim",
|
||||||
"noData": "Veri yok",
|
"noData": "Veri yok",
|
||||||
"notAvailable": "Mevcut değil",
|
"notAvailable": "Mevcut değil",
|
||||||
|
"obfs": "Obfuscation",
|
||||||
|
"obfs_host": "Obfs Ana Bilgisi",
|
||||||
"obfs_password": "Gizleme şifresi",
|
"obfs_password": "Gizleme şifresi",
|
||||||
"obfs_password_placeholder": "Gizleme şifresini girin",
|
"obfs_password_placeholder": "Gizleme şifresini girin",
|
||||||
|
"obfs_path": "Obfs Yolu",
|
||||||
"offline": "Çevrimdışı",
|
"offline": "Çevrimdışı",
|
||||||
"online": "Çevrimiçi",
|
"online": "Çevrimiçi",
|
||||||
"onlineUsers": "Çevrimiçi kullanıcılar",
|
"onlineUsers": "Çevrimiçi kullanıcılar",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Sunucular",
|
"pageTitle": "Sunucular",
|
||||||
"path": "Yol",
|
"path": "Yol",
|
||||||
"please_select": "Lütfen seçin",
|
"please_select": "Lütfen seçin",
|
||||||
"plugin": "Eklenti Yapılandırması",
|
|
||||||
"plugin_opts": "Eklenti Seçenekleri",
|
|
||||||
"port": "Port",
|
"port": "Port",
|
||||||
"protocol_configurations": "Protokol Yapılandırmaları",
|
"protocol_configurations": "Protokol Yapılandırmaları",
|
||||||
"protocol_configurations_desc": "Gerekli protokol türlerini etkinleştir ve yapılandır",
|
"protocol_configurations_desc": "Gerekli protokol türlerini etkinleştir ve yapılandır",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Şifreleme yöntemini seçin",
|
"select_encryption_method": "Şifreleme yöntemini seçin",
|
||||||
"server_key": "Sunucu anahtarı",
|
"server_key": "Sunucu anahtarı",
|
||||||
"service_name": "Hizmet adı",
|
"service_name": "Hizmet adı",
|
||||||
|
"sorted_success": "Başarıyla sıralandı",
|
||||||
"status": "Durum",
|
"status": "Durum",
|
||||||
"subscribeId": "Abonelik ID",
|
"subscribeId": "Abonelik ID",
|
||||||
"subscription": "Abonelik",
|
"subscription": "Abonelik",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Виберіть протокол…",
|
"select_protocol": "Виберіть протокол…",
|
||||||
"select_server": "Виберіть сервер…",
|
"select_server": "Виберіть сервер…",
|
||||||
"server": "Сервер",
|
"server": "Сервер",
|
||||||
|
"sorted_success": "Успішно відсортовано",
|
||||||
"tags": "Теги",
|
"tags": "Теги",
|
||||||
"tags_description": "Тег для групування дозволів (включаючи прив'язку плану та політики доставки).",
|
"tags_description": "Тег для групування дозволів (включаючи прив'язку плану та політики доставки).",
|
||||||
"tags_placeholder": "Використовуйте Enter або кому (,) для додавання кількох тегів",
|
"tags_placeholder": "Використовуйте Enter або кому (,) для додавання кількох тегів",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Введіть пропускну здатність, залиште порожнім для BBR",
|
"bandwidth_placeholder": "Введіть пропускну здатність, залиште порожнім для BBR",
|
||||||
"basic": "Базова конфігурація",
|
"basic": "Базова конфігурація",
|
||||||
"cancel": "Скасувати",
|
"cancel": "Скасувати",
|
||||||
|
"cipher": "Алгоритм шифрування",
|
||||||
"city": "Місто",
|
"city": "Місто",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Редагувати сервер",
|
"drawerEditTitle": "Редагувати сервер",
|
||||||
"edit": "Редагувати",
|
"edit": "Редагувати",
|
||||||
"enabled": "Увімкнено",
|
"enabled": "Увімкнено",
|
||||||
"encryption_method": "Метод шифрування",
|
"encryption": "Метод шифрування",
|
||||||
|
"encryption_client_padding": "Паддінг клієнта",
|
||||||
|
"encryption_mode": "Режим",
|
||||||
|
"encryption_password": "Пароль",
|
||||||
|
"encryption_password_placeholder": "Залиште порожнім для автоматичної генерації, замініть вручну для пост-квантового шифрування",
|
||||||
|
"encryption_private_key": "Приватний ключ",
|
||||||
|
"encryption_private_key_placeholder": "Залиште порожнім для автоматичної генерації, замініть вручну для пост-квантового шифрування",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "Паддінг сервера",
|
||||||
|
"encryption_ticket": "Час квитка",
|
||||||
"expireTime": "Час закінчення",
|
"expireTime": "Час закінчення",
|
||||||
"expired": "Термін дії закінчився",
|
"expired": "Термін дії закінчився",
|
||||||
|
"extra": "Додаткова конфігурація",
|
||||||
"flow": "Потік",
|
"flow": "Потік",
|
||||||
"hop_interval": "Інтервал стрибка",
|
"hop_interval": "Інтервал стрибка",
|
||||||
"hop_ports": "Порти стрибка",
|
"hop_ports": "Порти стрибка",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Міграція даних не вдалася",
|
"migrateFailed": "Міграція даних не вдалася",
|
||||||
"migrated": "Дані успішно мігрували",
|
"migrated": "Дані успішно мігрували",
|
||||||
"migrating": "Міграція...",
|
"migrating": "Міграція...",
|
||||||
|
"mode": "Режим",
|
||||||
"multiplex": "Мультиплекс",
|
"multiplex": "Мультиплекс",
|
||||||
"name": "Ім'я",
|
"name": "Ім'я",
|
||||||
"noData": "Немає даних",
|
"noData": "Немає даних",
|
||||||
"notAvailable": "Н/Д",
|
"notAvailable": "Н/Д",
|
||||||
|
"obfs": "Обфускація",
|
||||||
|
"obfs_host": "Обфускаційний хост",
|
||||||
"obfs_password": "Пароль обфускації",
|
"obfs_password": "Пароль обфускації",
|
||||||
"obfs_password_placeholder": "Введіть пароль обфускації",
|
"obfs_password_placeholder": "Введіть пароль обфускації",
|
||||||
|
"obfs_path": "Обфускаційний шлях",
|
||||||
"offline": "Офлайн",
|
"offline": "Офлайн",
|
||||||
"online": "Онлайн",
|
"online": "Онлайн",
|
||||||
"onlineUsers": "Онлайн користувачі",
|
"onlineUsers": "Онлайн користувачі",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Сервери",
|
"pageTitle": "Сервери",
|
||||||
"path": "Шлях",
|
"path": "Шлях",
|
||||||
"please_select": "Будь ласка, виберіть",
|
"please_select": "Будь ласка, виберіть",
|
||||||
"plugin": "Конфігурація плагіна",
|
|
||||||
"plugin_opts": "Опції плагіна",
|
|
||||||
"port": "Порт",
|
"port": "Порт",
|
||||||
"protocol_configurations": "Конфігурації протоколів",
|
"protocol_configurations": "Конфігурації протоколів",
|
||||||
"protocol_configurations_desc": "Увімкніть та налаштуйте необхідні типи протоколів",
|
"protocol_configurations_desc": "Увімкніть та налаштуйте необхідні типи протоколів",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Виберіть метод шифрування",
|
"select_encryption_method": "Виберіть метод шифрування",
|
||||||
"server_key": "Ключ сервера",
|
"server_key": "Ключ сервера",
|
||||||
"service_name": "Назва служби",
|
"service_name": "Назва служби",
|
||||||
|
"sorted_success": "Успішно відсортовано",
|
||||||
"status": "Статус",
|
"status": "Статус",
|
||||||
"subscribeId": "ID підписки",
|
"subscribeId": "ID підписки",
|
||||||
"subscription": "Підписка",
|
"subscription": "Підписка",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "Chọn giao thức…",
|
"select_protocol": "Chọn giao thức…",
|
||||||
"select_server": "Chọn máy chủ…",
|
"select_server": "Chọn máy chủ…",
|
||||||
"server": "Máy chủ",
|
"server": "Máy chủ",
|
||||||
|
"sorted_success": "Sắp xếp thành công",
|
||||||
"tags": "Thẻ",
|
"tags": "Thẻ",
|
||||||
"tags_description": "Thẻ nhóm quyền (bao gồm ràng buộc kế hoạch và chính sách giao hàng).",
|
"tags_description": "Thẻ nhóm quyền (bao gồm ràng buộc kế hoạch và chính sách giao hàng).",
|
||||||
"tags_placeholder": "Sử dụng Enter hoặc dấu phẩy (,) để thêm nhiều thẻ",
|
"tags_placeholder": "Sử dụng Enter hoặc dấu phẩy (,) để thêm nhiều thẻ",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "Nhập băng thông, để trống cho BBR",
|
"bandwidth_placeholder": "Nhập băng thông, để trống cho BBR",
|
||||||
"basic": "Cấu Hình Cơ Bản",
|
"basic": "Cấu Hình Cơ Bản",
|
||||||
"cancel": "Hủy",
|
"cancel": "Hủy",
|
||||||
|
"cipher": "Thuật toán Mã hóa",
|
||||||
"city": "Thành phố",
|
"city": "Thành phố",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "Chỉnh sửa Máy chủ",
|
"drawerEditTitle": "Chỉnh sửa Máy chủ",
|
||||||
"edit": "Chỉnh sửa",
|
"edit": "Chỉnh sửa",
|
||||||
"enabled": "Đã bật",
|
"enabled": "Đã bật",
|
||||||
"encryption_method": "Phương pháp mã hóa",
|
"encryption": "Phương pháp Mã hóa",
|
||||||
|
"encryption_client_padding": "B padding của Client",
|
||||||
|
"encryption_mode": "Chế độ",
|
||||||
|
"encryption_password": "Mật khẩu",
|
||||||
|
"encryption_password_placeholder": "Để trống để tự động tạo, thay thế thủ công cho mã hóa sau lượng tử",
|
||||||
|
"encryption_private_key": "Khóa riêng",
|
||||||
|
"encryption_private_key_placeholder": "Để trống để tự động tạo, thay thế thủ công cho mã hóa sau lượng tử",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "B padding của Server",
|
||||||
|
"encryption_ticket": "Thời gian vé",
|
||||||
"expireTime": "Thời gian hết hạn",
|
"expireTime": "Thời gian hết hạn",
|
||||||
"expired": "Đã hết hạn",
|
"expired": "Đã hết hạn",
|
||||||
|
"extra": "Cấu hình thêm",
|
||||||
"flow": "Lưu lượng",
|
"flow": "Lưu lượng",
|
||||||
"hop_interval": "Khoảng thời gian nhảy",
|
"hop_interval": "Khoảng thời gian nhảy",
|
||||||
"hop_ports": "Cổng nhảy",
|
"hop_ports": "Cổng nhảy",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "Di chuyển dữ liệu thất bại",
|
"migrateFailed": "Di chuyển dữ liệu thất bại",
|
||||||
"migrated": "Dữ liệu đã được di chuyển thành công",
|
"migrated": "Dữ liệu đã được di chuyển thành công",
|
||||||
"migrating": "Đang di chuyển...",
|
"migrating": "Đang di chuyển...",
|
||||||
|
"mode": "Chế độ",
|
||||||
"multiplex": "Rạp chiếu phim",
|
"multiplex": "Rạp chiếu phim",
|
||||||
"name": "Tên",
|
"name": "Tên",
|
||||||
"noData": "Không có dữ liệu",
|
"noData": "Không có dữ liệu",
|
||||||
"notAvailable": "Không khả dụng",
|
"notAvailable": "Không khả dụng",
|
||||||
|
"obfs": "Làm mờ",
|
||||||
|
"obfs_host": "Máy chủ Obfs",
|
||||||
"obfs_password": "Mật khẩu làm mờ",
|
"obfs_password": "Mật khẩu làm mờ",
|
||||||
"obfs_password_placeholder": "Nhập mật khẩu làm mờ",
|
"obfs_password_placeholder": "Nhập mật khẩu làm mờ",
|
||||||
|
"obfs_path": "Đường dẫn Obfs",
|
||||||
"offline": "Ngoại tuyến",
|
"offline": "Ngoại tuyến",
|
||||||
"online": "Trực tuyến",
|
"online": "Trực tuyến",
|
||||||
"onlineUsers": "Người dùng trực tuyến",
|
"onlineUsers": "Người dùng trực tuyến",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "Máy chủ",
|
"pageTitle": "Máy chủ",
|
||||||
"path": "Đường dẫn",
|
"path": "Đường dẫn",
|
||||||
"please_select": "Vui lòng chọn",
|
"please_select": "Vui lòng chọn",
|
||||||
"plugin": "Cấu Hình Plugin",
|
|
||||||
"plugin_opts": "Tùy Chọn Plugin",
|
|
||||||
"port": "Cổng",
|
"port": "Cổng",
|
||||||
"protocol_configurations": "Cấu Hình Giao Thức",
|
"protocol_configurations": "Cấu Hình Giao Thức",
|
||||||
"protocol_configurations_desc": "Kích hoạt và cấu hình các loại giao thức cần thiết",
|
"protocol_configurations_desc": "Kích hoạt và cấu hình các loại giao thức cần thiết",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "Chọn phương pháp mã hóa",
|
"select_encryption_method": "Chọn phương pháp mã hóa",
|
||||||
"server_key": "Khóa máy chủ",
|
"server_key": "Khóa máy chủ",
|
||||||
"service_name": "Tên dịch vụ",
|
"service_name": "Tên dịch vụ",
|
||||||
|
"sorted_success": "Sắp xếp thành công",
|
||||||
"status": "Trạng thái",
|
"status": "Trạng thái",
|
||||||
"subscribeId": "ID đăng ký",
|
"subscribeId": "ID đăng ký",
|
||||||
"subscription": "Đăng ký",
|
"subscription": "Đăng ký",
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
"enabled_on": "已启用",
|
"enabled_on": "已启用",
|
||||||
"errors": {
|
"errors": {
|
||||||
"nameRequired": "请输入名称",
|
"nameRequired": "请输入名称",
|
||||||
"serverRequired": "请选择服务器",
|
"portRange": "端口范围 1–65535",
|
||||||
"serverAddrRequired": "请输入入口地址",
|
|
||||||
"protocolRequired": "请选择协议",
|
"protocolRequired": "请选择协议",
|
||||||
"portRange": "端口范围 1–65535"
|
"serverAddrRequired": "请输入入口地址",
|
||||||
|
"serverRequired": "请选择服务器"
|
||||||
},
|
},
|
||||||
"name": "名称",
|
"name": "名称",
|
||||||
"pageTitle": "节点管理",
|
"pageTitle": "节点管理",
|
||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "选择协议…",
|
"select_protocol": "选择协议…",
|
||||||
"select_server": "选择服务器…",
|
"select_server": "选择服务器…",
|
||||||
"server": "服务器",
|
"server": "服务器",
|
||||||
|
"sorted_success": "排序成功",
|
||||||
"tags": "标签",
|
"tags": "标签",
|
||||||
"tags_description": "用于权限分组标识(含套餐绑定、策略下发)。",
|
"tags_description": "用于权限分组标识(含套餐绑定、策略下发)。",
|
||||||
"tags_placeholder": "使用回车或逗号(,)输入多个标签",
|
"tags_placeholder": "使用回车或逗号(,)输入多个标签",
|
||||||
|
|||||||
@@ -4,30 +4,31 @@
|
|||||||
"bandwidth_placeholder": "请输入带宽,留空则使用BBR",
|
"bandwidth_placeholder": "请输入带宽,留空则使用BBR",
|
||||||
"basic": "基础配置",
|
"basic": "基础配置",
|
||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
|
"cipher": "加密算法",
|
||||||
"city": "城市",
|
"city": "城市",
|
||||||
"config": {
|
"config": {
|
||||||
"title": "节点配置",
|
"actions": {
|
||||||
"description": "管理节点通信密钥、拉取/推送间隔与动态倍率。",
|
"cancel": "取消",
|
||||||
"saveSuccess": "保存成功",
|
"save": "保存"
|
||||||
|
},
|
||||||
"communicationKey": "通信密钥",
|
"communicationKey": "通信密钥",
|
||||||
"inputPlaceholder": "请输入",
|
|
||||||
"communicationKeyDescription": "用于节点鉴权。",
|
"communicationKeyDescription": "用于节点鉴权。",
|
||||||
|
"description": "管理节点通信密钥、拉取/推送间隔与动态倍率。",
|
||||||
|
"dynamicMultiplier": "动态倍率",
|
||||||
|
"dynamicMultiplierDescription": "按时间段设置倍率,用于调节流量或计费。",
|
||||||
|
"endTime": "结束时间",
|
||||||
|
"inputPlaceholder": "请输入",
|
||||||
|
"multiplier": "倍率",
|
||||||
"nodePullInterval": "节点拉取间隔",
|
"nodePullInterval": "节点拉取间隔",
|
||||||
"nodePullIntervalDescription": "节点拉取配置的频率(秒)。",
|
"nodePullIntervalDescription": "节点拉取配置的频率(秒)。",
|
||||||
"nodePushInterval": "节点推送间隔",
|
"nodePushInterval": "节点推送间隔",
|
||||||
"nodePushIntervalDescription": "节点上报状态的频率(秒)。",
|
"nodePushIntervalDescription": "节点上报状态的频率(秒)。",
|
||||||
"dynamicMultiplier": "动态倍率",
|
|
||||||
"dynamicMultiplierDescription": "按时间段设置倍率,用于调节流量或计费。",
|
|
||||||
"startTime": "开始时间",
|
|
||||||
"endTime": "结束时间",
|
|
||||||
"multiplier": "倍率",
|
|
||||||
"reset": "重置",
|
"reset": "重置",
|
||||||
"save": "保存",
|
"save": "保存",
|
||||||
|
"saveSuccess": "保存成功",
|
||||||
|
"startTime": "开始时间",
|
||||||
"timeSlot": "时间段",
|
"timeSlot": "时间段",
|
||||||
"actions": {
|
"title": "节点配置"
|
||||||
"cancel": "取消",
|
|
||||||
"save": "保存"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"confirm": "确认",
|
"confirm": "确认",
|
||||||
"confirmDeleteDesc": "该操作不可撤销。",
|
"confirmDeleteDesc": "该操作不可撤销。",
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "编辑服务器",
|
"drawerEditTitle": "编辑服务器",
|
||||||
"edit": "编辑",
|
"edit": "编辑",
|
||||||
"enabled": "启用",
|
"enabled": "启用",
|
||||||
"encryption_method": "加密方式",
|
"encryption": "加密方式",
|
||||||
|
"encryption_client_padding": "客户端填充",
|
||||||
|
"encryption_mode": "模式",
|
||||||
|
"encryption_password": "密码",
|
||||||
|
"encryption_password_placeholder": "留空自动生成,需抗量子加密请自行替换",
|
||||||
|
"encryption_private_key": "私钥",
|
||||||
|
"encryption_private_key_placeholder": "留空自动生成,需抗量子加密请自行替换",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "服务器填充",
|
||||||
|
"encryption_ticket": "票据时间",
|
||||||
"expireTime": "到期时间",
|
"expireTime": "到期时间",
|
||||||
"expired": "已过期",
|
"expired": "已过期",
|
||||||
|
"extra": "额外配置",
|
||||||
"flow": "流控",
|
"flow": "流控",
|
||||||
"hop_interval": "跳跃端口间隔",
|
"hop_interval": "跳跃端口间隔",
|
||||||
"hop_ports": "跳跃端口",
|
"hop_ports": "跳跃端口",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "数据迁移失败",
|
"migrateFailed": "数据迁移失败",
|
||||||
"migrated": "数据迁移成功",
|
"migrated": "数据迁移成功",
|
||||||
"migrating": "迁移中...",
|
"migrating": "迁移中...",
|
||||||
|
"mode": "模式",
|
||||||
"multiplex": "多路复用",
|
"multiplex": "多路复用",
|
||||||
"name": "名称",
|
"name": "名称",
|
||||||
"noData": "暂无数据",
|
"noData": "暂无数据",
|
||||||
"notAvailable": "—",
|
"notAvailable": "—",
|
||||||
|
"obfs": "混淆",
|
||||||
|
"obfs_host": "混淆主机",
|
||||||
"obfs_password": "混淆密码",
|
"obfs_password": "混淆密码",
|
||||||
"obfs_password_placeholder": "输入混淆密码",
|
"obfs_password_placeholder": "输入混淆密码",
|
||||||
|
"obfs_path": "混淆路径",
|
||||||
"offline": "离线",
|
"offline": "离线",
|
||||||
"online": "在线",
|
"online": "在线",
|
||||||
"onlineUsers": "在线人数",
|
"onlineUsers": "在线人数",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "服务器",
|
"pageTitle": "服务器",
|
||||||
"path": "路径",
|
"path": "路径",
|
||||||
"please_select": "请选择",
|
"please_select": "请选择",
|
||||||
"plugin": "插件配置",
|
|
||||||
"plugin_opts": "插件选项",
|
|
||||||
"port": "端口",
|
"port": "端口",
|
||||||
"protocol_configurations": "协议配置",
|
"protocol_configurations": "协议配置",
|
||||||
"protocol_configurations_desc": "启用并配置所需的协议类型",
|
"protocol_configurations_desc": "启用并配置所需的协议类型",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "选择加密方式",
|
"select_encryption_method": "选择加密方式",
|
||||||
"server_key": "服务器密钥",
|
"server_key": "服务器密钥",
|
||||||
"service_name": "服务名",
|
"service_name": "服务名",
|
||||||
|
"sorted_success": "排序成功",
|
||||||
"status": "状态",
|
"status": "状态",
|
||||||
"subscribeId": "订阅 ID",
|
"subscribeId": "订阅 ID",
|
||||||
"subscription": "订阅",
|
"subscription": "订阅",
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"select_protocol": "選擇協議…",
|
"select_protocol": "選擇協議…",
|
||||||
"select_server": "選擇伺服器…",
|
"select_server": "選擇伺服器…",
|
||||||
"server": "伺服器",
|
"server": "伺服器",
|
||||||
|
"sorted_success": "排序成功",
|
||||||
"tags": "標籤",
|
"tags": "標籤",
|
||||||
"tags_description": "權限分組標籤(包括計劃綁定和交付政策)。",
|
"tags_description": "權限分組標籤(包括計劃綁定和交付政策)。",
|
||||||
"tags_placeholder": "使用 Enter 或逗號 (,) 添加多個標籤",
|
"tags_placeholder": "使用 Enter 或逗號 (,) 添加多個標籤",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"bandwidth_placeholder": "輸入帶寬,留空以使用BBR",
|
"bandwidth_placeholder": "輸入帶寬,留空以使用BBR",
|
||||||
"basic": "基本配置",
|
"basic": "基本配置",
|
||||||
"cancel": "取消",
|
"cancel": "取消",
|
||||||
|
"cipher": "加密算法",
|
||||||
"city": "城市",
|
"city": "城市",
|
||||||
"config": {
|
"config": {
|
||||||
"actions": {
|
"actions": {
|
||||||
@@ -49,9 +50,19 @@
|
|||||||
"drawerEditTitle": "編輯伺服器",
|
"drawerEditTitle": "編輯伺服器",
|
||||||
"edit": "編輯",
|
"edit": "編輯",
|
||||||
"enabled": "已啟用",
|
"enabled": "已啟用",
|
||||||
"encryption_method": "加密方法",
|
"encryption": "加密方法",
|
||||||
|
"encryption_client_padding": "客戶端填充",
|
||||||
|
"encryption_mode": "模式",
|
||||||
|
"encryption_password": "密碼",
|
||||||
|
"encryption_password_placeholder": "留空以自動生成,手動替換以進行後量子加密",
|
||||||
|
"encryption_private_key": "私鑰",
|
||||||
|
"encryption_private_key_placeholder": "留空以自動生成,手動替換以進行後量子加密",
|
||||||
|
"encryption_rtt": "RTT",
|
||||||
|
"encryption_server_padding": "服務器填充",
|
||||||
|
"encryption_ticket": "票據時間",
|
||||||
"expireTime": "過期時間",
|
"expireTime": "過期時間",
|
||||||
"expired": "已過期",
|
"expired": "已過期",
|
||||||
|
"extra": "額外配置",
|
||||||
"flow": "流量",
|
"flow": "流量",
|
||||||
"hop_interval": "跳躍間隔",
|
"hop_interval": "跳躍間隔",
|
||||||
"hop_ports": "跳躍端口",
|
"hop_ports": "跳躍端口",
|
||||||
@@ -64,12 +75,16 @@
|
|||||||
"migrateFailed": "數據遷移失敗",
|
"migrateFailed": "數據遷移失敗",
|
||||||
"migrated": "數據已成功遷移",
|
"migrated": "數據已成功遷移",
|
||||||
"migrating": "正在遷移...",
|
"migrating": "正在遷移...",
|
||||||
|
"mode": "模式",
|
||||||
"multiplex": "多元影院",
|
"multiplex": "多元影院",
|
||||||
"name": "名稱",
|
"name": "名稱",
|
||||||
"noData": "無數據",
|
"noData": "無數據",
|
||||||
"notAvailable": "不可用",
|
"notAvailable": "不可用",
|
||||||
|
"obfs": "混淆",
|
||||||
|
"obfs_host": "混淆主機",
|
||||||
"obfs_password": "混淆密碼",
|
"obfs_password": "混淆密碼",
|
||||||
"obfs_password_placeholder": "輸入混淆密碼",
|
"obfs_password_placeholder": "輸入混淆密碼",
|
||||||
|
"obfs_path": "混淆路徑",
|
||||||
"offline": "離線",
|
"offline": "離線",
|
||||||
"online": "在線",
|
"online": "在線",
|
||||||
"onlineUsers": "在線用戶",
|
"onlineUsers": "在線用戶",
|
||||||
@@ -78,8 +93,6 @@
|
|||||||
"pageTitle": "伺服器",
|
"pageTitle": "伺服器",
|
||||||
"path": "路徑",
|
"path": "路徑",
|
||||||
"please_select": "請選擇",
|
"please_select": "請選擇",
|
||||||
"plugin": "插件配置",
|
|
||||||
"plugin_opts": "插件選項",
|
|
||||||
"port": "端口",
|
"port": "端口",
|
||||||
"protocol_configurations": "協議配置",
|
"protocol_configurations": "協議配置",
|
||||||
"protocol_configurations_desc": "啟用並配置所需的協議類型",
|
"protocol_configurations_desc": "啟用並配置所需的協議類型",
|
||||||
@@ -103,6 +116,7 @@
|
|||||||
"select_encryption_method": "選擇加密方法",
|
"select_encryption_method": "選擇加密方法",
|
||||||
"server_key": "伺服器密鑰",
|
"server_key": "伺服器密鑰",
|
||||||
"service_name": "服務名稱",
|
"service_name": "服務名稱",
|
||||||
|
"sorted_success": "排序成功",
|
||||||
"status": "狀態",
|
"status": "狀態",
|
||||||
"subscribeId": "訂閱 ID",
|
"subscribeId": "訂閱 ID",
|
||||||
"subscription": "訂閱",
|
"subscription": "訂閱",
|
||||||
|
|||||||
@@ -11,12 +11,14 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lottiefiles/dotlottie-react": "^0.15.1",
|
"@lottiefiles/dotlottie-react": "^0.15.1",
|
||||||
|
"@noble/curves": "^2.0.0",
|
||||||
"@tanstack/react-query": "^5.85.5",
|
"@tanstack/react-query": "^5.85.5",
|
||||||
"@tanstack/react-query-next-experimental": "^5.85.5",
|
"@tanstack/react-query-next-experimental": "^5.85.5",
|
||||||
"@workspace/ui": "workspace:*",
|
"@workspace/ui": "workspace:*",
|
||||||
"ahooks": "^3.9.4",
|
"ahooks": "^3.9.4",
|
||||||
"axios": "^1.11.0",
|
"axios": "^1.11.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
|
"mlkem-wasm": "^0.0.6",
|
||||||
"nanoid": "^5.1.5",
|
"nanoid": "^5.1.5",
|
||||||
"next": "^15.5.2",
|
"next": "^15.5.2",
|
||||||
"next-intl": "^3.26.3",
|
"next-intl": "^3.26.3",
|
||||||
|
|||||||
+27
-4
@@ -1496,6 +1496,7 @@ declare namespace API {
|
|||||||
type Protocol = {
|
type Protocol = {
|
||||||
type: string;
|
type: string;
|
||||||
port: number;
|
port: number;
|
||||||
|
enable: boolean;
|
||||||
security?: string;
|
security?: string;
|
||||||
sni?: string;
|
sni?: string;
|
||||||
allow_insecure?: boolean;
|
allow_insecure?: boolean;
|
||||||
@@ -1519,10 +1520,6 @@ declare namespace API {
|
|||||||
reduce_rtt?: boolean;
|
reduce_rtt?: boolean;
|
||||||
udp_relay_mode?: string;
|
udp_relay_mode?: string;
|
||||||
congestion_controller?: string;
|
congestion_controller?: string;
|
||||||
/** obfs, v2ray-plugin, simple-obfs */
|
|
||||||
plugin?: string;
|
|
||||||
/** plugin options, eg: obfs=http;obfs-host=www.bing.com */
|
|
||||||
plugin_options?: string;
|
|
||||||
/** mux, eg: off/low/medium/high */
|
/** mux, eg: off/low/medium/high */
|
||||||
multiplex?: string;
|
multiplex?: string;
|
||||||
/** padding scheme */
|
/** padding scheme */
|
||||||
@@ -1531,6 +1528,32 @@ declare namespace API {
|
|||||||
up_mbps?: number;
|
up_mbps?: number;
|
||||||
/** download speed limit */
|
/** download speed limit */
|
||||||
down_mbps?: number;
|
down_mbps?: number;
|
||||||
|
/** obfs, 'none', 'http', 'tls' */
|
||||||
|
obfs?: string;
|
||||||
|
/** obfs host */
|
||||||
|
obfs_host?: string;
|
||||||
|
/** obfs path */
|
||||||
|
obfs_path?: string;
|
||||||
|
/** xhttp mode */
|
||||||
|
xhttp_mode?: string;
|
||||||
|
/** xhttp extra path */
|
||||||
|
xhttp_extra?: string;
|
||||||
|
/** encryption,'none', 'mlkem768x25519plus' */
|
||||||
|
encryption?: string;
|
||||||
|
/** encryption mode,'native', 'xorpub', 'random' */
|
||||||
|
encryption_mode?: string;
|
||||||
|
/** encryption rtt,'0rtt', '1rtt' */
|
||||||
|
encryption_rtt?: string;
|
||||||
|
/** encryption ticket */
|
||||||
|
encryption_ticket?: string;
|
||||||
|
/** encryption server padding */
|
||||||
|
encryption_server_padding?: string;
|
||||||
|
/** encryption private key */
|
||||||
|
encryption_private_key?: string;
|
||||||
|
/** encryption client padding */
|
||||||
|
encryption_client_padding?: string;
|
||||||
|
/** encryption password */
|
||||||
|
encryption_password?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type PubilcRegisterConfig = {
|
type PubilcRegisterConfig = {
|
||||||
|
|||||||
+27
-4
@@ -504,6 +504,7 @@ declare namespace API {
|
|||||||
type Protocol = {
|
type Protocol = {
|
||||||
type: string;
|
type: string;
|
||||||
port: number;
|
port: number;
|
||||||
|
enable: boolean;
|
||||||
security?: string;
|
security?: string;
|
||||||
sni?: string;
|
sni?: string;
|
||||||
allow_insecure?: boolean;
|
allow_insecure?: boolean;
|
||||||
@@ -527,10 +528,6 @@ declare namespace API {
|
|||||||
reduce_rtt?: boolean;
|
reduce_rtt?: boolean;
|
||||||
udp_relay_mode?: string;
|
udp_relay_mode?: string;
|
||||||
congestion_controller?: string;
|
congestion_controller?: string;
|
||||||
/** obfs, v2ray-plugin, simple-obfs */
|
|
||||||
plugin?: string;
|
|
||||||
/** plugin options, eg: obfs=http;obfs-host=www.bing.com */
|
|
||||||
plugin_options?: string;
|
|
||||||
/** mux, eg: off/low/medium/high */
|
/** mux, eg: off/low/medium/high */
|
||||||
multiplex?: string;
|
multiplex?: string;
|
||||||
/** padding scheme */
|
/** padding scheme */
|
||||||
@@ -539,6 +536,32 @@ declare namespace API {
|
|||||||
up_mbps?: number;
|
up_mbps?: number;
|
||||||
/** download speed limit */
|
/** download speed limit */
|
||||||
down_mbps?: number;
|
down_mbps?: number;
|
||||||
|
/** obfs, 'none', 'http', 'tls' */
|
||||||
|
obfs?: string;
|
||||||
|
/** obfs host */
|
||||||
|
obfs_host?: string;
|
||||||
|
/** obfs path */
|
||||||
|
obfs_path?: string;
|
||||||
|
/** xhttp mode */
|
||||||
|
xhttp_mode?: string;
|
||||||
|
/** xhttp extra path */
|
||||||
|
xhttp_extra?: string;
|
||||||
|
/** encryption,'none', 'mlkem768x25519plus' */
|
||||||
|
encryption?: string;
|
||||||
|
/** encryption mode,'native', 'xorpub', 'random' */
|
||||||
|
encryption_mode?: string;
|
||||||
|
/** encryption rtt,'0rtt', '1rtt' */
|
||||||
|
encryption_rtt?: string;
|
||||||
|
/** encryption ticket */
|
||||||
|
encryption_ticket?: string;
|
||||||
|
/** encryption server padding */
|
||||||
|
encryption_server_padding?: string;
|
||||||
|
/** encryption private key */
|
||||||
|
encryption_private_key?: string;
|
||||||
|
/** encryption client padding */
|
||||||
|
encryption_client_padding?: string;
|
||||||
|
/** encryption password */
|
||||||
|
encryption_password?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type PubilcRegisterConfig = {
|
type PubilcRegisterConfig = {
|
||||||
|
|||||||
@@ -0,0 +1,145 @@
|
|||||||
|
import { filterNodeList, queryNodeTag } from '@/services/admin/server';
|
||||||
|
import { create } from 'zustand';
|
||||||
|
|
||||||
|
interface NodeState {
|
||||||
|
// Data
|
||||||
|
nodes: API.Node[];
|
||||||
|
tags: string[];
|
||||||
|
|
||||||
|
// Loading states
|
||||||
|
loading: boolean;
|
||||||
|
loadingTags: boolean;
|
||||||
|
loaded: boolean;
|
||||||
|
loadedTags: boolean;
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
fetchNodes: () => Promise<void>;
|
||||||
|
fetchTags: () => Promise<void>;
|
||||||
|
|
||||||
|
// Getters
|
||||||
|
getNodeById: (nodeId: number) => API.Node | undefined;
|
||||||
|
isProtocolUsedInNodes: (serverId: number, protocolType: string) => boolean;
|
||||||
|
isServerReferencedByNodes: (serverId: number) => boolean;
|
||||||
|
getNodesByTag: (tag: string) => API.Node[];
|
||||||
|
getNodesWithoutTags: () => API.Node[];
|
||||||
|
getNodeTags: () => string[];
|
||||||
|
getAllAvailableTags: () => string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useNodeStore = create<NodeState>((set, get) => ({
|
||||||
|
// Initial state
|
||||||
|
nodes: [],
|
||||||
|
tags: [],
|
||||||
|
loading: false,
|
||||||
|
loadingTags: false,
|
||||||
|
loaded: false,
|
||||||
|
loadedTags: false,
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
fetchNodes: async () => {
|
||||||
|
if (get().loading) return;
|
||||||
|
|
||||||
|
set({ loading: true });
|
||||||
|
try {
|
||||||
|
const { data } = await filterNodeList({ page: 1, size: 999999999 });
|
||||||
|
set({
|
||||||
|
nodes: data?.data?.list || [],
|
||||||
|
loaded: true,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
// Handle error silently
|
||||||
|
set({ loaded: true });
|
||||||
|
} finally {
|
||||||
|
set({ loading: false });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
fetchTags: async () => {
|
||||||
|
if (get().loadingTags) return;
|
||||||
|
|
||||||
|
set({ loadingTags: true });
|
||||||
|
try {
|
||||||
|
const { data } = await queryNodeTag();
|
||||||
|
set({
|
||||||
|
tags: data?.data?.tags || [],
|
||||||
|
loadedTags: true,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
// Handle error silently
|
||||||
|
set({ loadedTags: true });
|
||||||
|
} finally {
|
||||||
|
set({ loadingTags: false });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Getters
|
||||||
|
getNodeById: (nodeId: number) => {
|
||||||
|
return get().nodes.find((n) => n.id === nodeId);
|
||||||
|
},
|
||||||
|
|
||||||
|
isProtocolUsedInNodes: (serverId: number, protocolType: string) => {
|
||||||
|
return get().nodes.some(
|
||||||
|
(node) => node.server_id === serverId && node.protocol === protocolType,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
isServerReferencedByNodes: (serverId: number) => {
|
||||||
|
return get().nodes.some((node) => node.server_id === serverId);
|
||||||
|
},
|
||||||
|
|
||||||
|
getNodesByTag: (tag: string) => {
|
||||||
|
return get().nodes.filter((node) => (node.tags || []).includes(tag));
|
||||||
|
},
|
||||||
|
|
||||||
|
getNodesWithoutTags: () => {
|
||||||
|
return get().nodes.filter((node) => (node.tags || []).length === 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
getNodeTags: () => {
|
||||||
|
return Array.from(
|
||||||
|
new Set(
|
||||||
|
get()
|
||||||
|
.nodes.flatMap((node) => (Array.isArray(node.tags) ? node.tags : []))
|
||||||
|
.filter(Boolean),
|
||||||
|
),
|
||||||
|
) as string[];
|
||||||
|
},
|
||||||
|
|
||||||
|
getAllAvailableTags: () => {
|
||||||
|
const nodeExtractedTags = get().getNodeTags();
|
||||||
|
const allApiTags = get().tags;
|
||||||
|
return Array.from(new Set([...allApiTags, ...nodeExtractedTags])).filter(Boolean);
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
export const useNode = () => {
|
||||||
|
const store = useNodeStore();
|
||||||
|
|
||||||
|
// Auto-fetch nodes and tags
|
||||||
|
if (!store.loaded && !store.loading) {
|
||||||
|
store.fetchNodes();
|
||||||
|
}
|
||||||
|
if (!store.loadedTags && !store.loadingTags) {
|
||||||
|
store.fetchTags();
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
nodes: store.nodes,
|
||||||
|
tags: store.tags,
|
||||||
|
loading: store.loading,
|
||||||
|
loadingTags: store.loadingTags,
|
||||||
|
loaded: store.loaded,
|
||||||
|
loadedTags: store.loadedTags,
|
||||||
|
fetchNodes: store.fetchNodes,
|
||||||
|
fetchTags: store.fetchTags,
|
||||||
|
getNodeById: store.getNodeById,
|
||||||
|
isProtocolUsedInNodes: store.isProtocolUsedInNodes,
|
||||||
|
isServerReferencedByNodes: store.isServerReferencedByNodes,
|
||||||
|
getNodesByTag: store.getNodesByTag,
|
||||||
|
getNodesWithoutTags: store.getNodesWithoutTags,
|
||||||
|
getNodeTags: store.getNodeTags,
|
||||||
|
getAllAvailableTags: store.getAllAvailableTags,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default useNodeStore;
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
import { filterServerList } from '@/services/admin/server';
|
||||||
|
import { create } from 'zustand';
|
||||||
|
|
||||||
|
interface ServerState {
|
||||||
|
// Data
|
||||||
|
servers: API.Server[];
|
||||||
|
|
||||||
|
// Loading states
|
||||||
|
loading: boolean;
|
||||||
|
loaded: boolean;
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
fetchServers: () => Promise<void>;
|
||||||
|
|
||||||
|
// Getters
|
||||||
|
getServerById: (serverId: number) => API.Server | undefined;
|
||||||
|
getServerName: (serverId?: number) => string;
|
||||||
|
getServerAddress: (serverId?: number) => string;
|
||||||
|
getServerEnabledProtocols: (serverId: number) => API.Protocol[];
|
||||||
|
getProtocolPort: (serverId?: number, protocol?: string) => string;
|
||||||
|
getAvailableProtocols: (serverId?: number) => Array<{ protocol: string; port: number }>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useServerStore = create<ServerState>((set, get) => ({
|
||||||
|
// Initial state
|
||||||
|
servers: [],
|
||||||
|
loading: false,
|
||||||
|
loaded: false,
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
fetchServers: async () => {
|
||||||
|
if (get().loading) return;
|
||||||
|
|
||||||
|
set({ loading: true });
|
||||||
|
try {
|
||||||
|
const { data } = await filterServerList({ page: 1, size: 999999999 });
|
||||||
|
set({
|
||||||
|
servers: data?.data?.list || [],
|
||||||
|
loaded: true,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
// Handle error silently
|
||||||
|
set({ loaded: true });
|
||||||
|
} finally {
|
||||||
|
set({ loading: false });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Getters
|
||||||
|
getServerById: (serverId: number) => {
|
||||||
|
return get().servers.find((s) => s.id === serverId);
|
||||||
|
},
|
||||||
|
|
||||||
|
getServerName: (serverId?: number) => {
|
||||||
|
if (!serverId) return '—';
|
||||||
|
const server = get().servers.find((s) => s.id === serverId);
|
||||||
|
return server?.name ?? `#${serverId}`;
|
||||||
|
},
|
||||||
|
|
||||||
|
getServerAddress: (serverId?: number) => {
|
||||||
|
if (!serverId) return '—';
|
||||||
|
const server = get().servers.find((s) => s.id === serverId);
|
||||||
|
return server?.address ?? '—';
|
||||||
|
},
|
||||||
|
|
||||||
|
getServerEnabledProtocols: (serverId: number) => {
|
||||||
|
const server = get().servers.find((s) => s.id === serverId);
|
||||||
|
return server?.protocols?.filter((p) => p.enable !== false) || [];
|
||||||
|
},
|
||||||
|
|
||||||
|
getProtocolPort: (serverId?: number, protocol?: string) => {
|
||||||
|
if (!serverId || !protocol) return '—';
|
||||||
|
const enabledProtocols = get().getServerEnabledProtocols(serverId);
|
||||||
|
const protocolConfig = enabledProtocols.find((p) => p.type === protocol);
|
||||||
|
return protocolConfig?.port ? String(protocolConfig.port) : '—';
|
||||||
|
},
|
||||||
|
|
||||||
|
getAvailableProtocols: (serverId?: number) => {
|
||||||
|
if (!serverId) return [];
|
||||||
|
return get()
|
||||||
|
.getServerEnabledProtocols(serverId)
|
||||||
|
.map((p) => ({
|
||||||
|
protocol: p.type,
|
||||||
|
port: p.port,
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
export const useServer = () => {
|
||||||
|
const store = useServerStore();
|
||||||
|
|
||||||
|
// Auto-fetch servers
|
||||||
|
if (!store.loaded && !store.loading) {
|
||||||
|
store.fetchServers();
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
servers: store.servers,
|
||||||
|
loading: store.loading,
|
||||||
|
loaded: store.loaded,
|
||||||
|
fetchServers: store.fetchServers,
|
||||||
|
getServerById: store.getServerById,
|
||||||
|
getServerName: store.getServerName,
|
||||||
|
getServerAddress: store.getServerAddress,
|
||||||
|
getServerEnabledProtocols: store.getServerEnabledProtocols,
|
||||||
|
getProtocolPort: store.getProtocolPort,
|
||||||
|
getAvailableProtocols: store.getAvailableProtocols,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default useServerStore;
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
import { getSubscribeList } from '@/services/admin/subscribe';
|
||||||
|
import { create } from 'zustand';
|
||||||
|
|
||||||
|
interface SubscribeState {
|
||||||
|
// Data
|
||||||
|
subscribes: API.SubscribeItem[];
|
||||||
|
|
||||||
|
// Loading states
|
||||||
|
loading: boolean;
|
||||||
|
loaded: boolean;
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
fetchSubscribes: () => Promise<void>;
|
||||||
|
|
||||||
|
// Getters
|
||||||
|
getSubscribeName: (subscribeId?: number) => string;
|
||||||
|
getSubscribeById: (subscribeId: number) => API.SubscribeItem | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useSubscribeStore = create<SubscribeState>((set, get) => ({
|
||||||
|
// Initial state
|
||||||
|
subscribes: [],
|
||||||
|
loading: false,
|
||||||
|
loaded: false,
|
||||||
|
|
||||||
|
// Actions
|
||||||
|
fetchSubscribes: async () => {
|
||||||
|
if (get().loading) return;
|
||||||
|
|
||||||
|
set({ loading: true });
|
||||||
|
try {
|
||||||
|
const { data } = await getSubscribeList({ page: 1, size: 999999999 });
|
||||||
|
set({
|
||||||
|
subscribes: data?.data?.list || [],
|
||||||
|
loaded: true,
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
// Handle error silently
|
||||||
|
set({ loaded: true });
|
||||||
|
} finally {
|
||||||
|
set({ loading: false });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Getters
|
||||||
|
getSubscribeName: (subscribeId?: number) => {
|
||||||
|
if (!subscribeId) return 'Unknown';
|
||||||
|
const subscribe = get().subscribes.find((s) => s.id === subscribeId);
|
||||||
|
return subscribe?.name ?? `Subscribe ${subscribeId}`;
|
||||||
|
},
|
||||||
|
|
||||||
|
getSubscribeById: (subscribeId: number) => {
|
||||||
|
return get().subscribes.find((s) => s.id === subscribeId);
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
export const useSubscribe = () => {
|
||||||
|
const store = useSubscribeStore();
|
||||||
|
|
||||||
|
// Auto-fetch subscribes
|
||||||
|
if (!store.loaded && !store.loading) {
|
||||||
|
store.fetchSubscribes();
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
subscribes: store.subscribes,
|
||||||
|
loading: store.loading,
|
||||||
|
loaded: store.loaded,
|
||||||
|
fetchSubscribes: store.fetchSubscribes,
|
||||||
|
getSubscribeName: store.getSubscribeName,
|
||||||
|
getSubscribeById: store.getSubscribeById,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default useSubscribeStore;
|
||||||
@@ -11,6 +11,9 @@ NEXT_PUBLIC_HOME_USER_COUNT=999
|
|||||||
NEXT_PUBLIC_HOME_SERVER_COUNT=999
|
NEXT_PUBLIC_HOME_SERVER_COUNT=999
|
||||||
NEXT_PUBLIC_HOME_LOCATION_COUNT=999
|
NEXT_PUBLIC_HOME_LOCATION_COUNT=999
|
||||||
|
|
||||||
|
# Hidden Tutorial Document
|
||||||
|
NEXT_PUBLIC_HIDDEN_TUTORIAL_DOCUMENT=false # true or false
|
||||||
|
|
||||||
# Contact Email
|
# Contact Email
|
||||||
NEXT_PUBLIC_EMAIL=support@ppanel.dev
|
NEXT_PUBLIC_EMAIL=support@ppanel.dev
|
||||||
# Community Links
|
# Community Links
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ import { useTranslations } from 'next-intl';
|
|||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { QRCodeCanvas } from 'qrcode.react';
|
import { QRCodeCanvas } from 'qrcode.react';
|
||||||
import { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import CopyToClipboard from 'react-copy-to-clipboard';
|
import CopyToClipboard from 'react-copy-to-clipboard';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
import Subscribe from '../subscribe/page';
|
import Subscribe from '../subscribe/page';
|
||||||
@@ -75,9 +75,39 @@ export default function Content() {
|
|||||||
return data.data?.list || [];
|
return data.data?.list || [];
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const [platform, setPlatform] = useState<keyof API.DownloadLink>(
|
|
||||||
getPlatform() === 'macos' ? 'mac' : (getPlatform() as keyof API.DownloadLink),
|
const availablePlatforms = React.useMemo(() => {
|
||||||
);
|
if (!applications || applications.length === 0) return platforms;
|
||||||
|
|
||||||
|
const platformsSet = new Set<keyof API.DownloadLink>();
|
||||||
|
|
||||||
|
applications.forEach((app) => {
|
||||||
|
if (app.download_link) {
|
||||||
|
platforms.forEach((platform) => {
|
||||||
|
if (app.download_link?.[platform]) {
|
||||||
|
platformsSet.add(platform);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return platforms.filter((platform) => platformsSet.has(platform));
|
||||||
|
}, [applications]);
|
||||||
|
|
||||||
|
const [platform, setPlatform] = useState<keyof API.DownloadLink>(() => {
|
||||||
|
const detectedPlatform =
|
||||||
|
getPlatform() === 'macos' ? 'mac' : (getPlatform() as keyof API.DownloadLink);
|
||||||
|
return detectedPlatform;
|
||||||
|
});
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (availablePlatforms.length > 0 && !availablePlatforms.includes(platform)) {
|
||||||
|
const firstAvailablePlatform = availablePlatforms[0];
|
||||||
|
if (firstAvailablePlatform) {
|
||||||
|
setPlatform(firstAvailablePlatform);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [availablePlatforms, platform]);
|
||||||
|
|
||||||
const { data } = useQuery({
|
const { data } = useQuery({
|
||||||
queryKey: ['getStat'],
|
queryKey: ['getStat'],
|
||||||
@@ -122,31 +152,33 @@ export default function Content() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='flex flex-wrap justify-between gap-4'>
|
<div className='flex flex-wrap justify-between gap-4'>
|
||||||
<Tabs
|
{availablePlatforms.length > 0 && (
|
||||||
value={platform}
|
<Tabs
|
||||||
onValueChange={(value) => setPlatform(value as keyof API.DownloadLink)}
|
value={platform}
|
||||||
className='w-full max-w-full md:w-auto'
|
onValueChange={(value) => setPlatform(value as keyof API.DownloadLink)}
|
||||||
>
|
className='w-full max-w-full md:w-auto'
|
||||||
<TabsList className='flex *:flex-auto'>
|
>
|
||||||
{platforms.map((item) => (
|
<TabsList className='flex *:flex-auto'>
|
||||||
<TabsTrigger value={item} key={item} className='px-1 lg:px-3'>
|
{availablePlatforms.map((item) => (
|
||||||
<Icon
|
<TabsTrigger value={item} key={item} className='px-1 lg:px-3'>
|
||||||
icon={`${
|
<Icon
|
||||||
{
|
icon={`${
|
||||||
windows: 'mdi:microsoft-windows',
|
{
|
||||||
mac: 'uil:apple',
|
windows: 'mdi:microsoft-windows',
|
||||||
linux: 'uil:linux',
|
mac: 'uil:apple',
|
||||||
ios: 'simple-icons:ios',
|
linux: 'uil:linux',
|
||||||
android: 'uil:android',
|
ios: 'simple-icons:ios',
|
||||||
harmony: 'simple-icons:harmonyos',
|
android: 'uil:android',
|
||||||
}[item]
|
harmony: 'simple-icons:harmonyos',
|
||||||
}`}
|
}[item]
|
||||||
className='size-5'
|
}`}
|
||||||
/>
|
className='size-5'
|
||||||
</TabsTrigger>
|
/>
|
||||||
))}
|
</TabsTrigger>
|
||||||
</TabsList>
|
))}
|
||||||
</Tabs>
|
</TabsList>
|
||||||
|
</Tabs>
|
||||||
|
)}
|
||||||
{data?.protocol && data?.protocol.length > 1 && (
|
{data?.protocol && data?.protocol.length > 1 && (
|
||||||
<Tabs
|
<Tabs
|
||||||
value={protocol}
|
value={protocol}
|
||||||
@@ -325,9 +357,8 @@ export default function Content() {
|
|||||||
<div className='grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6'>
|
<div className='grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6'>
|
||||||
{applications
|
{applications
|
||||||
?.filter((application) => {
|
?.filter((application) => {
|
||||||
if (!application.download_link && !application.scheme) return false;
|
return !!(
|
||||||
return (
|
application.download_link?.[platform] && application.scheme
|
||||||
!!application.download_link?.[platform] || !!application.scheme
|
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.map((application) => {
|
.map((application) => {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
|
import { NEXT_PUBLIC_HIDDEN_TUTORIAL_DOCUMENT } from '@/config/constants';
|
||||||
import { queryDocumentList } from '@/services/user/document';
|
import { queryDocumentList } from '@/services/user/document';
|
||||||
import { getTutorialList } from '@/utils/tutorial';
|
import { getTutorialList } from '@/utils/tutorial';
|
||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
@@ -31,6 +32,7 @@ export default function Page() {
|
|||||||
const list = await getTutorialList();
|
const list = await getTutorialList();
|
||||||
return list.get(locale);
|
return list.get(locale);
|
||||||
},
|
},
|
||||||
|
enabled: NEXT_PUBLIC_HIDDEN_TUTORIAL_DOCUMENT !== 'true',
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -53,3 +53,6 @@ export const NEXT_PUBLIC_HOME_LOCATION_COUNT = (() => {
|
|||||||
if (isNaN(numberValue)) return 999;
|
if (isNaN(numberValue)) return 999;
|
||||||
return numberValue;
|
return numberValue;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
export const NEXT_PUBLIC_HIDDEN_TUTORIAL_DOCUMENT =
|
||||||
|
env('NEXT_PUBLIC_HIDDEN_TUTORIAL_DOCUMENT') ?? process.env.NEXT_PUBLIC_HIDDEN_TUTORIAL_DOCUMENT;
|
||||||
|
|||||||
+27
-4
@@ -504,6 +504,7 @@ declare namespace API {
|
|||||||
type Protocol = {
|
type Protocol = {
|
||||||
type: string;
|
type: string;
|
||||||
port: number;
|
port: number;
|
||||||
|
enable: boolean;
|
||||||
security?: string;
|
security?: string;
|
||||||
sni?: string;
|
sni?: string;
|
||||||
allow_insecure?: boolean;
|
allow_insecure?: boolean;
|
||||||
@@ -527,10 +528,6 @@ declare namespace API {
|
|||||||
reduce_rtt?: boolean;
|
reduce_rtt?: boolean;
|
||||||
udp_relay_mode?: string;
|
udp_relay_mode?: string;
|
||||||
congestion_controller?: string;
|
congestion_controller?: string;
|
||||||
/** obfs, v2ray-plugin, simple-obfs */
|
|
||||||
plugin?: string;
|
|
||||||
/** plugin options, eg: obfs=http;obfs-host=www.bing.com */
|
|
||||||
plugin_options?: string;
|
|
||||||
/** mux, eg: off/low/medium/high */
|
/** mux, eg: off/low/medium/high */
|
||||||
multiplex?: string;
|
multiplex?: string;
|
||||||
/** padding scheme */
|
/** padding scheme */
|
||||||
@@ -539,6 +536,32 @@ declare namespace API {
|
|||||||
up_mbps?: number;
|
up_mbps?: number;
|
||||||
/** download speed limit */
|
/** download speed limit */
|
||||||
down_mbps?: number;
|
down_mbps?: number;
|
||||||
|
/** obfs, 'none', 'http', 'tls' */
|
||||||
|
obfs?: string;
|
||||||
|
/** obfs host */
|
||||||
|
obfs_host?: string;
|
||||||
|
/** obfs path */
|
||||||
|
obfs_path?: string;
|
||||||
|
/** xhttp mode */
|
||||||
|
xhttp_mode?: string;
|
||||||
|
/** xhttp extra path */
|
||||||
|
xhttp_extra?: string;
|
||||||
|
/** encryption,'none', 'mlkem768x25519plus' */
|
||||||
|
encryption?: string;
|
||||||
|
/** encryption mode,'native', 'xorpub', 'random' */
|
||||||
|
encryption_mode?: string;
|
||||||
|
/** encryption rtt,'0rtt', '1rtt' */
|
||||||
|
encryption_rtt?: string;
|
||||||
|
/** encryption ticket */
|
||||||
|
encryption_ticket?: string;
|
||||||
|
/** encryption server padding */
|
||||||
|
encryption_server_padding?: string;
|
||||||
|
/** encryption private key */
|
||||||
|
encryption_private_key?: string;
|
||||||
|
/** encryption client padding */
|
||||||
|
encryption_client_padding?: string;
|
||||||
|
/** encryption password */
|
||||||
|
encryption_password?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type PubilcRegisterConfig = {
|
type PubilcRegisterConfig = {
|
||||||
|
|||||||
Vendored
+27
-4
@@ -543,6 +543,7 @@ declare namespace API {
|
|||||||
type Protocol = {
|
type Protocol = {
|
||||||
type: string;
|
type: string;
|
||||||
port: number;
|
port: number;
|
||||||
|
enable: boolean;
|
||||||
security?: string;
|
security?: string;
|
||||||
sni?: string;
|
sni?: string;
|
||||||
allow_insecure?: boolean;
|
allow_insecure?: boolean;
|
||||||
@@ -566,10 +567,6 @@ declare namespace API {
|
|||||||
reduce_rtt?: boolean;
|
reduce_rtt?: boolean;
|
||||||
udp_relay_mode?: string;
|
udp_relay_mode?: string;
|
||||||
congestion_controller?: string;
|
congestion_controller?: string;
|
||||||
/** obfs, v2ray-plugin, simple-obfs */
|
|
||||||
plugin?: string;
|
|
||||||
/** plugin options, eg: obfs=http;obfs-host=www.bing.com */
|
|
||||||
plugin_options?: string;
|
|
||||||
/** mux, eg: off/low/medium/high */
|
/** mux, eg: off/low/medium/high */
|
||||||
multiplex?: string;
|
multiplex?: string;
|
||||||
/** padding scheme */
|
/** padding scheme */
|
||||||
@@ -578,6 +575,32 @@ declare namespace API {
|
|||||||
up_mbps?: number;
|
up_mbps?: number;
|
||||||
/** download speed limit */
|
/** download speed limit */
|
||||||
down_mbps?: number;
|
down_mbps?: number;
|
||||||
|
/** obfs, 'none', 'http', 'tls' */
|
||||||
|
obfs?: string;
|
||||||
|
/** obfs host */
|
||||||
|
obfs_host?: string;
|
||||||
|
/** obfs path */
|
||||||
|
obfs_path?: string;
|
||||||
|
/** xhttp mode */
|
||||||
|
xhttp_mode?: string;
|
||||||
|
/** xhttp extra path */
|
||||||
|
xhttp_extra?: string;
|
||||||
|
/** encryption,'none', 'mlkem768x25519plus' */
|
||||||
|
encryption?: string;
|
||||||
|
/** encryption mode,'native', 'xorpub', 'random' */
|
||||||
|
encryption_mode?: string;
|
||||||
|
/** encryption rtt,'0rtt', '1rtt' */
|
||||||
|
encryption_rtt?: string;
|
||||||
|
/** encryption ticket */
|
||||||
|
encryption_ticket?: string;
|
||||||
|
/** encryption server padding */
|
||||||
|
encryption_server_padding?: string;
|
||||||
|
/** encryption private key */
|
||||||
|
encryption_private_key?: string;
|
||||||
|
/** encryption client padding */
|
||||||
|
encryption_client_padding?: string;
|
||||||
|
/** encryption password */
|
||||||
|
encryption_password?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type PubilcRegisterConfig = {
|
type PubilcRegisterConfig = {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ppanel-web",
|
"name": "ppanel-web",
|
||||||
"version": "1.4.1",
|
"version": "1.4.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/perfect-panel/ppanel-web",
|
"homepage": "https://github.com/perfect-panel/ppanel-web",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export interface MonacoEditorProps {
|
|||||||
language?: string;
|
language?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
showLineNumbers?: boolean;
|
showLineNumbers?: boolean;
|
||||||
|
readOnly?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
@@ -45,6 +46,7 @@ export function MonacoEditor({
|
|||||||
language = 'markdown',
|
language = 'markdown',
|
||||||
className,
|
className,
|
||||||
showLineNumbers = false,
|
showLineNumbers = false,
|
||||||
|
readOnly = false,
|
||||||
}: MonacoEditorProps) {
|
}: MonacoEditorProps) {
|
||||||
const [internalValue, setInternalValue] = useState<string | undefined>(propValue);
|
const [internalValue, setInternalValue] = useState<string | undefined>(propValue);
|
||||||
const [isFullscreen, setIsFullscreen] = useState(false);
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||||
@@ -146,7 +148,7 @@ export function MonacoEditor({
|
|||||||
},
|
},
|
||||||
tabSize: 2,
|
tabSize: 2,
|
||||||
wordWrap: 'off',
|
wordWrap: 'off',
|
||||||
readOnly: !onChange,
|
readOnly,
|
||||||
}}
|
}}
|
||||||
theme='transparentTheme'
|
theme='transparentTheme'
|
||||||
beforeMount={(monaco: Monaco) => {
|
beforeMount={(monaco: Monaco) => {
|
||||||
@@ -166,7 +168,12 @@ export function MonacoEditor({
|
|||||||
/>
|
/>
|
||||||
{!internalValue?.trim() && placeholder && (
|
{!internalValue?.trim() && placeholder && (
|
||||||
<pre
|
<pre
|
||||||
className='text-muted-foreground pointer-events-none absolute left-7 top-4 text-sm'
|
className={cn(
|
||||||
|
'text-muted-foreground pointer-events-none absolute left-7 top-4 text-sm',
|
||||||
|
{
|
||||||
|
'left-16': showLineNumbers,
|
||||||
|
},
|
||||||
|
)}
|
||||||
style={{ userSelect: 'none' }}
|
style={{ userSelect: 'none' }}
|
||||||
>
|
>
|
||||||
{placeholder}
|
{placeholder}
|
||||||
|
|||||||
Reference in New Issue
Block a user