From dc20fe59168325b42976e5bede70fe0afd3fa83b Mon Sep 17 00:00:00 2001 From: SpikeHD Date: Tue, 19 Jul 2022 17:52:17 -0700 Subject: [PATCH] set proxy addr only when launching with proxy --- src/ui/components/ServerLaunchSection.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/components/ServerLaunchSection.tsx b/src/ui/components/ServerLaunchSection.tsx index c8cd85b..067ad02 100644 --- a/src/ui/components/ServerLaunchSection.tsx +++ b/src/ui/components/ServerLaunchSection.tsx @@ -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' }) }