Skip to content

Instantly share code, notes, and snippets.

View whg517's full-sized avatar
🥳
Hi~

whg517

🥳
Hi~
View GitHub Profile
#!/bin/bash
set -x
# https://github.com/XTLS/Xray-install
# https://github.com/XTLS/Xray-examples
# 安装脚本
# 说明:
# - Caddy: 服务器安装 Caddy Web 服务,并使用 Caddy 的自动 TLS 功能,自动生成本地私有证书,同时自动轮转新证书,这些都是由 Caddy 自动完成
@whg517
whg517 / sample-aio-server.py
Last active September 8, 2022 06:59
sample-aio-server.py
import asyncio
import logging
from asyncio import Protocol, transports, AbstractEventLoop
from typing import Optional
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
def get_remote_addr(transport):