Magic util that "bridges" Wireguard with OpenVPN without a TUN/TAP interface

wg-ovpn

Magic util that "bridges" Wireguard with OpenVPN without a TUN/TAP interface

Warning: really ugly and unstable code!

Building

Obtain latest source of OpenVPN (link), apply patch tunsetiff.patch and place the resulting openvpn binary in this project's folder.

Then, run go build (requires Go 1.17 or later).

Usage

./wg-ovpn <.ovpn file> <wireguard config file>

Please note that this util doesn't support wg-quick's .conf format, rather it uses wireguard-go's internal UAPI config format: basically, you can't put section labels like [Interface], everything else works roughly the same (didn't test though)

Example config:

listen_port=55555
private_key=a8dac1d8a70a751f0f699fb14ba1cff7b79cf4fbd8f09f44c6e6a90d0369604f
public_key=28d2b91462b95913ac4fe68259fbabfe4a150314edf04bf4437eaf553d02804c
allowed_ip=0.0.0.0/0

TL;DR How does it work?

It creates a pair of pseudoterminals that serve as a bidirectional pipe, with one end connected to OpenVPN, and the other one to Wireguard.

It also has a bit of code to replace source/destination IP address to match what OpenVPN expects, so Wireguard clients can use virtually any IP address and still connect to the OpenVPN network.

Limitations

  • only 1 Wireguard client is currently supported
  • I have no idea if it works with other OpenVPN setups than what I have
Owner
Patrycja
ptrcnull#3709 on Discord; @ptrcnull on most of social media; shitposts: https://git.ddd.rip/ptrcnull no job offers please
Patrycja
Similar Resources

A Wireguard VPN Server Manager and API to add and remove clients

Wireguard Manager And API A manager and API to add, remove clients as well as other features such as an auto reapplier which deletes and adds back a c

Dec 22, 2022

Layer2 version of wireguard with Floyd Warshall implement in go.

Etherguard 中文版README A Full Mesh Layer2 VPN based on wireguard-go OSPF can find best route based on it's cost. But sometimes the lentancy are differen

Dec 29, 2022

Mount your podman container into WireGuard networks on spawn

wg-pod A tool to quickly join your podman container/pod into a WireGuard network. Explanation wg-pod wires up the tools ip,route,wg and podman. It cre

Aug 14, 2022

Go Implementation of WireGuard

Go Implementation of WireGuard

Jan 2, 2023

A HTTP proxy server tunnelling through wireguard

wg-http-proxy This project hacks together the excellent https://github.com/elazarl/goproxy and https://git.zx2c4.com/wireguard-go into an HTTP proxy s

Dec 30, 2022

NAT puncher for Wireguard mesh networking.

natpunch-go This is a NAT hole punching tool designed for creating Wireguard mesh networks. It was inspired by Tailscale and informed by this example.

Dec 12, 2022

generate Wireguard keypairs with a given prefix string

wireguard-vanity-address Generate Wireguard keypairs with a given prefix string. The Wireguard VPN uses Curve25519 keypairs, and displays the Base64-e

Nov 9, 2022

udppunch hole for wireguard

udppunch udp punch for wireguard, inspired by natpunch-go usage server side ./punch-server-linux-amd64 -port 19993 client side make sure wireguard is

Nov 24, 2022

A C/S Tool to Download Torrent Remotely and Retrieve Files Back Over HTTP at Full Speed without ISP Torrent Limitation.

remote-torrent Download Torrent Remotely and Retrieve Files Over HTTP at Full Speed without ISP Torrent Limitation. This repository is an extension to

Sep 30, 2022
Comments
  • Terrible network bandwidth

    Terrible network bandwidth

    iperf3 -c <host>
    Connecting to host <host>, port 5201
    [  5] local <client> port 40698 connected to <host> port 5201
    [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
    [  5]   0.00-1.00   sec   129 KBytes  1.06 Mbits/sec   36   2.63 KBytes       
    [  5]   1.00-2.00   sec  42.1 KBytes   344 Kbits/sec   16   2.63 KBytes       
    [  5]   2.00-3.00   sec  81.5 KBytes   668 Kbits/sec   16   2.63 KBytes       
    [  5]   3.00-4.00   sec  82.8 KBytes   679 Kbits/sec   16   2.63 KBytes       
    [  5]   4.00-5.00   sec  40.7 KBytes   334 Kbits/sec   16   1.31 KBytes       
    [  5]   5.00-6.00   sec  84.1 KBytes   689 Kbits/sec   15   2.63 KBytes       
    [  5]   6.00-7.00   sec  81.5 KBytes   668 Kbits/sec   16   2.63 KBytes       
    [  5]   7.00-8.00   sec  40.7 KBytes   334 Kbits/sec   16   2.63 KBytes       
    [  5]   8.00-9.00   sec  84.1 KBytes   689 Kbits/sec   16   2.63 KBytes       
    [  5]   9.00-10.00  sec  42.1 KBytes   344 Kbits/sec   15   2.63 KBytes       
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate         Retr
    [  5]   0.00-10.00  sec   708 KBytes   580 Kbits/sec  178             sender
    [  5]   0.00-10.22  sec   676 KBytes   541 Kbits/sec                  receiver
    
    iperf Done.
    
Related tags
An util to bypass clash-premium tun for commands

without-clash An util to bypass clash-premium tun for commands Requirement Kernel Features: cgroup2 ebpf && cgroup2 sock attach point iproute2 Install

Dec 19, 2022
🐉 Simple WireGuard proxy with minimal overhead for WireGuard traffic.

swgp-go ?? Simple WireGuard proxy with minimal overhead for WireGuard traffic. Proxy Modes 1. Zero overhead Simply AES encrypt the first 16 bytes of a

Jan 8, 2023
Tu: a time util for golang

tu - Time Util package tu is a time util for golang Install go get github.com/ip

Nov 28, 2022
Go-fileprobe - Probe util with file for golang

Golang file probe package Probe util with file for golang Install go get github.

Jan 5, 2022
A fork of the simple WireGuard VPN server GUI community maintained
A fork of the simple WireGuard VPN server GUI community maintained

Subspace - A simple WireGuard VPN server GUI Subspace - A simple WireGuard VPN server GUI Slack Screenshots Features Contributing Setup 1. Get a serve

Dec 25, 2022
A flexible configuration manager for Wireguard networks
A flexible configuration manager for Wireguard networks

Drago A flexible configuration manager for WireGuard networks Drago is a flexible configuration manager for WireGuard networks which is designed to ma

Jan 7, 2023
Simple Web based configuration generator for WireGuard. Demo:
Simple Web based configuration generator for WireGuard. Demo:

Wg Gen Web Simple Web based configuration generator for WireGuard. Why another one ? All WireGuard UI implementations are trying to manage the service

Jan 1, 2023
The easiest, most secure way to use WireGuard and 2FA.

This repository contains all the open source Tailscale client code and the tailscaled daemon and tailscale CLI tool. The tailscaled daemon runs primarily on Linux; it also works to varying degrees on FreeBSD, OpenBSD, Darwin, and Windows.

Jan 8, 2023
Connect your devices into a single private WireGuard®-based mesh network.

Wiretrustee A WireGuard®-based mesh network that connects your devices into a single private network. Why using Wiretrustee? Connect multiple devices

Dec 31, 2022
An userspace SORACOM Arc client powered by wireguard-go

soratun An easy-to-use, userspace SORACOM Arc client powered by wireguard-go. For deploying and scaling Linux servers/Raspberry Pi devices working wit

Jun 2, 2022