mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 15:14:35 +01:00
set proxy addr only when launching with proxy
This commit is contained in:
@@ -116,13 +116,13 @@ export default class ServerLaunchSection extends React.Component<{}, IState> {
|
|||||||
await setConfigOption('last_ip', this.state.ip)
|
await setConfigOption('last_ip', this.state.ip)
|
||||||
await setConfigOption('last_port', this.state.port)
|
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', {
|
await invoke('enable_process_watcher', {
|
||||||
process: proc_name || game_exe
|
process: proc_name || game_exe
|
||||||
})
|
})
|
||||||
|
|
||||||
if (config.use_internal_proxy) {
|
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
|
// Connect to proxy
|
||||||
await invoke('connect', { port: 8365, certificatePath: await dataDir() + '\\cultivation\\ca' })
|
await invoke('connect', { port: 8365, certificatePath: await dataDir() + '\\cultivation\\ca' })
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user