Skip to content

Instantly share code, notes, and snippets.

View mersinvald's full-sized avatar

Mike Lubinets mersinvald

View GitHub Profile

VPNv2

Base facts:

  • Uses Dual Stack IPv6 + IPv4 over Wireguard
  • Sites are in a fully-connected wireguard mesh
  • Sites are BGP neighbors
  • Cross-site devices are connected to more than one site
  • Routing to cross-site devices is managed with BGP
  • Clients are never connected directly and should only communicate through sites: although direct connection is possible and can be used, inconsistensies may occur when automatically updating IP addresses of the peers, and manual reconfiguration of those clients would be necessary in such cases.
  • If site is not a part of full mesh, routing to is is managed is BGP
  • No NAT required with IPv6, very powerful access-management is possible on firewall-level
[
1200,
{
"backcolor": "#ffffff",
"name": "Moonlander Violet",
"author": "originally by ilya sheprut aka optozorax, forked by mike lubinets aka mersinvald",
"radii": "",
"switchMount": "",
"switchBrand": "",
"switchType": ""
@mersinvald
mersinvald / Moonlander-Game-Layer_-Bannerlord.kbd.json
Last active July 11, 2021 12:52
Moonlander Game Layer: Bannerlord
[
1200,
{
"backcolor": "#ffffff",
"name": "Moonlander Game Layer: Bannerlord",
"author": "Mike Lubines aka mersinvald",
"radii": "",
"switchMount": "",
"switchBrand": "",
"switchType": ""
@mersinvald
mersinvald / Moonlander-Gaming.kbd.json
Last active July 11, 2021 12:51
Moonlander Gaming
[
1200,
{
"backcolor": "#ffffff",
"name": "Moonlander Gaming",
"author": "originally by ilya sheprut aka optozorax, forked by mike lubinets aka mersinvald",
"radii": "",
"switchMount": "",
"switchBrand": "",
"switchType": ""
@mersinvald
mersinvald / Moonlander-Red.kbd.json
Last active July 11, 2021 12:52
Moonlander Red
[
1200,
{
"backcolor": "#ffffff",
"name": "Moonlander Red",
"author": "originally by ilya sheprut aka optozorax, forked by mike lubinets aka mersinvald",
"radii": "",
"switchMount": "",
"switchBrand": "",
"switchType": ""
@mersinvald
mersinvald / Moonlander-Yellow.kbd.json
Last active May 18, 2021 16:55
Moonlander Yellow
[
1200,
{
"backcolor": "#ffffff",
"name": "Moonlander Yellow",
"author": "originally by ilya sheprut aka optozorax, forked by mike lubinets aka mersinvald",
"radii": "",
"switchMount": "",
"switchBrand": "",
"switchType": ""
[
1200,
{
"backcolor": "#ffffff",
"name": "Moonlander Russian",
"author": "originally by ilya sheprut aka optozorax, forked by mike lubinets aka mersinvald",
"radii": "",
"switchMount": "",
"switchBrand": "",
"switchType": ""
[
1200,
{
"backcolor": "#ffffff",
"name": "Moonlander English",
"author": "originally by ilya sheprut aka optozorax, forked by mike lubinets aka mersinvald",
"radii": "",
"switchMount": "",
"switchBrand": "",
"switchType": ""
[
1200,
{
"backcolor": "#ffffff",
"name": "Moonlander Base",
"author": "originally by ilya sheprut aka optozorax, forked by mike lubinets aka mersinvald",
"radii": "",
"switchMount": "",
"switchBrand": "",
"switchType": ""
@mersinvald
mersinvald / singleton.rs
Created November 12, 2018 14:21
Mutexed singleton example in Rust
use lazy_static::lazy_static;
use std::sync::{RwLock, Mutex};
use std::cell::Cell;
lazy_static! {
static ref SINGLETON: Mutex<Option<Singleton>> = Mutex::new(None);
}
#[derive(Debug, PartialEq)]
struct Singleton {