• Stars
    star
    221
  • Rank 179,773 (Top 4 %)
  • Language
    Swift
  • License
    GNU General Publi...
  • Created over 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

macOS menubar icon for WireGuard/wg-quick

WireGuardStatusbar

Maintainability Build Status

Notice

There is now an official WireGuard application that supersedes this App. You can find it at: https://www.wireguard.com/install/ or directly download it from the AppStore: https://itunes.apple.com/us/app/wireguard/id1451685025?ls=1&mt=12

The WireGuardStatusbar application will remain available and might get updates/bugfixes but not develop any new features. You might still want to use it if you run a macOS prior to 10.14.

Introduction

This is a macOS statusbar item (aka menubar icon) that wraps wg-quick.

Screenshot

Features

  • Sit in your menubar
  • Indicate if tunnels are enabled
  • Bring tunnel up/down via one click
  • Fail miserably when brew/wg-quick is not installed or permissions on files are incorrect

Installation

Manually

  • Follow the instruction to install WireGuard for macOS
  • Create a tunnel configuration file (eg: /usr/local/etc/wireguard/utun1.conf)
  • Download this App from Releases
  • Open the .dmg and copy the Application to where you like (eg: '/Applications')
  • The next bit is needed because I don't have a Apple Developer account to properly sign the binary. If you don't like it consider building and signing the application yourself.
    • Start the App and get a dialog indicating the app is not signed
    • Go to: Preferences->Security & Privacy->General and click "Open Anyway"

Specify brew location

In case you have brew installed in some non-default directory since 1.16 you can specify brew or wg-quick path.

To set brew path:

sudo defaults write WireGuardStatusbarHelper brewPrefix /opt/local/

To set the path to wg-quick binary:

sudo defaults write WireGuardStatusbarHelper wgquickBinPath /opt/local/bin/wg-quick

Building & Testing

Automation scripting is provided in this repository to make development a little easier. Primary development using Xcode is supported/preferred but some actions (integration testing, distribution build) are only available using make.

To test the project and check code quality run:

make test-unit

Integration tests require preparation and will ask for a sudo password to install a test configuration file in /etc/wireguard:

make test-integration

Code formatting should preferably by done by computers. To auto correct most violations run (this is also run before each make test or make check):

make fix

To completely verify/test the project, build a distributable .dmg and install to /Applications simply run:

make

Or explore make with tab completion for other options.

Architecture/Security

  • This application is split into two parts. The Application and a Privileged Helper.
  • The App will sit in the menubar after launching and handle all UI interaction and logic.
  • Whenever the App needs to perform actions requiring Administrator privileges (eg: start/stop tunnel, read configurations) it will communicate with the Helper via XPC to have these actions performed.
  • The Helper is installed as a Privileged Launchd daemon during the startup of the App. The user will be prompted for credentials during this action.
  • Logic/responsability in the Helper is kept to a minimum and communication between the App and the Helper is in simple primitives to reduce attack surface of the Helper.
  • The Helper should not allow an unprivileged attacker to perform any actions via the XPC that would not be possible to perform when using the App.
  • Both the App and the Helper are signed and these signatures will be verified on Helper installation.
  • The Helper will only run during the runtime of the Application.
  • The Helper notifies the App on any change in the WireGuard configuration/runtime state. The App will then query the Helper to allow rebuilding its menus.

License

This software as a whole is licensed under GPL-3.0

"WireGuard" and the "WireGuard" logo are registered trademarks of Jason A. Donenfeld.

Todo/Readmap

  • Tunnel connectivity status
  • Tunnel configuration editor
  • Key management (via keychain)
  • Tunnel configuration augmentation (groups, alt. names, etc)
  • read configuration using wg
  • More tunnel statistics (privilegedhelper)
  • Recent tunnels on top option
  • Active tunnels on top option
  • Start tunnels at startup
  • Add application to startup items
  • Bundle WireGuard (wireguard-go/wg-quick/bash4)/Drop wg-quick for custom route creations (to drop bash4 as requirements and enable advances routing options like excluding local networks from 0.0.0.0/0).
  • Help menu
  • Developer ID signing
  • Update checking

More Repositories

1

terraform-provider-transip

Terraform provider to manage Transip resources
Go
35
star
2

python-rflink

Python
30
star
3

concourse-http-api-resource

Concourse resource to allow interaction with (simple) HTTP API's.
Python
25
star
4

timemachine

Netatalk timemachine server for docker
Shell
9
star
5

rcfile

Configuration file loader for Python projects
Python
8
star
6

templogger

Low-power Micropython MQTT temperature logger for DS18B20 and ESP8266 (Banggood ESP12E) running on 18650 Lipo.
Python
7
star
7

concourse-packer-resource

Concourse resource using Packer.
Python
5
star
8

KK2-firmware

Hobbyking KK2 assembler firmware
Assembly
4
star
9

concourse-ftp-resource

Concourse resource to interact with FTP servers.
Python
3
star
10

empty-epsilon-docker

Empty Epsilon for Linux
Dockerfile
3
star
11

mgmt.vscode

mgmt language support for VScode
3
star
12

writing-terraform-providers

Companion repository to writing Terraform providers presentation
Go
3
star
13

concourse-file-resource

Concourse resource for creating (credentials) files.
Shell
3
star
14

concourse-http-resource

Concourse resource for fetching files from versioned directories on a HTTP endpoint.
Python
3
star
15

concourse-aws-ami-resource

Resource implementing the awscli to work with AMI images.
Python
2
star
16

munerator

Openarena game manager
Python
1
star
17

rsmods-mac

Makefile
1
star
18

thuislab

Provisioning configuration for homelab.
HCL
1
star
19

quake-brensen

Openarena config
1
star
20

mgmt.tmbundle

mgmt language support for Textmate
1
star
21

solarmax

Script to read Solarmax Inverter and output metrics in graphite compatible format.
Python
1
star
22

remeha

Output Remeha Calenta metrics to Statsd/Graphite
Python
1
star
23

remeha-canbus

ESP32/ESPHome CAN bus interface for Remeha Calenta boiler
Python
1
star