我终于成功运行了Wireguard…我使用ProtonVPN,你可以免费注册,并根据你的国家选择从他们的页面上获得配置。
#你的客户去通过vpn / ip防火墙地址列表添加地址= = under_protonvpn 192.168.0.0 / 24列表/ ip防火墙损坏添加行动= mark-connection链= prerouting src-address-list = under_protonvpn new-connection-mark = under_protonvpn透传= yes /接口/ wireguard /添加名称= protonwg01私有密匙=“paste_here”=“ProtonVPN接口”发表评论/接口/ wireguard /同事/添加端点地址= paste_here端点端口= 51820公钥=“paste_here”allowed-address = 0.0.0.0/1,128.0.0.0/1Interface =protonwg01 /ip/address/add address=10.2.0.2/30 Interface =protonwg01 #在客户端DHCP服务器中设置10.2.0.1 DNS/routing/table/add name=protonvpn_wg fib /ip/firewall/mangle/add chain=prerouting src-address-list=under_protonvpn action=mark-routing - new-routing-mark=protonvpn_wg passthrough=yes /ip/route/add routing-table=protonvpn_wg st-address=0.0.0.0/0 gateway=protonwg01 comment="ProtonVPN Wireguard默认路由" /ip firewall mangle add action=change-mss chain=forward new-mss=1360 passthrough=yes protocol=tcp connection-mark=under_protonvpn tcp-flags=syn tcp-mss=!0-1375 /ip防火墙NAT add chain=srcnat action=masquerade out-interface=protonwg01
此外,使其充当路由器IP:8080上浏览器的代理
/interface vlan add interface=bridge1 name=vlan100 vlan-id=100 /ip address add address=192.168.100.1/24 interface=vlan100 network=192.168.100.0 /ip proxy set anonymous=yes enabled=yes src-address=192.168.100.1 /ip firewall mangle add action=mark-routing chain=output new-routing-mark=through_vpn passthrough=yes src-address=192.168.100.1 /ip route add distance=1 gateway=protonwg01 routing-mark=through_vpn
您可以根据自己的QoS树创建特定的管理规则来观察/确定优先级。