Metadata-Version: 1.1
Name: wireguard-p2p
Version: 0.1.2
Summary: A tool for setting up WireGuard connections from peer to peer.
Home-page: https://github.com/manuels/wireguard-p2p
Author: Manuel Schoelling
Author-email: manuel.schoelling@gmx.de
License: GPL
Description: # WireGuard Peer-to-Peer
        
        A tool for setting up WireGuard connections from peer to peer.
        
        It takes care of exchanging public keys, IP addresses and NAT traversal.
        
        
        ## Installation
        
        ### 0) Install WireGuard
        See WireGuard's [installation page](https://www.wireguard.io/install/)
        
        ### 1) Install [BulletinBoard DHT](https://github.com/manuels/bulletinboard-dht/)
        
        ```bash
            wget 'https://github.com/manuels/bulletinboard-dht/releases/download/v0.5.0/bulletinboard_0.5.0_amd64.deb'
            sudo dpkg -i bulletinboard_0.5.0_amd64.deb
        ```
        
        ### 2) Install wg-p2p
        
        ```bash
            pip install wireguard-p2p
        ```
        
        ## Exchange Public Keys
        
        ### 0) Create new config file (optional)
        
        Alice creates a new WireGuard [configuration file](https://git.zx2c4.com/WireGuard/about/src/tools/wg.8) on her computer named `bob`. (Bob does the same on his machine.)
        
        ```bash
        alice$ wg-p2p bob new | sudo tee /etc/wireguard/bob.conf >/dev/null
        
        alice$ sudo cat /etc/wireguard/bob.conf
        [Interface]
        ListenPort = 51800
        PrivateKey = p504swpAoXHitQOOPHfPmt4qqY5ik5xkUrMnAZTr4X8=
        Address = 10.0.100.2/24
        ```
        
        
        ### 1) Publish Public Keys
        
        Alice publishes her public key, so Bob can find it. 
        
        ```bash
        alice$ wg-p2p bob publish alice
        [sudo] password for alice: # to read /etc/wireguard/bob.conf
        Published public key LLgKTG7VaTZKzikIRR0oRkyZw1IKNPIXGt0RYJV2OWA= as "alice".
        ```
        
        
        ### 2) Retrieve Bob's Public Key
        
        Alice adds Bob's public key to her configuration file. (Bob does the same on his machine.)
        
        ```bash
        alice$ wg-p2p bob add-peer bob | sudo tee /etc/wireguard/bob.conf >/dev/null
        1 peer(s) found named "alice".
        Would you like to add the peer with public key EKJDRxMeLswhIpaCy6xnYLD1ZaHMNvi5SuT10L8w1m8=? [Y/n]
        ```
        
        
        ## Update Bob's IP and Port and traverse NAT
        
        Alice and Bob can determine their current IP address and setup NAT traversal (using STUN) and publish it.
        
        This has to be done initially and from time to time when both IP addresses change or the NAT traversal expired.
        
        ```bash
        alice$ wg-quick down bob
        
        alice$ wg-p2p bob update | sudo tee /etc/wireguard/bob.conf >/dev/null
        Own public address: 38.12.81.2:21280, NAT type: Full Cone
        Local NAT:  Full Cone
        Remote NAT: Full Cone
        [Interface]
        ListenPort = 51800
        PrivateKey = p504swpAoXHitQOOPHfPmt4qqY5ik5xkUrMnAZTr4X8=
        Address = 10.0.100.2/24
        
        [Peer]
        AllowedIPs = 10.0.0.0/24
        PublicKey = EKJDRxMeLswhIpaCy6xnYLD1ZaHMNvi5SuT10L8w1m8=
        Endpoint = 81.52.9.1:2286
        
        alice$ wg-quick up bob
        ```
        
        (Bob does the same on his machine.)
        
        
Keywords: wireguard peer-to-peer p2p
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Communications
Classifier: Topic :: System :: Networking
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
