一句命令即可或者启动一个容器
使用代理方式一:
| |
| 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 |
| |
| |
| |
| |
| |
| |
使用代理方式二:
| 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" |
| |
| # 启动 |
| docker-compose -f docker-compose.yaml up -d |
| # 关闭 |
| docker-compose -f docker-compose.yaml down --remove-orphans |
| # 查看日志 |
| docker-compose -f docker-compose.yaml logs -f |
| |
| |
| |
| |
| set -exu |
| |
| __DIR__=$( |
| cd "$(dirname "$0")" |
| pwd |
| ) |
| cd ${__DIR__} |
| |
| export http_proxy=http://127.0.0.1:8016 |
| export https_proxy=http://127.0.0.1:8016 |
| |
| if [ -f depot_tools/.gitignore ];then |
| git -C depot_tools pull --depth=1 --progress --rebase=true |
| else |
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git --depth=1 --progress |
| fi |
| |
| |
| export PATH="$PATH:${__DIR__}/depot_tools" |
| |
| |
| |
第三步:准备 webRTC
同步脚本
| |
| |
| |
| set -exu |
| |
| __DIR__=$( |
| cd "$(dirname "$0")" |
| pwd |
| ) |
| cd ${__DIR__} |
| |
| export PATH="$PATH:${__DIR__}/depot_tools" |
| |
| |
| export http_proxy=http://127.0.0.1:8016 |
| export https_proxy=http://127.0.0.1:8016 |
| |
| cat > ${__DIR__}/.boto <<EOF |
| [Boto] |
| proxy = 127.0.0.1 |
| proxy_port = 8016 |
| proxy_type = http |
| # README https://gist.github.com/nickdiego/2b2faa35f5ab48e7438ee434d2756765 |
| EOF |
| |
| export DEPOT_TOOLS_UPDATE=0 |
| gclient metrics --opt-out |
| |
| |
| |
| export GIT_CURL_VERBOSE=1 |
| |
| export NO_AUTH_BOTO_CONFIG=${__DIR__}/.boto |
| |
| if [ -f .gclient ];then |
| if [ -d src ] ;then |
| cd src |
| git checkout main |
| git pull origin main --depth=1 --progress --rebase=true --allow-unrelated-histories |
| git merge origin/main |
| git clean -fd |
| cd .. |
| fi |
| gclient sync --nohooks --no-history |
| |
| else |
| fetch --nohooks --no-history webrtc |
| gclient --nohooks --no-history sync |
| fi |
| |
| gclient runhooks |
| |
第四步:执行同步 webRTC
工程
参考文档
- nginx 的http_proxy_connect_module模块使用
- http 代理的服务端实现
- 构建能让socat支持TLSv.13特性的容器环境
- 快速下载chromium源码
- webrtc.org
- WebRTC samples 示例
- WebRTC samples GitHub repository
- Source repository
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)