Skip to content

Instantly share code, notes, and snippets.

@henri
henri / WireGuard iOS HOWTO.md
Created December 15, 2025 22:32 — forked from 4np/WireGuard iOS HOWTO.md
Setting up WireGuard to secure iPhone traffic

WireGuard

How to set up WireGuard as an iOS VPN configuration in order to tunnel all traffic from an iOS or iPadOS device through a Linux server.

While there are many configurations possible, my intentation was to secure the traffic from my iOS device by routing it securely through a Linux server. As such, this HowTo will show you how to set-up an initial working configuration, which you can customize afterward.

Most likely things will be missing, such as how to configure the firewall or the init scripts on your Linux distribution. As it won't be possible to cover all Linux flavors this HowTo will attempt to give you a working WireGuard configuration, leaving it up to you to fill-in the blanks. Feel free to write a comment to touch upon your specific situation to help others that might stumble upon this HowTo :)

Note: In these configuration examples I use 10.8.0.1/24 and 10.8.0.2/24. However, as WireGuard IPs may not overlap your other network interfaces

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@henri
henri / gist:e91dcde274cea0c584a73f9dc22b115f
Created July 16, 2025 02:24 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@henri
henri / await.sh
Created July 16, 2025 02:14 — forked from zzak/await.sh
Script to wait for localhost service in bash, with retries
#!/usr/bin/env bash
set -euo pipefail
TRIES=0
until [ $TRIES -eq 10 ] || nc -z localhost 3000; do
sleep 0.1
TRIES=$(( TRIES+1 ))
done
require 'csv'
require 'open-uri'
file = "Workbook3.csv"
content = CSV.read(open(file), encoding: 'ISO-8859-1:UTF-8', col_sep: ";")
File.open("output.csv", "w") do |f|
rows = content.map { |row| "\"#{row.join('","')}\"" }.join("\n")
f.puts(rows)
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@henri
henri / close_notifications_applescript.js
Created July 16, 2025 02:04 — forked from dentarg/close_notifications_applescript.js
AppleScript to close all notifications on macOS Big Sur
function run(input, parameters) {
const appName = "";
const verbose = true;
const scriptName = "close_notifications_applescript";
const CLEAR_ALL_ACTION = "Clear All";
const CLEAR_ALL_ACTION_TOP = "Clear";
const CLOSE_ACTION = "Close";
@henri
henri / ssh-multi.sh
Last active January 27, 2025 01:19 — forked from dmytro/ssh-multi.sh
Start multiple synchronized SSH connections with Tmux
#!/bin/bash
# ssh-multi
# Modified to check if the script is started within a TMUX session to avoid starting in a background TMUX session
# H.SHUSTAK
# Origional :
# D.Kovalov : https://gist.github.com/dmytro/3984680
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html
@henri
henri / ghostbuster
Created February 14, 2024 22:08 — forked from thunderpoot/ghostbuster
Mosh: You have N detached Mosh sessions on this server
#!/bin/bash
# You know that really annoying message that pops up...
# Mosh: You have 3 detached Mosh sessions on this server, with PIDs:
# - mosh [2294539]
# - mosh [1874313]
# - mosh [2294805]
# I often find myself copying this list of PIDs in order to kill them manually
git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "[email protected]"
git config --global credential.helper cache