Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add juicity pinned_certchain_sha256 config #219

Merged
merged 4 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
bradfordzhang marked this conversation as resolved.
Show resolved Hide resolved
"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",
bradfordzhang marked this conversation as resolved.
Show resolved Hide resolved
"port": "端口号",
"protocol": "协议",
"protocolParam": "协议参数",
Expand Down