mirror of
https://github.com/Kiritow/wg-ops.git
synced 2024-03-22 13:11:37 +08:00
Update Readme
This commit is contained in:
parent
73ead365ed
commit
32f1742c20
|
@ -1,3 +1,11 @@
|
||||||
# Wireguard Ops
|
# Wireguard Ops
|
||||||
|
|
||||||
Interactive setup scripts for [Wireguard](https://github.com/WireGuard/wireguard-go) over [udp2raw-tunnel](https://github.com/wangyu-/udp2raw-tunnel).
|
Interactive setup scripts for [Wireguard](https://github.com/WireGuard/wireguard-go) over [udp2raw-tunnel](https://github.com/wangyu-/udp2raw-tunnel).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
1. Run `install.sh`. (May require Super user permission)
|
||||||
|
|
||||||
|
2. Run `create.sh` and fill in content interactively.
|
||||||
|
|
||||||
|
3. Run the generated `start.sh`. (May require Super user permission)
|
||||||
|
|
|
@ -135,7 +135,10 @@ while True:
|
||||||
print("[{}] UDP2Raw Tunnel to Remote {}".format(index + 1, client_info["remote"]))
|
print("[{}] UDP2Raw Tunnel to Remote {}".format(index + 1, client_info["remote"]))
|
||||||
|
|
||||||
peer_endpoint = input("Enter Wireguard Peer Endpoint (ID from tunnel list, keep empty on server side): ").strip()
|
peer_endpoint = input("Enter Wireguard Peer Endpoint (ID from tunnel list, keep empty on server side): ").strip()
|
||||||
peer_keepalive = input("Enter Wireguard Peer Keep Alive seconds (Keep empty on server side): ").strip()
|
if peer_endpoint:
|
||||||
|
peer_keepalive = input("Enter Wireguard Peer Keep Alive seconds: ").strip()
|
||||||
|
else:
|
||||||
|
peer_keepalive = ""
|
||||||
|
|
||||||
peers.append({
|
peers.append({
|
||||||
"pubkey": peer_pubk,
|
"pubkey": peer_pubk,
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
import os
|
||||||
import json
|
import json
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ AllowedIPs = {}
|
||||||
if info["keepalive"]:
|
if info["keepalive"]:
|
||||||
f.write("PersistentKeepalive = {}".format(info["keepalive"]))
|
f.write("PersistentKeepalive = {}".format(info["keepalive"]))
|
||||||
|
|
||||||
|
os.system("chmod 600 {}.conf".format(config["interface"]))
|
||||||
|
|
||||||
print("Generating start script...")
|
print("Generating start script...")
|
||||||
with open("start.sh", "w", encoding='utf-8') as f:
|
with open("start.sh", "w", encoding='utf-8') as f:
|
||||||
|
@ -55,4 +57,9 @@ tmux new-session -s tunnel -d
|
||||||
tmux attach-session -t tunnel
|
tmux attach-session -t tunnel
|
||||||
'''.format(config["interface"]))
|
'''.format(config["interface"]))
|
||||||
|
|
||||||
print("[OK] Config generated. Be sure to configure and enable UFW (or any other firewall) before start.")
|
print('''[OK] Config generated. Before you run start.sh, besure to:
|
||||||
|
1. Disable SSH Server password login.
|
||||||
|
2. Enable UFW (or any other firewall)
|
||||||
|
|
||||||
|
Safety First.
|
||||||
|
''')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user