Skip to content

Instantly share code, notes, and snippets.

@vrslev
vrslev / main.conf
Last active April 4, 2025 09:31
Shadowrocket config file for Russia residents. Open Config, click on ✚, paste https://gist.githubusercontent.com/vrslev/784df4edd8354f8eaddb6e0697601715/raw/main.conf
# Shadowrocket config file: https://gist.github.com/vrslev/784df4edd8354f8eaddb6e0697601715
# Config file reference: https://manual.nssurge.com
[General]
ipv6 = true
bypass-system = true
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, captive.apple.com
bypass-tun = 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.88.99.0/24, 192.168.0.0/16, 198.18.0.0/15, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 255.255.255.255/32
dns-server = 1.1.1.1, 8.8.8.8
fallback-dns-server = system
@vrslev
vrslev / main.py
Last active February 14, 2025 21:51
Automatic browser reloading in FastAPI
import os
import arel
from fastapi import FastAPI, Request
from fastapi.templating import Jinja2Templates
app = FastAPI()
templates = Jinja2Templates("templates")
if _debug := os.getenv("DEBUG"):