mirror of
https://github.com/dikeckaan/mu300-linux.git
synced 2026-12-05 16:03:51 +00:00
mu300-vpn gains ENGINE=xray, now the default: Xray-core speaks VLESS and hev-socks5-tunnel owns a plain kernel TUN (xtun), handing every flow to Xray's SOCKS port on loopback. It reads the same VLESS_URI through the same parser; ENGINE=sing-box keeps the old engine, and an image without the xray binaries falls back to it by itself. The script does the routing neither program does, with sing-box's rule prefs and table so routing_cleanup and the kill switch cover both: Xray's own sockets carry the 0x2d0 mark to main, the LAN and the server's address go to main, everything else to xtun, and the device's own DNS is DNAT'd to REMOTE_DNS. The server name is resolved before any of that exists and handed to Xray as an address. Xray, hev and the rules are torn down together on every exit path. Xray 26 removed allowInsecure. For a link that asks for it the leaf certificate is fetched with openssl once, pinned as TLS_PIN_SHA256 in vpn.conf, and re-fetched only when Xray reports a pin mismatch (a renewal), after which the service restarts. That report is info-level, so Xray runs at info and only warnings reach the system log. Release: tools/fetch-xray.sh pins both binaries by sha256; make-release, assemble.sh and the OpenWrt build carry them, and both images get openssl. The example config ships KILL_SWITCH=0 until the kill switch is re-tested with Xray. Measured on OpenWrt on the device: exit IP is the server's, apk works through the tunnel, a Wi-Fi client is forwarded into xtun, and the three pin paths (none, present, mismatched) behave as described. Ubuntu is not yet run on the device. FINDINGS 26e also records that busybox nc here has no -w - the reason an earlier test read every destination as closed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Z17MBkdHmZPvNPNSLxcHk