From 462219ef0fd741cb155f2a9ff3c549ee15b0db22 Mon Sep 17 00:00:00 2001 From: Bradford Zhang Date: Mon, 7 Aug 2023 18:53:48 +0800 Subject: [PATCH 1/4] feat: add juicity pinned_certchain_sha256 config Signed-off-by: Bradford Zhang --- src/components/ConfigureNodeFormModal/JuicityForm.tsx | 3 +++ src/constants/default.ts | 1 + src/constants/schema.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/src/components/ConfigureNodeFormModal/JuicityForm.tsx b/src/components/ConfigureNodeFormModal/JuicityForm.tsx index f64b27f3..9441258f 100644 --- a/src/components/ConfigureNodeFormModal/JuicityForm.tsx +++ b/src/components/ConfigureNodeFormModal/JuicityForm.tsx @@ -17,6 +17,7 @@ export const JuicityForm = ({ onLinkGeneration }: { onLinkGeneration: (link: str const handleSubmit = onSubmit((values) => { const query = { congestion_control: values.congestion_control, + pinned_certchain_sha256: values.pinned_certchain_sha256, sni: values.sni, allow_insecure: values.allowInsecure, } @@ -56,6 +57,8 @@ export const JuicityForm = ({ onLinkGeneration }: { onLinkGeneration: (link: str {...getInputProps('congestion_control')} /> + + diff --git a/src/constants/default.ts b/src/constants/default.ts index 4dd8c666..d0ce8692 100644 --- a/src/constants/default.ts +++ b/src/constants/default.ts @@ -163,6 +163,7 @@ export const DEFAULT_JUICITY_FORM_VALUES: z.infer = { allowInsecure: false, uuid: '', password: '', + pinned_certchain_sha256: '', sni: '', } diff --git a/src/constants/schema.ts b/src/constants/schema.ts index e7344886..8ea8b136 100644 --- a/src/constants/schema.ts +++ b/src/constants/schema.ts @@ -113,6 +113,7 @@ export const juicitySchema = z.object({ uuid: z.string().nonempty(), password: z.string().nonempty(), allowInsecure: z.boolean(), + pinned_certchain_sha256: z.string(), sni: z.string(), congestion_control: z.string(), }) From a7ce0b3d52454d0611fdff722d98fc81b69acc8c Mon Sep 17 00:00:00 2001 From: Bradford Zhang Date: Mon, 7 Aug 2023 19:25:57 +0800 Subject: [PATCH 2/4] feat: add description text for pinned_certchain_sha256 Signed-off-by: Bradford Zhang --- src/components/ConfigureNodeFormModal/JuicityForm.tsx | 2 +- src/i18n/locales/en.json | 1 + src/i18n/locales/zh-Hans.json | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ConfigureNodeFormModal/JuicityForm.tsx b/src/components/ConfigureNodeFormModal/JuicityForm.tsx index 9441258f..130ffd0a 100644 --- a/src/components/ConfigureNodeFormModal/JuicityForm.tsx +++ b/src/components/ConfigureNodeFormModal/JuicityForm.tsx @@ -57,7 +57,7 @@ export const JuicityForm = ({ onLinkGeneration }: { onLinkGeneration: (link: str {...getInputProps('congestion_control')} /> - + diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 1235102d..2cfcf2fb 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -57,6 +57,7 @@ "password": "Password", "path": "Path", "pathObfuscation": "Path", + "pinned_certchain_sha256": "Pinned certchain SHA256", "port": "Port", "protocol": "Protocol", "protocolParam": "Protocol Param", diff --git a/src/i18n/locales/zh-Hans.json b/src/i18n/locales/zh-Hans.json index 6c254c9b..239e67be 100644 --- a/src/i18n/locales/zh-Hans.json +++ b/src/i18n/locales/zh-Hans.json @@ -57,6 +57,7 @@ "password": "密码", "path": "路径", "pathObfuscation": "路径 (path)", + "pinned_certchain_sha256": "固定的证书链 SHA256", "port": "端口号", "protocol": "协议", "protocolParam": "协议参数", From 9290d7181f956631c8a66fea9a1a43964cf124ef Mon Sep 17 00:00:00 2001 From: Bradford Zhang Date: Mon, 7 Aug 2023 19:29:50 +0800 Subject: [PATCH 3/4] fix(juicity): improve translation for pinned_certchain_sha256 Co-authored-by: kunish <17328586+kunish@users.noreply.github.com> Signed-off-by: Bradford Zhang --- src/i18n/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 2cfcf2fb..2460e3bf 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -57,7 +57,7 @@ "password": "Password", "path": "Path", "pathObfuscation": "Path", - "pinned_certchain_sha256": "Pinned certchain SHA256", + "pinned_certchain_sha256": "Pinned Certchain SHA256", "port": "Port", "protocol": "Protocol", "protocolParam": "Protocol Param", From d95a089b80f6f41ef1501caf748db9711eacaaf8 Mon Sep 17 00:00:00 2001 From: Bradford Zhang Date: Mon, 7 Aug 2023 19:30:34 +0800 Subject: [PATCH 4/4] fix(juicity): improve translation for pinned_certchain_sha256 Co-authored-by: kunish <17328586+kunish@users.noreply.github.com> Signed-off-by: Bradford Zhang --- src/i18n/locales/zh-Hans.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/locales/zh-Hans.json b/src/i18n/locales/zh-Hans.json index 239e67be..a101d4ac 100644 --- a/src/i18n/locales/zh-Hans.json +++ b/src/i18n/locales/zh-Hans.json @@ -57,7 +57,7 @@ "password": "密码", "path": "路径", "pathObfuscation": "路径 (path)", - "pinned_certchain_sha256": "固定的证书链 SHA256", + "pinned_certchain_sha256": "固定证书链 SHA256", "port": "端口号", "protocol": "协议", "protocolParam": "协议参数",