Skip to content

Commit

Permalink
feat: add juicity pinned_certchain_sha256 config (#219)
Browse files Browse the repository at this point in the history
Signed-off-by: Bradford Zhang <[email protected]>
Co-authored-by: kunish <[email protected]>
  • Loading branch information
bradfordzhang and kunish authored Aug 7, 2023
1 parent 2c5518e commit 42cc5ee
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/ConfigureNodeFormModal/JuicityForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down Expand Up @@ -56,6 +57,8 @@ export const JuicityForm = ({ onLinkGeneration }: { onLinkGeneration: (link: str
{...getInputProps('congestion_control')}
/>

<TextInput label={t('configureNode.pinned_certchain_sha256')} {...getInputProps('pinned_certchain_sha256')} />

<TextInput label="SNI" {...getInputProps('sni')} />

<Checkbox label={t('allowInsecure')} {...getInputProps('allowInsecure', { type: 'checkbox' })} />
Expand Down
1 change: 1 addition & 0 deletions src/constants/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export const DEFAULT_JUICITY_FORM_VALUES: z.infer<typeof juicitySchema> = {
allowInsecure: false,
uuid: '',
password: '',
pinned_certchain_sha256: '',
sni: '',
}

Expand Down
1 change: 1 addition & 0 deletions src/constants/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"password": "Password",
"path": "Path",
"pathObfuscation": "Path",
"pinned_certchain_sha256": "Pinned Certchain SHA256",
"port": "Port",
"protocol": "Protocol",
"protocolParam": "Protocol Param",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"password": "密码",
"path": "路径",
"pathObfuscation": "路径 (path)",
"pinned_certchain_sha256": "固定证书链 SHA256",
"port": "端口号",
"protocol": "协议",
"protocolParam": "协议参数",
Expand Down

0 comments on commit 42cc5ee

Please sign in to comment.