|
本帖最后由 eam007 于 2024-7-2 18:06 编辑
测试环境:
树莓派3B,不知明X86_64小主机一台内置Emmc。
系统:
Openwrt 官方包,更换软件包源为清华
安装sing-box:
- opkg update
- opkg install kmod-inet-diag kmod-netlink-diag kmod-tun kmod-tcp-bbr
- opkg install sing-box curl nano
复制代码
在/etc/config/firewall中添加规则:
- 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'
复制代码
添加网络接口/etc/config/network:
- config interface 'proxy'
- option proto 'none'
- option device 'tun0'
复制代码
修改sing-box开机启动/etc/config/sing-box:
- config sing-box 'main'
- option enabled '1'
- option user 'root'
- option conffile '/etc/sing-box/config.json'
- option workdir '/usr/share/sing-box'
复制代码
sing-box配置说明,目前测试TUIC能正常使用。
TUN入站配置:
- "inbounds": [
- {
- "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
- }
- ],
复制代码
|
|