Commit graph

58 commits

Author SHA1 Message Date
Andrevich
008e2788e6 Prevent uTLS misuse and uci.set(null)
Add utls_unsupported() and stop emitting uTLS for transports/types that can’t use it (hysteria, hysteria2, tuic, naive, or quic) to avoid startup fatal/dial errors. Expose optional url fields for urltest outbounds. Harden subscription import/update: treat explicit nulls as deletions, skip uci.set() when a value is null to avoid libuci errors and stale values. Changes in generate_client.uc and update_subscriptions.uc.
2026-07-27 23:43:16 +04:00
Andrevich
43d858cf17 Add Xray/V2Ray subscription parsing
Add parsing support for Xray/V2Ray JSON subscription formats by introducing parse_xray_outbound and parse_xray_config. The new parser converts an Xray outbound (vless, vmess, trojan, shadowsocks, socks, http, hysteria) and its streamSettings into HomeProxy node configs, mapping TLS/Reality settings, transports (ws, grpc, h2/http, httpupgrade, xhttp), and protocol-specific fields. Special handling for hysteria (v1/v2) is included and skipped when sing-box lacks QUIC. The main subscription logic is updated to detect and decode arrays of full Xray configs (common from some providers) and fall back to existing JSON or base64 decoding; existing Shadowsocks SIP008 detection is preserved.
2026-06-19 14:46:14 +04:00
Andrevich
bfbf714da4 Add xhttp split-download and packet-up options
Introduce XHTTP packet-up controls and split-download support across UI, parsers and generators.

- htdocs/luci-static/resources/view/homeproxy/node.js: parse additional xhttp fields from links (scMaxEachPostBytes / sc_min_each_post_bytes and scMinPostsIntervalMs / sc_min_posts_interval_ms), add UI inputs for padding, packet-up limits and detailed split-download settings (host/path/server/port/SNI/ALPN/insecure).
- po/ru/homeproxy.po: add Russian translations for all new UI labels and help texts.
- root/etc/homeproxy/scripts/generate_client.uc: add xhttp_download() helper to build a per-core download transport, emit both camelCase (hiddify) and snake_case (sing-box) xhttp options, and attach the download section under the appropriate core-specific key.
- root/etc/homeproxy/scripts/update_subscriptions.uc: accept both dialects when parsing xhttp options (camelCase and snake_case) and handle both downloadSettings (hiddify) and download (sing-box), normalizing host/server/port and TLS/alpn/utls fields.

These changes ensure compatibility with both hiddify-core and sing-box dialects and expose finer-grained xhttp controls in the UI.
2026-06-16 12:09:10 +04:00
Andrevich
67743694cf Add diagnostics UI; ShadowTLS & install refactor
Add a new HomeProxy diagnostics page (htdocs/.../diagnostics.js) for core/config/DNS/nftables checks and report generation. Introduce ShadowTLS options (flag + password) in node settings and wire dependencies for Shadowsocks. Refactor core installation flow in status.js into prepare/download/install_pkg/install_kmods steps with new RPC calls, improving download/install error handling and progress messages. Update UI copy in client.js, and refresh localization strings and backend ucode/scripts to match the new features.
2026-06-12 20:05:00 +04:00
Andrevich
0266c5e1c9 Add outbound interface binding, Direct/Proxy IP checks, YouTube test, Clash API for all routing modes, and zh-cn i18n package
New Features
Outbound Interface Binding

Added Binded interface field to every outbound node — allows pinning a proxy node to a specific network interface. using SO_BINDTODEVICE
The bind_interface value is preserved across subscription updates and not overwritten when nodes are refreshed
Status Page — IP Check

Added Direct IP button: shows the current exit IP and latency of the direct outbound
Added Proxy IP button: shows the exit IP, latency, and active node name of the currently selected proxy in the URLTest/Fallback group
Status Page — YouTube Check

Added YouTube connectivity check alongside the existing Google, Yandex, Baidu, Speedtest checks
Clash API

sing-box Clash API now enabled on 127.0.0.1:9090 for all routing modes
Build
Added luci-i18n-homeproxy-zh-cn package to the build pipeline — Chinese Simplified translation is now distributed as a standalone installable package, for both main and legacy (OpenWRT 23.05) releases
Translations
Added Russian and Chinese Simplified translations for all new UI strings
Fixed missing Russian translation for unchecked
2026-05-25 12:20:08 +04:00
Andrevich
da38851d23 Add Mieru support and enhance URI parsers
Add support for the Mieru protocol and extend outbound generation and subscription parsing to handle new fields and edge cases. Changes include: generate_client.uc - treat mieru server_port as 0, add portBindings, multiplexing, handshake_mode, and mie ru-specific handling; add naive-specific quic, extra_headers and udp_over_tcp branching and preserve ssh udp_over_tcp behavior. update_subscriptions.uc - parse naive extra headers and params (quic, uot, sni), add robust SSH parsing to avoid parseURL corruption (extract user/host/port, private keys, host keys, passphrases, and ssh_udp_over_tcp handling), add tuic zero_rtt and heartbeat params, and implement a new 'mieru' URI parser. Adjust validation to skip port checks for mieru and improve node cache handling when updating existing nodes so newly parsed fields are preserved.
2026-05-14 16:31:19 +04:00
Andrevich
900ac53717 Support custom_json, XHTTP, Naïve and parsing fixes
Adds a new 'custom_json' routing mode that can use a user-provided client config; UI changes in client.js to expose custom_json options and trigger subscription updates via RPC. node.js: require rpc, add NaïveProxy node type and XHTTP transport with UI fields (xhttp_mode, xhttp_headers), and adjust field dependencies. generate_client.uc: add TLS fragment support, normalize TLS ALPN to an array, handle xhttp mode/headers, rename log/output filenames, add default_mark and use it in routing, and write out hiddify-c.json. update_subscriptions.uc: import urldecode_params and extend URI parsing (naive, ssh, enhanced trojan parsing including xhttp and hiddify extras), add WireGuard parsing, and make base64 node decoding more robust. init.d: support custom_json by copying user-supplied config or generating config as appropriate and include custom_json in DNSMasq routing cases. Add an RPC method (subscription_update) in luci.homeproxy to run the subscription updater.
2026-05-14 00:22:45 +04:00
Tianling Shen
29f61caf30
fix(subscribe): guard params usage
url.searchParams can be empty in edge case, add a fallback value
for it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2026-04-24 16:49:21 +08:00
Zolyn
e8fb77a6c2
fix(subscribe): incorrect config keys iteration when deleting obsolete node option 2025-09-06 19:28:05 +08:00
Tianling Shen
388e6a3bd0
feat: add anytls support
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-08-22 17:03:59 +08:00
Tianling Shen
6aa30660ec
feat(subscribe): make use of the md5 func from digest library
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-08-22 17:03:59 +08:00
Tianling Shen
b50f882484
chore: refine
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-08-04 16:26:36 +08:00
Tianling Shen
ec2d32bb27
fix(subscribe): fix parse ss userinfo in base64 format
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-07-13 19:32:56 +08:00
Tianling Shen
f05a3f39c9
fix(subscribe): fix parse insecure param in hy2
Fixes: #321
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-05-05 12:53:59 +08:00
Tianling Shen
b5a9adb983
fix(subscribe): fix split host param for vmess share link
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-03-23 17:30:56 +08:00
Tianling Shen
0d3fb3e8fa
feat(subscribe): support v{m,l}ess httpupgrade sharelink
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-02-23 16:23:24 +08:00
Tianling Shen
93fdbd3713
fix(subscribe): fix reference to node
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-02-01 14:28:45 +08:00
Tianling Shen
41c6d74f0b
fix(subscribe): fix switching default node in urltest mode
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-01-12 20:52:07 +08:00
Tianling Shen
d5de715b7a
chore(ucode): remove unused imports
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2025-01-08 19:26:49 +08:00
Tianling Shen
691fdc3313
chore(scripts/subscribe): minor update
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-10-01 22:29:09 +08:00
Anya Lin
cae057252e
feat(node/scripts/subscribe): allow use custom UA when updating subscriptions 2024-10-01 22:21:02 +08:00
Tianling Shen
a9772ab12a
fix(scripts/subscribe): improve url handling
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-09-29 22:26:33 +08:00
Tianling Shen
c4351da072
feat(subscribe): drop removed config from node 2024-09-03 21:58:45 +08:00
Tianling Shen
64f284b22f
feat(subscribe): ignore hash from url
we use it to mark subscription name
2024-08-08 17:36:57 +08:00
Tianling Shen
d1f95721fb
feat(scripts/subscribe): improve the logic of addding nodes
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2024-06-25 22:40:10 +08:00
Anya Lin
057dbfc08e
fix(subscribe): fix parse vmess share link 2024-02-03 18:41:19 +08:00
Tianling Shen
0af7ebb442
feat(node): parse host param even if tls is enabled
we don't give a shit about those goddamn proxy providers
2024-01-24 12:54:38 +08:00
Tianling Shen
330ce5e03b
feat(subscribe): do urldecode for vmess label 2023-12-13 16:30:59 +08:00
Tianling Shen
eed0145920
fix(subscribe): fix check quic condtion when parsing vless node 2023-12-02 17:15:27 +08:00
Tianling Shen
d79ad2f869
fix(subscribe): fix parsing userpass auth for hy2 2023-12-02 17:06:28 +08:00
Tianling Shen
1148b5ced7
refactor: remove ssr support
It has been removed since v1.6.0.
2023-12-02 15:59:35 +08:00
Anya Lin
69792b8a71
fix(subscribe): fix syntax error 2023-10-29 10:49:00 +08:00
Tianling Shen
b1c97bc785
chore(subscribe): simplify vars 2023-09-30 11:50:30 +08:00
Tianling Shen
0709bb40ae
feat: initial hysteria2 support 2023-09-24 17:20:10 +08:00
douglarek
a5b4e6334b
feat: support tuic 2023-08-19 19:36:25 +08:00
Tianling Shen
09dfbb8a49
fix(subscribe): dont delete group nodes if failed to fetch subscription 2023-07-03 04:58:57 +08:00
Tianling Shen
f3b86e0de4
feat(subscribe): allow trojan grpc/ws 2023-06-11 16:10:06 +08:00
Tianling Shen
421d0a1522
chore(subscribe): update uci.commit usage 2023-05-24 16:30:01 +08:00
Tianling Shen
765e2736f6
fix(subscribe): disable authenticated length for vmess by default 2023-05-13 11:13:14 +08:00
Tianling Shen
c7bb4224b5
fix(subscribe): fix syntax error 2023-04-14 19:25:56 +08:00
Tianling Shen
0524659302
feat: replace curl with wget 2023-04-14 07:06:14 +08:00
Tianling Shen
9564c5575f
feat(subscribe): improve debugging log 2023-04-14 05:07:24 +08:00
Tianling Shen
4f915882de
feat(subscribe): use native ucode time func 2023-03-27 05:00:35 +08:00
Tianling Shen
6490aff282
feat(node): support import vless reality node 2023-03-25 18:03:28 +08:00
Tianling Shen
f3e0c5c14e
feat(server): enforce tls using validate 2023-03-22 22:31:34 +08:00
Tianling Shen
742cc22821
feat(subscribe): support import http/socks node 2023-03-21 21:38:13 +08:00
Tianling Shen
dcb574045a
chore(uc/hp): optimize validation useage 2023-03-11 19:26:48 +08:00
Tianling Shen
a501f61594
chore(uc/hp): rename cURL func for ucode 2023-03-11 12:11:21 +08:00
Tianling Shen
f9425d0847
chore(subscription): fix typo error 2023-02-18 10:59:09 +08:00
Tianling Shen
9d1ca3455a
fix(subscription): enable padding for vmess by default 2023-02-16 16:05:34 +08:00