Skip to content

Instantly share code, notes, and snippets.

View snowwm's full-sized avatar

Pavel Andreyev snowwm

View GitHub Profile
@snowwm
snowwm / __main__.py
Last active March 29, 2024 07:43
A dirty hack useful if you need to quickly integrate sync and async codebases (or start making some parts async). Not for production!
"""
This example demonstrates using anysync with httpx.
"""
import logging
from anysync import anysync
from anysync.httpx_patch import Client
logging.basicConfig(level=logging.INFO)
@snowwm
snowwm / dpi-bypass.md
Last active February 19, 2023 07:08
Autonomous DPI bypass for Linux (using nftables for request fragmentation)

This method may or may not work depending on what DPI technologies your ISP uses.

Tested on Arch Linux.

Usage with yandex-browser-beta

Make sure you have nftables and yandex-browser-beta installed. Download files from this gist, then run:

# These commands need to be run as root (or with sudo).
#!/usr/bin/env python3
import sys, random, textwrap, re
from collections import defaultdict
SRC_FILE = './multitab_vcb.src.ini'
DST_FILE = './multitab_vcb.ini'
DST_ENCODING = 'cp1251'
MAX_TRANSLATIONS = 2