Skip to content

Instantly share code, notes, and snippets.

@YKG
YKG / optimal_mtu.md
Created August 18, 2023 16:22 — forked from nitred/optimal_mtu.md
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@YKG
YKG / Linux Kernel 4.2.x - 4.4.x .config
Created April 2, 2022 11:25 — forked from jukbot/Linux Kernel 4.2.x - 4.4.x .config
This is Juk's linux kernel config file for vmware
# All options are required unless noted as "Optional" or under a # Begin and # End block, which is also noted as "Optional" or "Hardware Specific"
# It is important that they are selected as built-in or the kernel might fail to correctly detect the partitions and/or filesystems.
# It is a good idea to run "make defconfig" first
Device Drivers --->
Generic Driver Options --->
() path to uevent helper
[*] Maintain a devtmpfs filesystem to mount at /dev
[*] Automount devtmpfs at /dev, after the kernel mounted the rootfs
@YKG
YKG / microsoft.txt
Created December 8, 2019 07:34 — forked from CHEF-KOCH/microsoft.txt
Microsoft Products + file check
Nr. + product name + .exe/.iso/dvd + file integrety check
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 MS-DOS 6.0 (English) EN_MSDOS60.exe 2000-10-12 877B0B8E391ED07CB83214CB09E8F3B10C4B206F
2 SQL Server 2008 Enterprise (x86, x64, ia64) - DVD (Chinese-Simplified) zh-hans_sql_server_2008_enterprise_x86_x64_ia64_dvd_x14-89199.iso 2008-8-13 D23B103331AB0B3CCC82769B99CA1C2F16BEBBF4
3 Windows XP Professional with Service Pack 2- VL (Simplified Chinese) sc_win_xp_pro_with_sp2_vl.iso 2005-5-18 C0ADDD927B5D1F93DCE9C455FD6B26EAC7391BE9
4 MS-DOS 6.22 (English) EN_MSDOS622.exe 2000-10-12 D01AA47A5D85908185F8987E972AFC66DC92A735
@YKG
YKG / modern_crypto.md
Created September 18, 2019 12:18 — forked from byronhe/modern_crypto.md
现代密码学实践指南[2015年]

现代密码学实践指南[2015年]

标签(空格分隔): 密码学


本文介绍目前现代密码学的最先进技术, 前半部分主要翻译自 《Cryptographic Right Answers》,附上收集的资料,和byron个人的理解。

@YKG
YKG / rename-files.sh
Created September 20, 2018 08:30
rename multiple file names
for i in *.bak; do mv $i ${i%.bak}; done;
@YKG
YKG / instructions.txt
Created August 27, 2018 09:40 — forked from perplexes/instructions.txt
Move messages from iPhone to Android
# Migrate SMS from iPhone to Android in OSX #
Parts of this taken from http://pastebin.com/d4hNUmTK
1. Make an unencrypted backup of your iPhone to iTunes, not using iCloud.
2. cd /tmp
3. put iphone_sms_* here (found below)
4. Find your ~/Library/Application Support/MobileSync/Backup/*/3d0d7e5fb2ce288813306e4d4636395e047a3d28(.mddata)
5.
> sqlite3 ~/Library/Application Support/MobileSync/Backup/(id)/3d0d7e5fb2ce288813306e4d4636395e047a3d28(.mddata)
@YKG
YKG / iphone-text-message-sqlite.sql
Created August 27, 2018 09:36 — forked from aaronhoffman/iphone-text-message-sqlite.sql
SQLite SQL Query for iPhone Text Message Backup
-- more info http://aaron-hoffman.blogspot.com/2017/02/iphone-text-message-sqlite-sql-query.html
select
m.rowid
,coalesce(m.cache_roomnames, h.id) ThreadId
,m.is_from_me IsFromMe
,case when m.is_from_me = 1 then m.account
else h.id end as FromPhoneNumber
,case when m.is_from_me = 0 then m.account
else coalesce(h2.id, h.id) end as ToPhoneNumber
,m.service Service
@YKG
YKG / jreble.txt
Created June 1, 2018 07:05
IntelliJ
修改了源文件,没有看到 JRebel 加载新的 class,原因是 IntelliJ 中的 `Registry` 没有启用 `compiler.automake.allow.when.app.running`
@YKG
YKG / .bash_profile
Created May 17, 2018 01:54
proxy setting for Terminal on Mac OSX
# proxy list
alias proxy='export all_proxy=socks5://127.0.0.1:1087'
alias unproxy='unset all_proxy'
@YKG
YKG / gist:ed6e7fa1061ed47f86d652bbff6b8bc6
Created May 16, 2018 11:50
Check RTT with nmap on Mac OSX
sudo nmap -P0 -p 20177 --traceroute <IP/DomainName>