# 启动 本地客户端 (命令行里运行这一句话即可 )
socat -d -d TCP4-LISTEN:8016,reuseaddr,fork ssl:http-proxy.xiaoshuogeng.com:8017,verify=1,\
snihost=http-proxy.xiaoshuogeng.com,commonname=http-proxy.xiaoshuogeng.com,\
openssl-min-proto-version=TLS1.3,openssl-max-proto-version=TLS1.3
# 如果你的 socat 版本低,不支持相关参数,请使用这种方式
version: "3"
services:
socat-http-proxy-8016:
image: registry.cn-beijing.aliyuncs.com/jingjingxyk-public/app:socat-alpine-20221018T1839Z
restart: always
container_name: socat-http-proxy-8016
command:
- /bin/sh
- -c
- |
socat -d -d TCP4-LISTEN:8016,reuseaddr,fork ssl:http-proxy.xiaoshuogeng.com:8017,verify=1,snihost=http-proxy.xiaoshuogeng.com,commonname=http-proxy.xiaoshuogeng.com,openssl-min-proto-version=TLS1.3,openssl-max-proto-version=TLS1.3
ports:
- "8016:8016"
# 使用上一步搭建好的代理
export http_proxy=http://127.0.0.1:8016
export https_proxy=http://127.0.0.1:8016
export no_proxy="127.0.0.1,localhost,ssl.google-analytics.com"
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git --depth=1 --progress
# 测试
curl -x http://127.0.0.1:8016 https://registry.k8s.io