add database

This commit is contained in:
Leon Vita 2022-12-29 03:31:21 +00:00
parent 167aa63dd4
commit 5079bf66cc
5 changed files with 22 additions and 2 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -2,7 +2,7 @@
Address = 10.10.11.103/24
PrivateKey = qAGUiA1gIa7uvxIUMol0DPYoxp5udMn920qkIT8R0U8=
[Peer]
PublicKey = w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=
PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=
Endpoint = 45.158.40.162:18900
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25

20
data.py Normal file
View File

@ -0,0 +1,20 @@
import sqlite3
create = sqlite3.connect("db")
connect = create.cursor()
connect.execute(""" CREATE TABLE IPS
(
ips text
)
""")
connect.execute(""" CREATE TABLE USERS
(
users text
)
""")
create.commit()
create.close()

BIN
db Normal file

Binary file not shown.

2
gen.sh
View File

@ -86,7 +86,7 @@ echo -ne '################ (60%)\n'
sleep 1
echo "Adding peer......";sleep 2
echo "[Peer]">>$file_name;
echo "PublicKey = w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=">> $file_name
echo "PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=">> $file_name
echo "Endpoint = 45.158.40.162:18900">> $file_name
if [ $allow -eq 1 ];then