Skip to content

Instantly share code, notes, and snippets.

@doroved
doroved / worker.js
Last active January 27, 2026 16:24
Proxying ntc.party through CF workers
export default {
async fetch(request) {
const url = new URL(request.url);
const workerHost = url.host;
const targetHost = 'ntc.party';
// 1. Подменяем URL запроса
url.hostname = targetHost;
url.protocol = 'https:';
@doroved
doroved / sni.rs
Last active November 17, 2025 13:11
Disabling Server Name Verification in Rustls (Version 0.23.19)
use rustls::{
client::{
danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier},
WebPkiServerVerifier,
},
pki_types::{CertificateDer, ServerName, UnixTime},
DigitallySignedStruct,
};
use std::sync::Arc;