璟雯院

珺璟如晔,雯华若锦

用户工具

站点工具


tech:homelab:sing-box

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

tech:homelab:sing-box [2024/04/09 07:01] – 创建 温婕莺tech:homelab:sing-box [2024/04/09 12:24] (当前版本) 温婕莺
行 37: 行 37:
 ===== 配置Sing-Box ===== ===== 配置Sing-Box =====
  
-婕莺使用TUN模式,当然此模式不好的地方在于慢。但是方便后续可能会再换+婕莺使用TUN模式,当然此模式不好的地方在于慢和ssh无法使用不过婕莺也尝试了Tproxy配置,配了一天还是放弃了
  
 +配置主要分为2步:
  
 +  - 修改防火墙
 +  - 修改Sing-Box配置
 +
 +<code text>
 +config zone
 +        option name 'proxy'
 +        option forward 'REJECT'
 +        option output 'ACCEPT'
 +        option input 'ACCEPT'
 +        option mtu_fix '1'
 +        option device 'tun0'
 +        list network 'proxy'
 +
 +config forwarding
 +        option name 'lan-proxy'
 +        option dest 'proxy'
 +        option src 'lan'
 +        
 +config interface 'proxy'
 +        option proto 'none'
 +        option device 'tun0'
 +</code>
 +
 +<code text>
 +{
 +      "type": "tun",
 +      "tag": "tun-in",
 +      "interface_name": "tun0",
 +      "mtu": 9000,
 +      "inet4_address": "172.19.0.1/30",
 +      "auto_route": true,
 +      "stack": "system",
 +      "sniff": true,
 +      "sniff_override_destination": true
 +}
 +</code>
 +
 +然后重启OpenWRT的firewall。启动Sing-Box,结束。
/app/www/public/data/pages/tech/homelab/sing-box.txt · 最后更改: 2024/04/09 12:24 由 温婕莺