start peer conf file, update README
This commit is contained in:
parent
8baaa06d84
commit
19668c0334
13
README.md
13
README.md
@ -1,8 +1,4 @@
|
||||
Purpose: to allow an overview of Darksky peers and provide a mechanism to allow
|
||||
easy joining
|
||||
|
||||
|
||||
dsnet is a simple tool to manage a wireguard VPN.
|
||||
dsnet is a simple tool to manage a wireguard VPN. Think wg-quick but quicker.
|
||||
|
||||
Usage: dsnet <cmd>
|
||||
|
||||
@ -19,3 +15,10 @@ dsnet is a simple tool to manage a wireguard VPN.
|
||||
|
||||
|
||||
To send configurations, ffsend (with separately transferred password) or a local QR code generator may be used.
|
||||
|
||||
TODO after first release:
|
||||
|
||||
* Hooks for adding routes/ IPtables forwarding rules
|
||||
* Forward option
|
||||
* Support for additional subnets in peer config
|
||||
* Peer endpoint support
|
||||
|
16
add.go
16
add.go
@ -19,7 +19,6 @@ func Add(hostname string, owner string, description string) { //, publicKey stri
|
||||
Description: description,
|
||||
PublicKey: publicKey,
|
||||
PresharedKey: presharedKey,
|
||||
// TODO Endpoint:
|
||||
AllowedIPs: []JSONIPNet{
|
||||
JSONIPNet{
|
||||
IPNet: net.IPNet{
|
||||
@ -33,3 +32,18 @@ func Add(hostname string, owner string, description string) { //, publicKey stri
|
||||
conf.MustAddPeer(peer)
|
||||
conf.MustSave()
|
||||
}
|
||||
|
||||
|
||||
func GetPeerWgQuickConf(peer PeerConfig, privKey JSONKey) string {
|
||||
return `[Interface]
|
||||
Address = 10.50.60.2/24
|
||||
PrivateKey=REDACTED
|
||||
DNS = 8.8.8.8
|
||||
|
||||
[Peer]
|
||||
PublicKey=cAR+SMd+yvGw2TVzVSRoLtxF5TLA2Y/ceebO8ZAyITw=
|
||||
Endpoint=3.9.82.135:51820
|
||||
AllowedIPs=0.0.0.0/0
|
||||
PersistentKeepalive=21
|
||||
`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user