Skip to content

Commit c8cb71a

Browse files
committed
fix: add selectbox encryption method shadowsocks password
1 parent deac0ed commit c8cb71a

File tree

5 files changed

+27
-1
lines changed

5 files changed

+27
-1
lines changed

dashboard/public/statics/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,7 @@
13921392
"shadowsocksPassword": "Shadowsocks Password",
13931393
"shadowsocksPasswordCopied": "Password copied to clipboard",
13941394
"copyShadowsocksPassword": "Copy Password",
1395+
"shadowsocksEncryptionMethod": "Shadowsocks Encryption Method",
13951396
"selectEncryptionMethod": "Select Encryption Method",
13961397
"regeneratePassword": "Regenerate Password",
13971398
"generateVLESSEncryption": "VLESS Encryption",

dashboard/public/statics/locales/fa.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,7 @@
13111311
"shadowsocksPassword": "رمز عبور Shadowsocks",
13121312
"shadowsocksPasswordCopied": "رمز عبور در کلیپ‌بورد کپی شد",
13131313
"copyShadowsocksPassword": "کپی رمز عبور",
1314+
"shadowsocksEncryptionMethod": "روش رمزنگاری Shadowsocks",
13141315
"selectEncryptionMethod": "انتخاب روش رمزنگاری",
13151316
"regeneratePassword": "تولید مجدد رمز عبور",
13161317
"generateVLESSEncryption": "رمزنگاری VLESS",

dashboard/public/statics/locales/ru.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,7 @@
13311331
"shadowsocksPassword": "Пароль Shadowsocks",
13321332
"shadowsocksPasswordCopied": "Пароль скопирован в буфер обмена",
13331333
"copyShadowsocksPassword": "Копировать пароль",
1334+
"shadowsocksEncryptionMethod": "Метод шифрования Shadowsocks",
13341335
"selectEncryptionMethod": "Выберите метод шифрования",
13351336
"regeneratePassword": "Сгенерировать пароль заново",
13361337
"generateVLESSEncryption": "Шифрование VLESS",

dashboard/public/statics/locales/zh.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,7 @@
13731373
"shadowsocksPassword": "Shadowsocks 密码",
13741374
"shadowsocksPasswordCopied": "密码已复制到剪贴板",
13751375
"copyShadowsocksPassword": "复制密码",
1376+
"shadowsocksEncryptionMethod": "Shadowsocks 加密方法",
13761377
"selectEncryptionMethod": "选择加密方法",
13771378
"regeneratePassword": "重新生成密码",
13781379
"generateVLESSEncryption": "VLESS 加密",

dashboard/src/components/dialogs/CoreConfigModal.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export default function CoreConfigModal({ isDialogOpen, onOpenChange, form, edit
119119
const [isGeneratingKeyPair, setIsGeneratingKeyPair] = useState(false)
120120
const [isGeneratingShortId, setIsGeneratingShortId] = useState(false)
121121
const [isGeneratingVLESSEncryption, setIsGeneratingVLESSEncryption] = useState(false)
122-
const [selectedEncryptionMethod] = useState<string>(SHADOWSOCKS_ENCRYPTION_METHODS[0].value)
122+
const [selectedEncryptionMethod, setSelectedEncryptionMethod] = useState<string>(SHADOWSOCKS_ENCRYPTION_METHODS[0].value)
123123
const [isGeneratingShadowsocksPassword, setIsGeneratingShadowsocksPassword] = useState(false)
124124
const [isGeneratingMldsa65, setIsGeneratingMldsa65] = useState(false)
125125
const [selectedVlessVariant, setSelectedVlessVariant] = useState<VlessVariant>('x25519')
@@ -1661,6 +1661,28 @@ export default function CoreConfigModal({ isDialogOpen, onOpenChange, form, edit
16611661
Shadowsocks TAB
16621662
============================================ */}
16631663
<TabsContent value="shadowsocks" className="mt-3 space-y-3 animate-in fade-in-50 duration-300">
1664+
{/* Encryption Method Selector */}
1665+
<div className="space-y-2">
1666+
<Label className="text-xs font-semibold tracking-wide text-muted-foreground">
1667+
{t('coreConfigModal.shadowsocksEncryptionMethod', { defaultValue: 'Encryption Method' })}
1668+
</Label>
1669+
<Select
1670+
value={selectedEncryptionMethod}
1671+
onValueChange={setSelectedEncryptionMethod}
1672+
>
1673+
<SelectTrigger className="h-9">
1674+
<SelectValue />
1675+
</SelectTrigger>
1676+
<SelectContent>
1677+
{SHADOWSOCKS_ENCRYPTION_METHODS.map(method => (
1678+
<SelectItem key={method.value} value={method.value}>
1679+
{method.label}
1680+
</SelectItem>
1681+
))}
1682+
</SelectContent>
1683+
</Select>
1684+
</div>
1685+
16641686
{/* Action Buttons */}
16651687
<div className="grid gap-2 sm:grid-cols-2 sm:gap-3">
16661688
<LoaderButton

0 commit comments

Comments
 (0)