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
{//服务器使用的方案:VLESS+TLS+WS+NGINX+CDN,看情况替换成自己的 | |
"log": { | |
"access": "/dev/null", | |
"error": "/var/log/xray_error.log", | |
"loglevel": "warning" | |
}, | |
"inbounds": [ | |
{ | |
"tag":"transparent", | |
"port": 12345, |
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
import datetime | |
import aiohttp | |
import asyncio | |
import tqdm | |
type_name = ['工作日', '休息日', '节假日'] | |
max_conn = asyncio.Semaphore(15) # 最大并发连接数, 默认15 | |
async def fetch(url, day): | |
await max_conn.acquire() |
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 python | |
# from https://groups.google.com/forum/#!topic/construct3/FzYFmdv4qTg | |
from construct import * | |
# copied from core.py | |
def _read_stream(stream, length): | |
if length < 0: | |
raise ValueError("length must be >= 0", length) | |
data = stream.read(length) |