Skip to content

Instantly share code, notes, and snippets.

View crabvk's full-sized avatar
🦀

Vyacheslav Konovalov crabvk

🦀
View GitHub Profile
@crabvk
crabvk / dpi-russian-domain-ip-check.md
Last active April 27, 2026 19:02
Why Russian DPI doesn't (always) check the IP address for a claimed SNI domain

XTLS/Xray-core#4113

REALITY disguises itself during the TLS handshake and certificate delivery, returning certificates and initial data that appear to be from a legitimate website during the handshake, making the TLS connection and access to "major" HTTPS websites difficult to distinguish. The GFW risks accidentally blocking legitimate websites if it wants to block them.

Why Russian DPI doesn't (always) check the IP address for a claimed SNI domain

The honest answer: they sometimes do, increasingly so, and that's why this is an active arms race rather than a settled problem.

Below is why an SNI↔IP correlation check is harder than it looks, why Russian TSPU and the GFW don't apply it universally, and how REALITY's design tries to defeat it anyway.

@crabvk
crabvk / exclave-routing-config.md
Last active April 23, 2026 21:16
Иструкция по настройке роутинга для VPN клиента Exclave
@crabvk
crabvk / useSearchParams.ts
Created March 6, 2025 11:28
React Router v7 `useSearchParams` with stable `setSearchParams` function.
import { useRef, useMemo, useCallback } from 'react'
import { createSearchParams, useLocation, useNavigate } from 'react-router'
import type { SetURLSearchParams, URLSearchParamsInit } from 'react-router'
export default function useSearchParams(
defaultInit?: URLSearchParamsInit
): [URLSearchParams, SetURLSearchParams] {
const defaultSearchParamsRef = useRef(createSearchParams(defaultInit))
const hasSetSearchParamsRef = useRef(false)
const searchParamsRef = useRef<URLSearchParams>()

Keybase proof

I hereby claim:

  • I am crabvk on github.
  • I am crabvk (https://keybase.io/crabvk) on keybase.
  • I have a public key whose fingerprint is 0491 551F A97A 5960 0D46 AEB0 C6C4 6476 220B 5552

To claim this, I am signing this object:

@crabvk
crabvk / openconnect@.service
Created July 21, 2020 17:59
OpenConnect systemd service file
[Unit]
Description=OpenConnect VPN tunnel for %I
After=syslog.target network-online.target
Wants=network-online.target
[Service]
Type=forking
PrivateTmp=true
WorkingDirectory=/etc/openconnect
EnvironmentFile=/etc/openconnect/%i.env
@crabvk
crabvk / PKGBUILD.patch
Last active March 15, 2020 12:04
Arch Linux AUR sendxmpp-rs 1.0.1 PKGBUILD patch
--- PKGBUILD.orig 2020-03-15 17:02:27.959857250 +0500
+++ PKGBUILD 2020-03-15 17:02:21.456492264 +0500
@@ -1,37 +1,27 @@
# Maintainer: moparisthebest <admin dot archlinux AT moparisthebest dot com>
-_pkgname=sendxmpp
+_commit=37b5efd4b62c416e6f47f44ab57a42b61ee3dbcb
pkgname=sendxmpp-rs
-pkgver=1.0.0
+pkgver=1.0.1
@crabvk
crabvk / PKGBUILD.patch
Last active February 22, 2020 00:50
ArchLinux fish PKGBUILD patch 3.0.2-3 -> 3.1.0-1
diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index 2ae4ddf..8a4c82d 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -6,41 +6,32 @@
# Contributor: Jan Fader <jan.fader@web.de>
pkgname=fish
-pkgver=3.0.2
-pkgrel=3
diff --git a/PKGBUILD b/PKGBUILD
index 15e9321..2f6d5f6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,24 @@
# Maintainer: Sharky <sharky@sharky.pw>
+
pkgname=surfshark-vpn
pkgver=1.0.0
pkgrel=1
@crabvk
crabvk / PKGBUILD
Created July 31, 2019 15:19
Arch Linux AUR megatools PKGBUILD
pkgname=megatools
pkgver=1.10.2
pkgrel=1
pkgdesc="Command line client application for Mega"
arch=('x86_64')
url="http://megatools.megous.com"
license=('GPLv2')
depends=('curl' 'glib2')
provides=('megatools')
conflicts=('megatools')
@crabvk
crabvk / timeout_middleware.rb
Last active November 6, 2015 08:36
Ruby event machine http request read timeout line Net::HTTP#read_timeout
require 'em-synchrony'
require 'em-synchrony/em-http'
require 'em-synchrony/fiber_iterator'
class TimeoutMiddleware
def request(client, head, body)
client.timeout(15)
[head, body]
end
end