forked from nullcstring/turnbridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick_link.py
More file actions
executable file
·34 lines (29 loc) · 786 Bytes
/
quick_link.py
File metadata and controls
executable file
·34 lines (29 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import json
import base64
config = {
"name": "My Server",
"turn": "https://vk.com/call/join/YOUR_INVITE_LINK",
"peer": "YOUR_SERVER_IP:PORT",
"listen": "127.0.0.1:9000",
"n": 16,
"turnHost": "",
"turnPort": "",
"udp": True,
"wg": """[Interface]
PrivateKey = YOUR_CLIENT_PRIVATE_KEY
Address = 10.100.0.2/32
DNS = 8.8.8.8
MTU = 1280
[Peer]
PublicKey = YOUR_SERVER_PUBLIC_KEY
AllowedIPs = 0.0.0.0/0
Endpoint = 127.0.0.1:9000
PersistentKeepalive = 25"""
}
json_string = json.dumps(config, separators=(',', ':'))
base64_bytes = base64.b64encode(json_string.encode('utf-8'))
base64_string = base64_bytes.decode('utf-8')
final_link = f"vbridge://{base64_string}"
print("\n=== ===")
print(final_link)
print("========================================\n")