Since Cloudflare is IP banned in most ISPs of Iran, this can be used to bypass it via a proxy. You likely have to modify the proxy URL in the _cloudflareURL
function. You can also modify the _nonCloudflareURL
function to run other PAC files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
set -g BASE_DIR (path resolve -- (status dirname)) | |
set -g BASE_PROTON $BASE_DIR/shared | |
set -g BASE_WINE $BASE_DIR/shared_ge | |
set -g HELP_MESSAGE "\ | |
Usage: merge.fish [-h|--help] [-d|--dry-run] [-v|--verbose] | |
[-u|--unmerge|-b <base>|--base=<base>] [-r|--recursive] | |
<prefix> [<prefixes...>] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Iran PAC file. | |
* @copyright 2025 esdmr | |
* @license MIT | |
*/ | |
function _nonIranURL(_url, _host) { | |
return 'SOCKS 127.0.0.1:9050'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// … once told me the world is gonna roll me. | |
// @ts-check | |
import {createInterface} from 'node:readline'; | |
import {spawn} from 'node:child_process'; | |
import process from 'node:process'; | |
import {setTimeout} from 'node:timers/promises'; | |
import {writeFile, watch, readFile} from 'node:fs/promises'; | |
const killSwitchPath = '/tmp/Tor.KillSwitch'; | |
/** @type {Awaited<ReturnType<typeof spawnTor>> | undefined} */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu@sha256:8e5c4f0285ecbb4ead070431d29b576a530d3166df73ec44affc1cd27555141b | |
RUN apt-get update && apt-get install -y iproute2 | |
COPY tun2socks starttun /bin/ | |
ENTRYPOINT [ "/bin/starttun" ] | |
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=1 CMD [ "/bin/starttun", "--health" ] | |
ENV SOCKS_PROXY=proxy:1080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass | |
import sys | |
from typing import List | |
@dataclass | |
class InFlightPiece: | |
index: int | |
length: int | |
piece_bitfield: bytes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Invidious Block Channels | |
// @namespace https://esdmr.ir | |
// @downloadURL https://gist.github.com/esdmr/035a6df74f9e1aebfcb0a43f48f696c1/raw | |
// @homepageURL https://gist.github.com/esdmr/035a6df74f9e1aebfcb0a43f48f696c1 | |
// @match http*://localhost:3000/* | |
// @match http*://inv.nadeko.net/* | |
// @match http*://inv1.nadeko.net/* | |
// @match http*://inv2.nadeko.net/* | |
// @match http*://inv3.nadeko.net/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
type ChainPromise<T> = Promise<T> & { | |
promise: Promise<T>; | |
[Symbol.asyncIterator](): AsyncGenerator<T>; | |
} & { | |
readonly [K in keyof T as K extends keyof Promise<T> | |
? never | |
: K]: ChainPromise<Awaited<T[K]>>; | |
} & (T extends (...args: infer P) => infer R |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
x-block, | |
x-jump-if, | |
x-jump, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sys import argv, stderr | |
from typing import NamedTuple, SupportsIndex | |
from re import compile | |
from math import ceil | |
def n[T](v: T | None) -> T: | |
assert v is not None | |
return v |
NewerOlder