Skip to content

Instantly share code, notes, and snippets.

View mayanez's full-sized avatar
👨‍💻

Miguel A. Arroyo mayanez

👨‍💻
View GitHub Profile
@phlinhng
phlinhng / a-clash-tproxy-gateway.md
Last active March 27, 2024 22:07
Clash as transparent proxy gateway via TPROXY

Notes

  1. If your local network use public IP ranges instead of private ones, make sure to add respecive RETURN rules to iptables to prevent looping issue
  2. Set clash as DHCP's only DNS server to allow domain-based filter (shunting) rules work
  3. Use lsof -i udp:53 to check if clash's DNS module work fine, otherwise you may have to kill systemd-resolved and any other processes occupying the UDP 53 port
  4. The given scripts will NOT hangle the traffic of gateway itself since it is not recommend to do so. If you want to redirect the egress traffic of the gateway, the following material may be useful

Reference

@tossmilestone
tossmilestone / v2ray-tp.sh
Last active November 10, 2022 19:25
V2ray transparent proxy for TCP
#!/bin/sh
install_v2ray(){
echo "Install v2ray..."
if [[ ! -f /usr/bin/v2ray/v2ray ]]
then
curl -Ls https://install.direct/go.sh | bash
fi
mkdir -p /etc/v2ray
@willsthompson
willsthompson / sacd_ripping_guide.md
Last active April 27, 2024 21:55
SACD Ripping Guide
@saniaky
saniaky / Readme.md
Last active April 23, 2024 00:42
Docker + nginx-proxy + let's encrypt + watchtower + fail2ban

Complete solution for websites hosting

This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.

Features:

  • Automatically detect new containers and reconfigure nginx reverse-proxy
  • Automatically generate/update SSL certificates for all specified containers.
  • Watch for new docker images and update them.
  • Ban bots and hackers who are trying to bruteforce your website or do anything suspicious.
@MattPD
MattPD / analysis.draft.md
Last active May 4, 2024 14:56
Program Analysis Resources (WIP draft)
@GregRos
GregRos / more-about-pretty-and-usable-wsl-terminals.md
Last active May 3, 2021 15:58
Some notes on "Configuring a pretty and usable terminal emulator for WSL"

These comments are based on a few years of experience working with WSL. It's based on this tutorial:

https://blog.ropnop.com/configuring-a-pretty-and-usable-terminal-emulator-for-wsl/

And are basically updates to make it more relevant.

Opening a shell

In the past, to make the WSL run a command from cmd or somewhere else, you had to run the bash.exe program from windows, which fired up bash (and always bash) in the WSL and made it execute a command.

@kekru
kekru / 01nginx-tls-sni.md
Last active May 6, 2024 14:59
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled
@mbinna
mbinna / effective_modern_cmake.md
Last active May 6, 2024 17:19
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@mswell
mswell / config
Last active May 27, 2023 21:20
Terminator Dracula theme
[global_config]
window_state = maximise
handle_size = 0
title_hide_sizetext = True
title_transmit_fg_color = "#bd93f9"
title_inactive_fg_color = "#f8f8f2"
title_receive_bg_color = "#282a36"
title_transmit_bg_color = "#282a36"
title_receive_fg_color = "#8be9fd"
@aallan
aallan / mac-vendor.txt
Last active May 6, 2024 19:50
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?