whiredj 在 MacOS sing-box 与系统 VPN(L2TP over IPsec) 共存分流指南 中发帖
背景
很多用户在使用公司或学校 VPN 的同时,还需要使用 sing-box 进行代理。本文将介绍如何配置 sing-box,使其能够与系统 VPN(如 L2TP over IPsec)共存。
原理
将 sing-box 的出站设置为 VPN 的网络接口。
默认网络接口
L2TP VPN:使用 ppp0 接口
sing-box:使用 utun 接口(通常是 utun1 及以上)
共存
关闭 转发所有流量,可同时开启多个 VPN。
[off_traffic_all]
此时 Sing-box 生效,其他VPN失效。
[2vpn]
分流
在 Singbox outbound 中增加 VPN 出站
{
"type": "direct",
"tag": "vpn-out",
"bind_interface": "ppp0"
...