Refactor: Implement TCP Brutal installation in Python
This commit is contained in:
@ -42,7 +42,7 @@ class Command(Enum):
|
||||
SHELL_SINGBOX = os.path.join(SCRIPT_DIR, 'singbox', 'singbox_shell.sh')
|
||||
SHELL_WEBPANEL = os.path.join(SCRIPT_DIR, 'webpanel', 'webpanel_shell.sh')
|
||||
INSTALL_NORMALSUB = os.path.join(SCRIPT_DIR, 'normalsub', 'normalsub.sh')
|
||||
INSTALL_TCP_BRUTAL = os.path.join(SCRIPT_DIR, 'tcp-brutal', 'install.sh')
|
||||
INSTALL_TCP_BRUTAL = os.path.join(SCRIPT_DIR, 'tcp-brutal', 'install.py')
|
||||
INSTALL_WARP = os.path.join(SCRIPT_DIR, 'warp', 'install.py')
|
||||
UNINSTALL_WARP = os.path.join(SCRIPT_DIR, 'warp', 'uninstall.py')
|
||||
CONFIGURE_WARP = os.path.join(SCRIPT_DIR, 'warp', 'configure.py')
|
||||
@ -431,7 +431,7 @@ def update_geo(country: str):
|
||||
|
||||
def install_tcp_brutal():
|
||||
'''Installs TCP Brutal.'''
|
||||
run_cmd(['bash', Command.INSTALL_TCP_BRUTAL.value])
|
||||
run_cmd(['python3', Command.INSTALL_TCP_BRUTAL.value])
|
||||
|
||||
|
||||
def install_warp():
|
||||
|
||||
15
core/scripts/tcp-brutal/install.py
Normal file
15
core/scripts/tcp-brutal/install.py
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
def main():
|
||||
print("Installing TCP Brutal...")
|
||||
|
||||
subprocess.run("bash -c \"$(curl -fsSL https://tcp.hy2.sh/)\"", shell=True)
|
||||
os.system('clear')
|
||||
|
||||
print("TCP Brutal installation complete.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
echo "Installing TCP Brutal..."
|
||||
bash <(curl -fsSL https://tcp.hy2.sh/)
|
||||
sleep 3
|
||||
clear
|
||||
echo "TCP Brutal installation complete."
|
||||
Reference in New Issue
Block a user