电信星卡+docker+v2ray+nginx+quantumultx+公网服务器

根据自己情况部署,docker、nginx不是必须quantumultx也有其它工具代替(v2rayNG,小火箭,surge);

开启bbr加速

内核大于4.9
查看命令 uname -r | cut -d- -f1
可以执行升级

wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh
./bbr.sh
sysctl net.ipv4.tcp_available_congestion_control
返回值一般为:
net.ipv4.tcp_available_congestion_control =bbr cubic reno
sysctl net.ipv4.tcp_congestion_control
返回值一般为:
net.ipv4.tcp_congestion_control = bbr
sysctl net.core.default_qdisc
返回值一般为:
net.core.default_qdisc = fq
lsmod | grep bbr
返回值有 tcp_bbr 模块即说明bbr已启动。

v2配置文件

宿主机创建/etc/v2ray/config.json(v2ray的配置文件)

{
    "inbounds": [{
        "port": 80,
        "protocol": "vmess",
        "settings": {
            "clients": [{
                "id": "16043f7a-xxxx-bce0-86ca-6f327f51xxxx",//自己生成
                "level": 1,
                "alterId": 0
            }]
        },
        "streamSettings": {
            "network": "ws",
            "security":"",
            "wsSettings": {
            },
            "path":"/"
        }
    }],
    "outbounds": [{
        "protocol": "freedom",
        "settings": {
 
        }
    },
    {
        "protocol": "blackhole",
        "settings": {
 
        },
        "tag": "blocked"
    }]
}

制作镜像

DockerFile

FROM alpine:latest

ADD entrypoint.sh /opt/build.sh

RUN apk add --no-cache --virtual .build-deps ca-certificates curl \
 && chmod +x /opt/build.sh

ENTRYPOINT ["sh", "-c", "/opt/build.sh"]

build .sh

#!/bin/sh

# Global variables
DIR_CONFIG="/etc/v2ray"
DIR_RUNTIME="/usr/bin"
DIR_TMP="$(mktemp -d)"

# Get V2Ray executable release
curl --retry 10 --retry-max-time 60 -H "Cache-Control: no-cache" -fsSL https://github.uibo.workers.dev/https://github.com/v2fly/v2ray-core/releases/latest/download/v2ray-linux-64.zip -o ${DIR_TMP}/v2ray_dist.zip
busybox unzip ${DIR_TMP}/v2ray_dist.zip -d ${DIR_TMP}

# Convert to protobuf format configuration
mkdir -p ${DIR_CONFIG}
#${DIR_TMP}/v2ctl config ${DIR_TMP}/config.json > ${DIR_CONFIG}/config.json

# Install V2Ray
install -m 755 ${DIR_TMP}/v2ray ${DIR_RUNTIME}
rm -rf ${DIR_TMP}

# Run V2Ray
${DIR_RUNTIME}/v2ray -config=${DIR_CONFIG}/config.json

创建运行

docker build -t v2ray:1.0 .
docker run -d --name v2ray --net=与nginx连通的网卡-v /etc/v2ray:/etc/v2ray -p 81:80 v2ray  v2ray -config=/etc/v2ray/config.json

nginx 代理

server{
   	listen 80;
	server_name livep.l.qq.com;
	location / {
	proxy_pass       http://v2ray:80;
        proxy_redirect             off;
        proxy_http_version         1.1;
        proxy_set_header Upgrade   $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host      $http_host;
}

注意:在手机代理软件上伪装host填写定向app的host
Host值参考:https://jacobsblog.xyz/%e5%85%8d%e6%b5%81%e6%b7%b7%e6%b7%86%e5%8f%82%e6%95%b0%e4%bb%85%e4%be%9b%e5%8f%82%e8%80%83/
也可以自己抓包找具体app的host


其它的自己玩
电信停机卡绿通等。。。

懒人

不想麻烦的可以直接买支持的机场节点,直接修改伪装host

Q.E.D.