A Pen by Mo Ismailzai on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# forked from https://etherarp.net/network-isolation-of-services-with-systemd/index.html | |
# ln -s /path/to/this/file /usr/lib/systemd/system/netns-proton.service | |
[Unit] | |
After=zfs-mount.service | |
Description=Named network namespace "proton" | |
StopWhenUnneeded=true | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# forked from https://www.wireguard.com/netns/#the-new-namespace-solution & expanded by mo@ismailzai.com ############### | |
# CONFIGURABLE ######################################################################################################### | |
ALL_PHYSICAL_INTERFACES=(enp6s0) | |
ALL_WIRELESS_INTERFACES=() | |
NETWORK_NAMESPACE_NAME=proton | |
VPN_CONFIG_PATH=/tank/opt/nas1-config/vpn/proton_us_ca_72.conf | |
VPN_DNS_SERVER=10.2.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eux | |
if [ "$(whoami)" != "root" ] | |
then | |
sudo su -s "$0" | |
exit | |
fi | |
# truncate any logs that have built up during the install | |
find /var/log -type f -exec truncate --size=0 {} \; |
This guide will enable systemd
to run as normal under WSL 2. This will enable services like microk8s
, docker
and many more to just work
during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.
-
To enable
systemd
under WSL we require a tool calledsystemd-genie
-
Copy the contents of
install-sg.sh
to a new file/tmp/install-sg.sh
:cd /tmp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Net Stuff (affects connection to the server: increases bandwidth, reduces interpolation, choke, and latency) | |
rate "786432" | |
cl_cmdrate "128" | |
cl_forcepreload "1" | |
cl_lagcompensation "1" | |
cl_interp "0" | |
cl_interp_ratio "1" | |
cl_updaterate "128" | |
mm_dedicated_search_maxping "35" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KEYBINDINGS | |
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings | |
are: | |
F2 - Create a new window | |
F3 - Move to previous window | |
F4 - Move to next window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Purge all Varnish cache | |
varnishadm "ban req.url ~ /" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: go | |
# Only the last two Go releases are supported by the Go team with security | |
# updates. Any versions older than that should be considered deprecated. | |
# Don't bother testing with them. tip builds your code with the latest | |
# development version of Go. This can warn you that your code will break | |
# in the next version of Go. Don't worry! Later we declare that test runs | |
# are allowed to fail on Go tip. | |
go: | |
- 1.9 |
NewerOlder