mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 17:44:38 +00:00
handle clean_env for remotetunnel
This commit is contained in:
parent
a417cd87c7
commit
afca31bfbe
1 changed files with 10 additions and 1 deletions
|
@ -6084,8 +6084,17 @@ def setuptunnel(global_memory, has_sd):
|
|||
else:
|
||||
print("Starting Cloudflare Tunnel for Linux, please wait...", flush=True)
|
||||
tunnelbinary = "./cloudflared-linux-amd64"
|
||||
|
||||
tunnelproc = None
|
||||
if sys.platform == "linux":
|
||||
clean_env = os.environ.copy()
|
||||
clean_env.pop("LD_LIBRARY_PATH", None)
|
||||
clean_env["PATH"] = "/usr/bin:/bin"
|
||||
tunnelproc = subprocess.Popen(f"{tunnelbinary} tunnel --url {httpsaffix}://localhost:{int(args.port)}{ssladd}", text=True, encoding='utf-8', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, env=clean_env)
|
||||
else:
|
||||
tunnelproc = subprocess.Popen(f"{tunnelbinary} tunnel --url {httpsaffix}://localhost:{int(args.port)}{ssladd}", text=True, encoding='utf-8', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
|
||||
time.sleep(10)
|
||||
|
||||
def tunnel_reader():
|
||||
nonlocal tunnelproc,tunneloutput,tunnelrawlog
|
||||
pattern = r'https://[\w\.-]+\.trycloudflare\.com'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue