mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-01-07 03:26:56 +08:00
set proxy addr only when launching with proxy
This commit is contained in:
parent
1a6ed38f8f
commit
dc20fe5916
@ -116,13 +116,13 @@ export default class ServerLaunchSection extends React.Component<{}, IState> {
|
||||
await setConfigOption('last_ip', this.state.ip)
|
||||
await setConfigOption('last_port', this.state.port)
|
||||
|
||||
// Set IP
|
||||
await invoke('set_proxy_addr', { addr: (this.state.httpsEnabled ? 'https':'http') + '://' + this.state.ip + ':' + this.state.port })
|
||||
await invoke('enable_process_watcher', {
|
||||
process: proc_name || game_exe
|
||||
})
|
||||
|
||||
if (config.use_internal_proxy) {
|
||||
// Set IP
|
||||
await invoke('set_proxy_addr', { addr: (this.state.httpsEnabled ? 'https':'http') + '://' + this.state.ip + ':' + this.state.port })
|
||||
// Connect to proxy
|
||||
await invoke('connect', { port: 8365, certificatePath: await dataDir() + '\\cultivation\\ca' })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user