mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 23:54:48 +01:00
Use generated certificate
This commit is contained in:
@@ -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()
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user