Skip to content

Commit

Permalink
temp fix for connect
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Sep 19, 2023
1 parent e95b776 commit 4f33758
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,13 @@ async function connect(connectOptions: {
console.log(`using proxy ${proxy} ${proxyport}`)

// check proxy server availability for proper error message
try {
await fetch(`http://${proxy}:${proxyport}/api/vm/net`, { method: 'GET' })
} catch (err) {
console.error(err)
throw new Error(`Proxy server ${proxy}:${proxyport} is not available`)
}
// todo fix correctly
// try {
// await fetch(`http://${proxy}:${proxyport}/api/vm/net`, { method: 'GET' })
// } catch (err) {
// console.error(err)
// throw new Error(`Proxy server ${proxy}:${proxyport} is not available`)
// }
//@ts-ignore
net.setProxy({ hostname: proxy, port: proxyport })
}
Expand Down

0 comments on commit 4f33758

Please sign in to comment.