Use generated certificate

This commit is contained in:
KingRainbow44
2022-05-29 22:27:04 -04:00
parent 1b945253b6
commit 2e90635ba5
6 changed files with 16 additions and 12 deletions

View File

@@ -12,6 +12,7 @@ const root = ReactDOM.createRoot(
root.render(
<React.StrictMode>
<App />
{/*<Test />*/}
</React.StrictMode>
)
@@ -19,4 +20,4 @@ root.render(
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
import reportWebVitals from './utils/reportWebVitals'
reportWebVitals()
reportWebVitals()

View File

@@ -1,9 +1,10 @@
import React from 'react'
import {invoke} from '@tauri-apps/api/tauri'
import {dataDir} from '@tauri-apps/api/path'
async function startProxy() {
await invoke('connect', { port: 2222 })
await invoke('connect', { port: 2222, certificate_path: await dataDir() + '\\ca' })
}
async function stopProxy() {

View File

@@ -9,6 +9,7 @@ import { invoke } from '@tauri-apps/api/tauri'
import Server from '../../resources/icons/server.svg'
import './ServerLaunchSection.css'
import {dataDir} from '@tauri-apps/api/path'
interface IProps {
[key: string]: any
@@ -105,7 +106,7 @@ export default class ServerLaunchSection extends React.Component<IProps, IState>
})
// Connect to proxy
await invoke('connect', { port: 8365 })
await invoke('connect', { port: 8365, certificate_path: await dataDir() + '\\ca' })
}
// Launch the program