Абсолютный путь до proxychains и его настроек

This commit is contained in:
2026-06-03 09:01:32 +03:00
parent 31de242669
commit 472530fd40
+5 -2
View File
@@ -1,4 +1,4 @@
from os import system from os import system, getenv
from os.path import exists, expanduser from os.path import exists, expanduser
from requests import get from requests import get
from re import search from re import search
@@ -98,7 +98,10 @@ run_command = search(r'command=(\S+)', flatpak_info.decode('utf-8')).group(1)
print('----------- END ------------\n') print('----------- END ------------\n')
print('Generating proxy script') print('Generating proxy script')
with open(expanduser(f'~/proxychains/{app_name}_proxy.sh'), 'w') as f: with open(expanduser(f'~/proxychains/{app_name}_proxy.sh'), 'w') as f:
f.write(f'proxychains/proxychains4 -f proxychains/proxychains4.conf {run_command}') # OLD version work with most applications, but there are 1-2 with which it won't work
# f.write(f'proxychains/proxychains4 -f proxychains/proxychains4.conf {run_command}')
user = getenv("USER")
f.write(f'/home/{user}/proxychains/proxychains4 -f /home/{user}/proxychains/proxychains4.conf {run_command}')
f.close() f.close()
system(f'chmod +x ~/proxychains/{app_name}_proxy.sh') system(f'chmod +x ~/proxychains/{app_name}_proxy.sh')
print('\n---- Generated command -----') print('\n---- Generated command -----')