All Projects → apognu → Wgctl Py

apognu / Wgctl Py

Licence: mit
Manage your WireGuard tunnels with ease

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Wgctl Py

Protonvpn Cli
Legacy protonvpn-cli: ProtonVPN Command-Line Tool for Linux and macOS. This has been superseded by https://github.com/ProtonVPN/protonvpn-cli-ng
Stars: ✭ 575 (+2513.64%)
Mutual labels:  vpn
Node
Mysterium Network Node - official implementation of distributed VPN network (dVPN) protocol
Stars: ✭ 681 (+2995.45%)
Mutual labels:  vpn
Pritunl Client Electron
Pritunl OpenVPN client
Stars: ✭ 772 (+3409.09%)
Mutual labels:  vpn
Wireguard Install
WireGuard VPN server installer
Stars: ✭ 616 (+2700%)
Mutual labels:  vpn
Wireguard Install
WireGuard road warrior installer for Ubuntu, Debian, CentOS and Fedora
Stars: ✭ 650 (+2854.55%)
Mutual labels:  vpn
Bobarr
🍿 The all-in-one alternative for Sonarr, Radarr, Jackett... with a VPN and running in docker
Stars: ✭ 697 (+3068.18%)
Mutual labels:  vpn
Android App
Official ProtonVPN Android app
Stars: ✭ 547 (+2386.36%)
Mutual labels:  vpn
Freess
免费ss账号 免费shadowsocks账号 免费v2ray账号 (长期更新)
Stars: ✭ 6,544 (+29645.45%)
Mutual labels:  vpn
Aws Vpn Server Setup
Setup your own private, secure, free* VPN on the Amazon AWS Cloud in 10 minutes. CloudFormation
Stars: ✭ 672 (+2954.55%)
Mutual labels:  vpn
Raspberrypiwireguard
Install and configure WireGuard on Raspberry Pi (and others)
Stars: ✭ 755 (+3331.82%)
Mutual labels:  vpn
Openmptcprouter
OpenMPTCProuter is an open source solution to aggregate multiple internet connections using Multipath TCP (MPTCP) on OpenWrt
Stars: ✭ 652 (+2863.64%)
Mutual labels:  vpn
Wireguard Vyatta Ubnt
WireGuard for Ubiquiti Devices
Stars: ✭ 651 (+2859.09%)
Mutual labels:  vpn
Vpncloud
Peer-to-peer VPN
Stars: ✭ 708 (+3118.18%)
Mutual labels:  vpn
Free
翻墙、免费翻墙、免费科学上网、免费节点、免费梯子、免费ss/v2ray/trojan节点、蓝灯、谷歌商店、翻墙梯子
Stars: ✭ 16,689 (+75759.09%)
Mutual labels:  vpn
Wgcf
🚤 Cross-platform, unofficial CLI for Cloudflare Warp
Stars: ✭ 778 (+3436.36%)
Mutual labels:  vpn
No Free vpn
亲测可用的 VPN。亲测有效的科学上网,同时支持 windows、mac、linux、ios 和 andrioid 系统。并提供 chrome、firefox、opera 等浏览器的插件使用。
Stars: ✭ 552 (+2409.09%)
Mutual labels:  vpn
Wg Ui
WireGuard Web UI for self-serve client configurations, with optional auth.
Stars: ✭ 690 (+3036.36%)
Mutual labels:  vpn
Zerotierone
A Smart Ethernet Switch for Earth
Stars: ✭ 7,839 (+35531.82%)
Mutual labels:  vpn
Simplert
Simple Reverse Tethering utility for Android
Stars: ✭ 803 (+3550%)
Mutual labels:  vpn
Openvpn Install
Set up your own OpenVPN server on Debian, Ubuntu, Fedora, CentOS or Arch Linux.
Stars: ✭ 7,142 (+32363.64%)
Mutual labels:  vpn

This was a test project to get myself familiarized with WireGuard and Netlink. The final project is made with Golang and can be found at https://github.com/apognu/wgctl.

wgctl - WireGuard control utility

This is a personal project to allow WireGuard to be configured through the use of YAML files. It uses Netlink under the hood for all interaction with the system.

This tool is very opinionated and designed for my own use, it might not be what you're looking for. For instance, it probably does not handle IPv6 very well for now.

The configuration file should look like this:

description: Personal VPN server #1
interface:
  address: 192.168.0.1/32
  listen_port: 42000
  private_key: /etc/wireguard/vpn1.key
  fwmark: 1024
  post_up:
    - /usr/bin/nft add rule inet filter input udp dport 42000 accept
peers:
  - description: VPN gateway at provider X
    public_key: cyfBMbaJ6kgnDYjio6xqWikvTz2HvpmvSQocRmF/ZD4=
    endpoint: 1.2.3.4:42000
    persistent_keepalive_interval: 10
    allowed_ips:
      - 192.168.0.0/24
      - 192.168.1.0/24

By default, wgctl will look for its configuration files under /etc/wireguard (as /etc/wireguard/<id>.yml). This can be overriden by giving it a filesystem path instead of an identifier.

The post_up and pre_down lists of commands are executed with an empty PATH, so absolute paths must be used. The are also not executed in the context of a shell, so any subtitution will not work, as well as arguments with spaces (for now).

Usage

$ wgctl --help
Usage: wgctl [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --verbose
  --help         Show this message and exit.

Commands:
  stop     bring down a tunnel
  restart  restarts a tunnel (reloading its...
  info     shows information on a particular tunnel
  status   shows if a tunnel is up
  start    starts up a tunnel
  version

$ wgctl up vpn1
[✓] WireGuard tunnel set up successfully

$ wgctl up vpn2
[✓] WireGuard tunnel set up successfully

$ wgctl status
[✓] Personal VPN server #1 (vpn1)
[✓] Personal VPN server #2 (vpn2)

$ wgctl downup vpn1
[✓] WireGuard tunnel brought down successfully
[✓] WireGuard tunnel set up successfully

$ wgctl info vpn1
tunnel: Personal VPN server #1
  interface: vpn1
  public key: 7cm1E7OnH3GV7p5CatWYHbw7NJX2ljzDaRMTYWWgLk0=
  listening port: 42000

  - peer: VPN gateway at provider X
    public key: cyfBMbaJ6kgnDYjio6xqWikvTz2HvpmvSQocRmF/ZD4=
    endpoint: 1.2.3.4:42000
    allowed ips: 192.168.0.0/24, 192.168.1.0/24
    preshared key? True

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].