18 lines
814 B
Markdown
18 lines
814 B
Markdown
# Xray 订阅管理脚本
|
||
|
||
## 关键文件
|
||
- xray_manager.py 管理订阅,选择服务器生成配置文件
|
||
- xray_run.py 前台运行代理服务
|
||
- table.sh 写入iptables,默认tproxy组运行的程序的流量会被代理
|
||
- kill.sh 杀死后台运行的xray_run.py
|
||
- config/local.json xray配置模板文件,outbound留空,让管理脚本生成
|
||
- config/xray xray可执行文件
|
||
|
||
## tproxy透明代理分流逻辑
|
||
table.sh脚本设置iptables的逻辑如下:
|
||
- 基于gid组id分流(默认使用组tproxy,需要提前创建)
|
||
- 所有非英特网的流量不走代理
|
||
- 所有转发流量都走代理(其它设备将本机设为网关的情况)
|
||
|
||
使用时,对于需要代理的软件,使用命令`newgrp tproxy`更改用户组之后运行,或者使用`sg tproxy <commands>`执行单个命令。
|