Sing-box利用fakeip自动IP分流无感知上网

方法一:网络代理自动发现协议 网络代理自动发现协议(Web Proxy Auto-Discovery Protocol,WPAD)是一种客户端使用DHCP和/或DNS发现方法来定位一个配置文件URL的方法。在检测和下载配置文件后,它可以执行配置文件以测定特定URL应使用的代理。 缺点: 很多系统默认未开启此功能,甚至不支持此功能 成功开启系统自动代理后,依然有很多APP应用不支持 不支持ip_cidr 方法二:软路由模式 在现网中添加一台软路由,用软路由代替用户网关或者串联在网关之上再或者旁路模式,由软路由代理所有用户流量,进而转发分流。 缺点: 硬件性能要求高,软件版本升级频繁 兼容稳定性差,不易实现冗余灾备方案 多vlan跨网段支持较差,IPv4/v6双栈支持较差 方法三:本文重点介绍fakeip旁路实现方案 1):新建Linux(推荐Debian最小化安装) 点击查看详细安装说明 a、获取ISO安装镜像https://www.debian.org b、安装选项 c、安装完成默认启用ssh,用户名密码均为user,使用中科大源。 2):在Debian中搭建sing-box客户端 bash <(curl -fsSL https://sing-box.app/deb-install.sh) 本站使用amd64 Debian12.5和sing-box_1.8.14 curl -fsSL http://lotro.cc/other/sing-box_1.8.14_linux_amd64.deb -o sing-box.deb sudo dpkg -i sing-box.deb 配置sing-box主机配置文件(需要国外sing-box服务端即梯子,推荐Trojan协议,用于转发GFW流量) sudo nano /etc/sing-box/config.json 点击查看完整配置(需要完善sing-box outbound 配置) { "log": { "level": "warn", "timestamp": true }, "dns": { "servers": [ { "tag": "local", "address": "tls://223.5.5.5", "detour": "direct" }, { "tag": "google", "address": "tls://8.8.8.8", "detour": "trojan" }, { "tag": "dns_refused", "address": "rcode://success" }, { ...
阅读更多

Sing-box笔记

官方站点:https://sing-box.sagernet.org/zh/ 使用版本:1.7.8 安装Ubuntu:bash <(curl -fsSL https://sing-box.app/deb-install.sh) 安装Centos:bash <(curl -fsSL https://sing-box.app/rpm-install.sh)  服务管理 对于带有 systemd 的 Linux 系统,通常安装已经包含 sing-box 服务, 您可以使用以下命令管理服务: 行动命令启用sudo systemctl enable sing-box禁用sudo systemctl disable sing-box启动sudo systemctl start sing-box停止sudo systemctl stop sing-box强行停止sudo systemctl kill sing-box重新启动sudo systemctl restart sing-box查看日志sudo journalctl -u sing-box --output cat -e实时日志sudo journalctl -u sing-box --output cat -fgeo.db目录/var/lib/sing-box/配置路径/etc/sing-box/ Client端配置(IPv4分流、Tun模式、支持atv旁路、支持atv组播) { "log": { "level": "warn", "timestamp": true }, "dns": { "servers": [ { "tag": "localDns", "address": "tls://223.6.6.6", "detour": "direct" }, { "tag": "proxyDns", "address": "tls://8.8.4.4", "detour": "h2-out" }, { "tag": "block", ...
阅读更多