TGViewer
Py分享基地【编程/技术/分享】 Py分享基地【编程/技术/分享】 @py_jay_geqian · 7.5K subscribers
Post #2165 554
-TG本地代理创建教程-

1. 安装Termux终端

2. 安装依赖 执行↓
pkg update -y && pkg install -y python git python-cryptography


3. 验证装上了没↓
git --version
python -c "import cryptography; print('ok')"

两个都有输出 = 好了

4. 拉官方源码↓
cd ~
git clone https://github.com/Flowseal/tg-ws-proxy
cd ~/tg-ws-proxy


5. 装 certifi ↓
python -m pip install certifi
python -c "import certifi; print(certifi.where())"


6. 编一个自己的 secret↓
python -c "import secrets;print(secrets.token_hex(16))"

会输出一串 32 位十六进制串 复制留着

7.启动↓
cd ~/tg-ws-proxy
termux-wake-lock
python -m proxy.tg_ws_proxy --secret 替换复制的十六进制串 --log-file ~/tgws.log &
echo $! > ~/tgws.pid


8. 等三秒 把链接掏出来 执行↓
sleep 3; grep -o 'tg://proxy[^ ]*' ~/tgws.log

输出这样一串链接就是成了:
tg://proxy?server=&port=1443&secret=32位十六进制串
复制到TG点开连接即可

额外:以后删后台需要重启先执行↓
kill $(cat ~/tgws.pid)

再执行上面第7步那段

注:所有引用的指令点击即可复制 注意是本地代理 只能在本机使用
ps:这算是比较轻易能创建的代理 一般按照步骤一步一步来都可以创建成功 如果还创建不成功就去问AI吧


——Py分享基地
📮 投稿通道 ☘️ 交流群组
  • 👍 6
  • 😁 2
  • 👏 1
  • 🤣 1
More from @py_jay_geqian
  1. Oct 2, 2026天津全自动全名下脚本(包含房产) 内置豪猪和云码版本和手动输入验证码 房产思路: 全自动改完密码手动登录津心办 点击主页津心登看我的证件 爱来自Er 小r 云凤 ——i分享 📮…
  2. Oct 2, 2026#小程序-蒙苗助手 添加家庭成员-第二种方式→输入身份证号出模糊常用手机号、未成年出父母模糊常用手机号 ——i分享 📮 投稿通道 ☘️ 交流群组
  3. Oct 2, 2026单次电话☎️ ——i分享 📮 投稿通道 ☘️ 交流群组
  4. Oct 2, 2026TG本地代理创建 ——Py分享基地 📮 投稿通道 ☘️ 交流群组
  5. Oct 2, 2026让手机拥有一个Linux终端模拟器! #手机终端 #编程 #开源 🟢Termux:一个适用于Android的终端模拟器 安卓端开源Linux终端模拟器 无需Root 可以直接在手…
  6. Oct 2, 2026石家庄社保卡保障卡 亲情维护-添加二要素-社保卡综合业务-社保卡密码重置-代办-选择添加的那位重置密码-查看社保卡号开头字母和后四位 打开河北社保补齐py 自己替换账号密码和社保密…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →