Skip to content

Commit

Permalink
Revert "fix: exclude private IPs from Wireguard profile, closes #42"
Browse files Browse the repository at this point in the history
This reverts commit 657e001.
Check #42.
  • Loading branch information
ViRb3 committed Sep 8, 2020
1 parent 657e001 commit d385063
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion wireguard/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ DNS = 1.1.1.1
MTU = 1280
[Peer]
PublicKey = {{ .PublicKey }}
AllowedIPs = 0.0.0.0/5, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/6, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, ::/0, 193.138.218.74/32
AllowedIPs = 0.0.0.0/0
AllowedIPs = ::/0
Endpoint = {{ .Endpoint }}`

type Profile struct {
Expand Down
3 changes: 2 additions & 1 deletion wireguard/profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ DNS = 1.1.1.1
MTU = 1280
[Peer]
PublicKey = 4
AllowedIPs = 0.0.0.0/5, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/6, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, ::/0, 193.138.218.74/32
AllowedIPs = 0.0.0.0/0
AllowedIPs = ::/0
Endpoint = 5`

result, err := generateProfile(&ProfileData{
Expand Down

0 comments on commit d385063

Please sign in to comment.