A secure mesh VPN with Post-Quantum Cryptography.
- Post-quantum secure key exchange using hybrid classical/post-quantum cryptography
- End-to-end encrypted communication between nodes
- Mesh topology allowing direct peer-to-peer connections
- Certificate-based identity system for secure authentication
- Protection against MITM attacks during key exchange
- Automatic peer discovery through a central discovery server
- Python 3.8+
- pytun/tunctl or equivalent (for TUN interface support)
- Clone the repository:
git clone https://github.com/yourusername/SMESH-VPN.git
cd SMESH-VPN- Install dependencies:
pip install -r requirements.txtSMESH-VPN uses certificate-based authentication to ensure that only authorized clients can connect to the network and to protect against MITM attacks.
Before clients can connect, you need to set up a Certificate Authority:
python ca_manager.py --create-ca --ca-dir caIssue certificates for each client that needs to connect:
python ca_manager.py --issue-cert --ca-dir ca --common-name "Client1"This will generate a client certificate in the ca/clients/<client_id> directory.
To view all authorized clients:
python ca_manager.py --list-clients --ca-dir caTo revoke a certificate:
python ca_manager.py --revoke-cert --ca-dir ca --client-id <client_id>Start the discovery server:
sudo python server/discovery_server.pyStart a VPN client with certificate authentication:
sudo python client/client.py --cert-dir ca/clients/<client_id> --client-id <client_id>Or specify additional parameters:
sudo python client/client.py -i 10.10.0.2 -p 9000 -d discovery.example.com:8000 --cert-dir ca/clients/<client_id> --client-id <client_id>- The certificates are used to authenticate clients during connection establishment
- All key exchanges are protected against MITM attacks
- Only authorized clients with valid certificates can connect to the VPN
- The discovery server validates client certificates before allowing connections
- All data exchanged between peers is end-to-end encrypted
You can also run the VPN components in Docker:
docker-compose up -dRun the tests:
python -m unittest discover testsThis project is licensed under the MIT License - see the LICENSE file for details.