From 6bdc1f34f1c0e510a5b5ecd078a021966251ee95 Mon Sep 17 00:00:00 2001 From: Kiritow <1362050620@qq.com> Date: Tue, 13 Jul 2021 06:03:49 +0000 Subject: [PATCH] Fix permission issue --- tool_generate.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tool_generate.py b/tool_generate.py index e9e38ad..477e31b 100644 --- a/tool_generate.py +++ b/tool_generate.py @@ -34,12 +34,16 @@ AllowedIPs = {} with open("start.sh", "w", encoding='utf-8') as f: f.write('''#!/bin/bash set -x + +cp {}.conf /etc/wireguard/ tmux new-session -s tunnel -d -''') +'''.format(config["interface"])) for info in udp_clients: f.write('''tmux new-window -t tunnel -d './udp2raw_amd64 -c -l127.0.0.1:{} -r{} -k "{}" --raw-mode faketcp -a' \n'''.format(info["port"], info["remote"], info["password"])) for info in udp_servers: f.write('''tmux new-window -t tunnel -d './udp2raw_amd64 -s -l0.0.0.0:{} -r 127.0.0.1:{} -k "{}" --raw-mode faketcp -a' \n'''.format(info["port"], config["listen"], info["password"])) - f.write('''tmux attach-session -t tunnel\n''') + f.write('''wg-quick up {} +tmux attach-session -t tunnel +'''.format(config["interface"]))