diff --git a/database.json b/database.json new file mode 100644 index 0000000..4bd02be --- /dev/null +++ b/database.json @@ -0,0 +1,37 @@ +{ + "peers": { + "tokyo1": { + "PrivateKey": "qIM4Y95hEjZwKRnXs182gHUzJaNXvS5ypNztnvvau10=", + "Address": [ + "10.1.0.1/16" + ], + "ListenPort": 51820, + "Endpoint": "tokyo1.com", + "PersistentKeepalive": "25" + }, + "germany1": { + "PrivateKey": "8K2qSU4cN6nN+1SR3K17T8hDLIQSKSgQvfwE3cormFQ=", + "Address": [ + "10.2.0.1/16" + ], + "ListenPort": 51820, + "Endpoint": "germany1.com" + }, + "canada11": { + "PrivateKey": "2H2ASu9ZM5jG3pPdG4lW3e67PTc6VfRl4t5a8ddQ4Ug=", + "Address": [ + "10.3.0.1/16" + ], + "ListenPort": 51820, + "Endpoint": "canada1.com" + }, + "shanghai1": { + "PrivateKey": "oCsLP1KTIUWPKWnHluvyQW1YkpWgaO0Gz3iTDItUKV8=", + "Address": [ + "10.3.0.1/16" + ], + "ListenPort": 51820, + "Endpoint": "shanghai1.com" + } + } +} \ No newline at end of file diff --git a/wg_meshconf/database_manager.py b/wg_meshconf/database_manager.py index 7e4d5d7..2e015a7 100755 --- a/wg_meshconf/database_manager.py +++ b/wg_meshconf/database_manager.py @@ -4,7 +4,7 @@ Name: Database Manager Creator: K4YT3X Date Created: July 19, 2020 -Last Modified: January 12, 2021 +Last Modified: May 21, 2021 """ # built-in imports diff --git a/wg_meshconf/wg_meshconf.py b/wg_meshconf/wg_meshconf.py index 2d5eec8..219dd5f 100755 --- a/wg_meshconf/wg_meshconf.py +++ b/wg_meshconf/wg_meshconf.py @@ -52,7 +52,9 @@ def parse_arguments(): ) addpeer.add_argument("--privatekey", help="private key of server interface") addpeer.add_argument("--listenport", help="port to listen on", default=51820) - addpeer.add_argument("--persistentkeepalive", help="set persistent keepalive interval") + addpeer.add_argument( + "--persistentkeepalive", help="set persistent keepalive interval" + ) addpeer.add_argument("--fwmark", help="fwmark for outgoing packets") addpeer.add_argument("--dns", help="server interface DNS servers") addpeer.add_argument("--mtu", help="server interface MTU") @@ -78,7 +80,9 @@ def parse_arguments(): ) updatepeer.add_argument("--privatekey", help="private key of server interface") updatepeer.add_argument("--listenport", help="port to listen on") - updatepeer.add_argument("--persistentkeepalive", help="set persistent keepalive interval") + updatepeer.add_argument( + "--persistentkeepalive", help="set persistent keepalive interval" + ) updatepeer.add_argument("--fwmark", help="fwmark for outgoing packets") updatepeer.add_argument("--dns", help="server interface DNS servers") updatepeer.add_argument("--mtu", help="server interface MTU")