mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-03 09:33:10 -07:00
fix setting the custom cloudflared bin directory
This commit is contained in:
parent
9ecf1c6757
commit
39ac48d44f
1 changed files with 5 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { Tunnel, install } from 'cloudflared';
|
||||
import { Tunnel, install, use as setCloudflaredBin } from 'cloudflared';
|
||||
import { platform } from 'process';
|
||||
|
||||
import { logError } from '@/utils/node/logging';
|
||||
|
|
@ -42,15 +42,14 @@ export const startTunnel = async (
|
|||
const bin = getCloudflaredBin();
|
||||
|
||||
if (!fs.existsSync(bin)) {
|
||||
sendKoboldOutput('Installing cloudflared binary...');
|
||||
sendKoboldOutput(`Installing cloudflared binary to ${bin}...`);
|
||||
await install(bin);
|
||||
}
|
||||
|
||||
setCloudflaredBin(bin);
|
||||
|
||||
const tunnelTarget = getTunnelTarget(frontendPreference);
|
||||
const tunnel = Tunnel.quick(tunnelTarget, {
|
||||
'--no-autoupdate': true,
|
||||
bin,
|
||||
});
|
||||
const tunnel = Tunnel.quick(tunnelTarget, { '--no-autoupdate': true });
|
||||
activeTunnel = tunnel;
|
||||
|
||||
let rateLimited = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue