@push.rocks/smartproxy 29.0.1 → 30.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.smartconfig.json +92 -3
- package/changelog.md +41 -0
- package/dist_rust/{rustproxy_linux_arm64 → rustproxy_linux_amd64_musl} +0 -0
- package/dist_rust/rustproxy_linux_amd64_musl.tsrust-build.json +14 -0
- package/dist_rust/rustproxy_linux_arm64_musl +0 -0
- package/dist_rust/rustproxy_linux_arm64_musl.tsrust-build.json +14 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/proxies/smart-proxy/rust-proxy-bridge.js +11 -6
- package/dist_ts/proxies/smart-proxy/smart-proxy.js +10 -2
- package/dist_ts/proxies/smart-proxy/utils/index.d.ts +1 -1
- package/dist_ts/proxies/smart-proxy/utils/index.js +2 -2
- package/dist_ts/proxies/smart-proxy/utils/ip-entry-validation.d.ts +14 -0
- package/dist_ts/proxies/smart-proxy/utils/ip-entry-validation.js +200 -0
- package/dist_ts/proxies/smart-proxy/utils/route-validation-error.d.ts +9 -0
- package/dist_ts/proxies/smart-proxy/utils/route-validation-error.js +19 -1
- package/dist_ts/proxies/smart-proxy/utils/route-validator.d.ts +9 -12
- package/dist_ts/proxies/smart-proxy/utils/route-validator.js +84 -81
- package/native-notices/crates/aho-corasick-1.1.4/copying +3 -0
- package/native-notices/crates/aho-corasick-1.1.4/license-mit +21 -0
- package/native-notices/crates/aho-corasick-1.1.4/unlicense +24 -0
- package/native-notices/crates/anstream-0.6.21/license-apache +202 -0
- package/native-notices/crates/anstream-0.6.21/license-mit +19 -0
- package/native-notices/crates/anstyle-1.0.13/license-apache +202 -0
- package/native-notices/crates/anstyle-1.0.13/license-mit +19 -0
- package/native-notices/crates/anstyle-parse-0.2.7/license-apache +202 -0
- package/native-notices/crates/anstyle-parse-0.2.7/license-mit +19 -0
- package/native-notices/crates/anstyle-query-1.1.5/license-apache +202 -0
- package/native-notices/crates/anstyle-query-1.1.5/license-mit +19 -0
- package/native-notices/crates/anyhow-1.0.101/license-apache +176 -0
- package/native-notices/crates/anyhow-1.0.101/license-mit +23 -0
- package/native-notices/crates/arc-swap-1.8.1/license-apache +201 -0
- package/native-notices/crates/arc-swap-1.8.1/license-mit +25 -0
- package/native-notices/crates/async-trait-0.1.89/license-apache +176 -0
- package/native-notices/crates/async-trait-0.1.89/license-mit +23 -0
- package/native-notices/crates/atomic-waker-1.1.2/license-apache +201 -0
- package/native-notices/crates/atomic-waker-1.1.2/license-mit +23 -0
- package/native-notices/crates/atomic-waker-1.1.2/license-third-party +45 -0
- package/native-notices/crates/autocfg-1.5.0/license-apache +201 -0
- package/native-notices/crates/autocfg-1.5.0/license-mit +25 -0
- package/native-notices/crates/aws-lc-rs-1.15.4/license +202 -0
- package/native-notices/crates/aws-lc-sys-0.37.0/license +489 -0
- package/native-notices/crates/base64-0.22.1/license-apache +201 -0
- package/native-notices/crates/base64-0.22.1/license-mit +21 -0
- package/native-notices/crates/block-buffer-0.10.4/license-apache +201 -0
- package/native-notices/crates/block-buffer-0.10.4/license-mit +25 -0
- package/native-notices/crates/bytes-1.11.1/license +25 -0
- package/native-notices/crates/cc-1.2.55/license-apache +201 -0
- package/native-notices/crates/cc-1.2.55/license-mit +25 -0
- package/native-notices/crates/cfg-if-1.0.4/license-apache +201 -0
- package/native-notices/crates/cfg-if-1.0.4/license-mit +25 -0
- package/native-notices/crates/cfg_aliases-0.2.1/license +9 -0
- package/native-notices/crates/cfg_aliases-0.2.1/notices.md +26 -0
- package/native-notices/crates/clap-4.5.57/license-apache +202 -0
- package/native-notices/crates/clap-4.5.57/license-mit +19 -0
- package/native-notices/crates/clap_builder-4.5.57/license-apache +202 -0
- package/native-notices/crates/clap_builder-4.5.57/license-mit +19 -0
- package/native-notices/crates/clap_derive-4.5.55/license-apache +202 -0
- package/native-notices/crates/clap_derive-4.5.55/license-mit +19 -0
- package/native-notices/crates/clap_lex-0.7.7/license-apache +202 -0
- package/native-notices/crates/clap_lex-0.7.7/license-mit +19 -0
- package/native-notices/crates/cmake-0.1.57/license-apache +201 -0
- package/native-notices/crates/cmake-0.1.57/license-mit +25 -0
- package/native-notices/crates/colorchoice-1.0.4/license-apache +202 -0
- package/native-notices/crates/colorchoice-1.0.4/license-mit +19 -0
- package/native-notices/crates/cpufeatures-0.2.17/license-apache +201 -0
- package/native-notices/crates/cpufeatures-0.2.17/license-mit +25 -0
- package/native-notices/crates/crossbeam-utils-0.8.21/license-apache +201 -0
- package/native-notices/crates/crossbeam-utils-0.8.21/license-mit +27 -0
- package/native-notices/crates/crypto-common-0.1.7/license-apache +201 -0
- package/native-notices/crates/crypto-common-0.1.7/license-mit +25 -0
- package/native-notices/crates/dashmap-6.1.0/license +21 -0
- package/native-notices/crates/deranged-0.5.5/license-apache +202 -0
- package/native-notices/crates/deranged-0.5.5/license-mit +19 -0
- package/native-notices/crates/digest-0.10.7/license-apache +201 -0
- package/native-notices/crates/digest-0.10.7/license-mit +25 -0
- package/native-notices/crates/dunce-1.0.5/license +121 -0
- package/native-notices/crates/equivalent-1.0.2/license-apache +201 -0
- package/native-notices/crates/equivalent-1.0.2/license-mit +25 -0
- package/native-notices/crates/errno-0.3.14/license-apache +201 -0
- package/native-notices/crates/errno-0.3.14/license-mit +25 -0
- package/native-notices/crates/fastbloom-0.14.1/license-apache +176 -0
- package/native-notices/crates/fastbloom-0.14.1/license-mit +25 -0
- package/native-notices/crates/fastrand-2.3.0/license-apache +201 -0
- package/native-notices/crates/fastrand-2.3.0/license-mit +23 -0
- package/native-notices/crates/find-msvc-tools-0.1.9/license-apache +201 -0
- package/native-notices/crates/find-msvc-tools-0.1.9/license-mit +25 -0
- package/native-notices/crates/fnv-1.0.7/license-apache +201 -0
- package/native-notices/crates/fnv-1.0.7/license-mit +25 -0
- package/native-notices/crates/fs_extra-1.3.0/license +21 -0
- package/native-notices/crates/futures-0.3.31/license-apache +202 -0
- package/native-notices/crates/futures-0.3.31/license-mit +26 -0
- package/native-notices/crates/futures-channel-0.3.31/license-apache +202 -0
- package/native-notices/crates/futures-channel-0.3.31/license-mit +26 -0
- package/native-notices/crates/futures-core-0.3.31/license-apache +202 -0
- package/native-notices/crates/futures-core-0.3.31/license-mit +26 -0
- package/native-notices/crates/futures-io-0.3.32/license-apache +202 -0
- package/native-notices/crates/futures-io-0.3.32/license-mit +26 -0
- package/native-notices/crates/futures-sink-0.3.31/license-apache +202 -0
- package/native-notices/crates/futures-sink-0.3.31/license-mit +26 -0
- package/native-notices/crates/futures-task-0.3.31/license-apache +202 -0
- package/native-notices/crates/futures-task-0.3.31/license-mit +26 -0
- package/native-notices/crates/futures-util-0.3.31/license-apache +202 -0
- package/native-notices/crates/futures-util-0.3.31/license-mit +26 -0
- package/native-notices/crates/generic-array-0.14.7/license +21 -0
- package/native-notices/crates/getrandom-0.2.17/license-apache +201 -0
- package/native-notices/crates/getrandom-0.2.17/license-mit +26 -0
- package/native-notices/crates/getrandom-0.3.4/license-apache +201 -0
- package/native-notices/crates/getrandom-0.3.4/license-mit +26 -0
- package/native-notices/crates/glob-match-0.2.1/license +21 -0
- package/native-notices/crates/h2-0.4.13/license +25 -0
- package/native-notices/crates/h3-0.0.8/license +25 -0
- package/native-notices/crates/h3-quinn-0.0.10/license +25 -0
- package/native-notices/crates/hashbrown-0.14.5/license-apache +201 -0
- package/native-notices/crates/hashbrown-0.14.5/license-mit +25 -0
- package/native-notices/crates/hashbrown-0.16.1/license-apache +201 -0
- package/native-notices/crates/hashbrown-0.16.1/license-mit +25 -0
- package/native-notices/crates/heck-0.5.0/license-apache +201 -0
- package/native-notices/crates/heck-0.5.0/license-mit +25 -0
- package/native-notices/crates/http-1.4.0/license-apache +201 -0
- package/native-notices/crates/http-1.4.0/license-mit +25 -0
- package/native-notices/crates/http-body-1.0.1/license +25 -0
- package/native-notices/crates/http-body-util-0.1.3/license +25 -0
- package/native-notices/crates/httparse-1.10.1/license-apache +201 -0
- package/native-notices/crates/httparse-1.10.1/license-mit +20 -0
- package/native-notices/crates/httpdate-1.0.3/license-apache +201 -0
- package/native-notices/crates/httpdate-1.0.3/license-mit +19 -0
- package/native-notices/crates/hyper-1.8.1/license +19 -0
- package/native-notices/crates/hyper-rustls-0.27.7/license +10 -0
- package/native-notices/crates/hyper-rustls-0.27.7/license-apache +201 -0
- package/native-notices/crates/hyper-rustls-0.27.7/license-isc +15 -0
- package/native-notices/crates/hyper-rustls-0.27.7/license-mit +25 -0
- package/native-notices/crates/hyper-util-0.1.20/license +19 -0
- package/native-notices/crates/indexmap-2.13.0/license-apache +201 -0
- package/native-notices/crates/indexmap-2.13.0/license-mit +25 -0
- package/native-notices/crates/instant-acme-0.7.2/license +201 -0
- package/native-notices/crates/ipnet-2.11.0/license-apache +201 -0
- package/native-notices/crates/ipnet-2.11.0/license-mit +7 -0
- package/native-notices/crates/is_terminal_polyfill-1.70.2/license-apache +202 -0
- package/native-notices/crates/is_terminal_polyfill-1.70.2/license-mit +19 -0
- package/native-notices/crates/itoa-1.0.17/license-apache +176 -0
- package/native-notices/crates/itoa-1.0.17/license-mit +23 -0
- package/native-notices/crates/jobserver-0.1.34/license-apache +201 -0
- package/native-notices/crates/jobserver-0.1.34/license-mit +25 -0
- package/native-notices/crates/jsonwebtoken-9.3.1/license +21 -0
- package/native-notices/crates/lazy_static-1.5.0/license-apache +201 -0
- package/native-notices/crates/lazy_static-1.5.0/license-mit +25 -0
- package/native-notices/crates/libc-0.2.180/license-apache +176 -0
- package/native-notices/crates/libc-0.2.180/license-mit +25 -0
- package/native-notices/crates/libm-0.2.16/license.txt +258 -0
- package/native-notices/crates/lock_api-0.4.14/license-apache +201 -0
- package/native-notices/crates/lock_api-0.4.14/license-mit +25 -0
- package/native-notices/crates/log-0.4.29/license-apache +201 -0
- package/native-notices/crates/log-0.4.29/license-mit +25 -0
- package/native-notices/crates/lru-slab-0.1.2/license-apache +202 -0
- package/native-notices/crates/lru-slab-0.1.2/license-mit +7 -0
- package/native-notices/crates/lru-slab-0.1.2/license-zlib +19 -0
- package/native-notices/crates/matchers-0.2.0/license +19 -0
- package/native-notices/crates/memchr-2.8.0/copying +3 -0
- package/native-notices/crates/memchr-2.8.0/license-mit +21 -0
- package/native-notices/crates/memchr-2.8.0/unlicense +24 -0
- package/native-notices/crates/mio-1.1.1/license +19 -0
- package/native-notices/crates/nu-ansi-term-0.50.3/license +22 -0
- package/native-notices/crates/num-bigint-0.4.6/license-apache +201 -0
- package/native-notices/crates/num-bigint-0.4.6/license-mit +25 -0
- package/native-notices/crates/num-conv-0.2.0/license-apache +202 -0
- package/native-notices/crates/num-conv-0.2.0/license-mit +19 -0
- package/native-notices/crates/num-integer-0.1.46/license-apache +201 -0
- package/native-notices/crates/num-integer-0.1.46/license-mit +25 -0
- package/native-notices/crates/num-traits-0.2.19/license-apache +201 -0
- package/native-notices/crates/num-traits-0.2.19/license-mit +25 -0
- package/native-notices/crates/once_cell-1.21.3/license-apache +201 -0
- package/native-notices/crates/once_cell-1.21.3/license-mit +23 -0
- package/native-notices/crates/openssl-probe-0.2.1/license-apache +201 -0
- package/native-notices/crates/openssl-probe-0.2.1/license-mit +25 -0
- package/native-notices/crates/parking_lot-0.12.5/license-apache +201 -0
- package/native-notices/crates/parking_lot-0.12.5/license-mit +25 -0
- package/native-notices/crates/parking_lot_core-0.9.12/license-apache +201 -0
- package/native-notices/crates/parking_lot_core-0.9.12/license-mit +25 -0
- package/native-notices/crates/pem-3.0.6/license.md +21 -0
- package/native-notices/crates/pin-project-lite-0.2.16/license-apache +177 -0
- package/native-notices/crates/pin-project-lite-0.2.16/license-mit +23 -0
- package/native-notices/crates/pin-utils-0.1.0/license-apache +201 -0
- package/native-notices/crates/pin-utils-0.1.0/license-mit +25 -0
- package/native-notices/crates/powerfmt-0.2.0/license-apache +202 -0
- package/native-notices/crates/powerfmt-0.2.0/license-mit +19 -0
- package/native-notices/crates/ppv-lite86-0.2.21/license-apache +201 -0
- package/native-notices/crates/ppv-lite86-0.2.21/license-mit +25 -0
- package/native-notices/crates/proc-macro2-1.0.106/license-apache +176 -0
- package/native-notices/crates/proc-macro2-1.0.106/license-mit +23 -0
- package/native-notices/crates/quinn-0.11.9/license-apache +201 -0
- package/native-notices/crates/quinn-0.11.9/license-mit +7 -0
- package/native-notices/crates/quinn-proto-0.11.14/license-apache +201 -0
- package/native-notices/crates/quinn-proto-0.11.14/license-mit +7 -0
- package/native-notices/crates/quinn-udp-0.5.14/license-apache +201 -0
- package/native-notices/crates/quinn-udp-0.5.14/license-mit +7 -0
- package/native-notices/crates/quote-1.0.44/license-apache +176 -0
- package/native-notices/crates/quote-1.0.44/license-mit +23 -0
- package/native-notices/crates/rand-0.9.2/copyright +12 -0
- package/native-notices/crates/rand-0.9.2/license-apache +176 -0
- package/native-notices/crates/rand-0.9.2/license-mit +26 -0
- package/native-notices/crates/rand_chacha-0.9.0/copyright +12 -0
- package/native-notices/crates/rand_chacha-0.9.0/license-apache +176 -0
- package/native-notices/crates/rand_chacha-0.9.0/license-mit +26 -0
- package/native-notices/crates/rand_core-0.9.5/copyright +12 -0
- package/native-notices/crates/rand_core-0.9.5/license-apache +187 -0
- package/native-notices/crates/rand_core-0.9.5/license-mit +26 -0
- package/native-notices/crates/rcgen-0.13.2/license +214 -0
- package/native-notices/crates/regex-1.12.3/license-apache +201 -0
- package/native-notices/crates/regex-1.12.3/license-mit +25 -0
- package/native-notices/crates/regex-automata-0.4.14/license-apache +201 -0
- package/native-notices/crates/regex-automata-0.4.14/license-mit +25 -0
- package/native-notices/crates/regex-syntax-0.8.9/license-apache +201 -0
- package/native-notices/crates/regex-syntax-0.8.9/license-mit +25 -0
- package/native-notices/crates/ring-0.17.14/extra/ring-0.17.14-once-cell-license-apache.txt +201 -0
- package/native-notices/crates/ring-0.17.14/extra/ring-0.17.14-once-cell-license-mit.txt +23 -0
- package/native-notices/crates/ring-0.17.14/extra/ring-0.17.14-source-attributions.txt +1544 -0
- package/native-notices/crates/ring-0.17.14/license +9 -0
- package/native-notices/crates/ring-0.17.14/license-boringssl +272 -0
- package/native-notices/crates/ring-0.17.14/license-other-bits +13 -0
- package/native-notices/crates/rustc-hash-2.1.1/license-apache +176 -0
- package/native-notices/crates/rustc-hash-2.1.1/license-mit +23 -0
- package/native-notices/crates/rustls-0.23.36/license-apache +201 -0
- package/native-notices/crates/rustls-0.23.36/license-isc +15 -0
- package/native-notices/crates/rustls-0.23.36/license-mit +25 -0
- package/native-notices/crates/rustls-native-certs-0.8.3/license +10 -0
- package/native-notices/crates/rustls-native-certs-0.8.3/license-apache +201 -0
- package/native-notices/crates/rustls-native-certs-0.8.3/license-isc +15 -0
- package/native-notices/crates/rustls-native-certs-0.8.3/license-mit +25 -0
- package/native-notices/crates/rustls-pemfile-2.2.0/license +10 -0
- package/native-notices/crates/rustls-pemfile-2.2.0/license-apache +201 -0
- package/native-notices/crates/rustls-pemfile-2.2.0/license-isc +15 -0
- package/native-notices/crates/rustls-pemfile-2.2.0/license-mit +25 -0
- package/native-notices/crates/rustls-pki-types-1.14.0/license-apache +201 -0
- package/native-notices/crates/rustls-pki-types-1.14.0/license-mit +25 -0
- package/native-notices/crates/rustls-platform-verifier-0.6.2/license-apache +201 -0
- package/native-notices/crates/rustls-platform-verifier-0.6.2/license-mit +21 -0
- package/native-notices/crates/rustls-webpki-0.103.9/license +19 -0
- package/native-notices/crates/rustversion-1.0.22/license-apache +176 -0
- package/native-notices/crates/rustversion-1.0.22/license-mit +23 -0
- package/native-notices/crates/scopeguard-1.2.0/license-apache +201 -0
- package/native-notices/crates/scopeguard-1.2.0/license-mit +25 -0
- package/native-notices/crates/serde-1.0.228/license-apache +176 -0
- package/native-notices/crates/serde-1.0.228/license-mit +23 -0
- package/native-notices/crates/serde_core-1.0.228/license-apache +176 -0
- package/native-notices/crates/serde_core-1.0.228/license-mit +23 -0
- package/native-notices/crates/serde_derive-1.0.228/license-apache +176 -0
- package/native-notices/crates/serde_derive-1.0.228/license-mit +23 -0
- package/native-notices/crates/serde_json-1.0.149/license-apache +176 -0
- package/native-notices/crates/serde_json-1.0.149/license-mit +23 -0
- package/native-notices/crates/sha1-0.10.6/license-apache +201 -0
- package/native-notices/crates/sha1-0.10.6/license-mit +27 -0
- package/native-notices/crates/sharded-slab-0.1.7/license +19 -0
- package/native-notices/crates/shlex-1.3.0/license-apache +13 -0
- package/native-notices/crates/shlex-1.3.0/license-mit +21 -0
- package/native-notices/crates/signal-hook-registry-1.4.8/license-apache +201 -0
- package/native-notices/crates/signal-hook-registry-1.4.8/license-mit +25 -0
- package/native-notices/crates/simple_asn1-0.6.3/license +13 -0
- package/native-notices/crates/siphasher-1.0.2/copying +7 -0
- package/native-notices/crates/siphasher-1.0.2/siphasher-license-mit.txt +17 -0
- package/native-notices/crates/slab-0.4.12/license +25 -0
- package/native-notices/crates/smallvec-1.15.1/license-apache +201 -0
- package/native-notices/crates/smallvec-1.15.1/license-mit +25 -0
- package/native-notices/crates/socket2-0.5.10/license-apache +201 -0
- package/native-notices/crates/socket2-0.5.10/license-mit +25 -0
- package/native-notices/crates/socket2-0.6.2/license-apache +201 -0
- package/native-notices/crates/socket2-0.6.2/license-mit +25 -0
- package/native-notices/crates/strsim-0.11.1/license +23 -0
- package/native-notices/crates/subtle-2.6.1/license +29 -0
- package/native-notices/crates/syn-2.0.114/license-apache +176 -0
- package/native-notices/crates/syn-2.0.114/license-mit +23 -0
- package/native-notices/crates/thiserror-1.0.69/license-apache +176 -0
- package/native-notices/crates/thiserror-1.0.69/license-mit +23 -0
- package/native-notices/crates/thiserror-2.0.18/license-apache +176 -0
- package/native-notices/crates/thiserror-2.0.18/license-mit +23 -0
- package/native-notices/crates/thiserror-impl-1.0.69/license-apache +176 -0
- package/native-notices/crates/thiserror-impl-1.0.69/license-mit +23 -0
- package/native-notices/crates/thiserror-impl-2.0.18/license-apache +176 -0
- package/native-notices/crates/thiserror-impl-2.0.18/license-mit +23 -0
- package/native-notices/crates/thread_local-1.1.9/license-apache +201 -0
- package/native-notices/crates/thread_local-1.1.9/license-mit +25 -0
- package/native-notices/crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-apache +201 -0
- package/native-notices/crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-mit +25 -0
- package/native-notices/crates/tikv-jemallocator-0.7.0/license-apache +201 -0
- package/native-notices/crates/tikv-jemallocator-0.7.0/license-mit +25 -0
- package/native-notices/crates/time-0.3.47/license-apache +177 -0
- package/native-notices/crates/time-0.3.47/license-mit +19 -0
- package/native-notices/crates/time-core-0.1.8/license-apache +177 -0
- package/native-notices/crates/time-core-0.1.8/license-mit +19 -0
- package/native-notices/crates/time-macros-0.2.27/license-apache +177 -0
- package/native-notices/crates/time-macros-0.2.27/license-mit +19 -0
- package/native-notices/crates/tinyvec-1.11.0/license-apache.md +202 -0
- package/native-notices/crates/tinyvec-1.11.0/license-mit.md +5 -0
- package/native-notices/crates/tinyvec-1.11.0/license-zlib.md +11 -0
- package/native-notices/crates/tinyvec_macros-0.1.1/license-apache.md +202 -0
- package/native-notices/crates/tinyvec_macros-0.1.1/license-mit.md +21 -0
- package/native-notices/crates/tinyvec_macros-0.1.1/license-zlib.md +20 -0
- package/native-notices/crates/tokio-1.49.0/license +21 -0
- package/native-notices/crates/tokio-macros-2.6.0/license +22 -0
- package/native-notices/crates/tokio-rustls-0.26.4/license-apache +201 -0
- package/native-notices/crates/tokio-rustls-0.26.4/license-mit +25 -0
- package/native-notices/crates/tokio-util-0.7.18/license +21 -0
- package/native-notices/crates/tower-service-0.3.3/license +25 -0
- package/native-notices/crates/tracing-0.1.44/license +25 -0
- package/native-notices/crates/tracing-attributes-0.1.31/license +25 -0
- package/native-notices/crates/tracing-core-0.1.36/license +25 -0
- package/native-notices/crates/tracing-log-0.2.0/license +25 -0
- package/native-notices/crates/tracing-subscriber-0.3.22/license +25 -0
- package/native-notices/crates/try-lock-0.2.5/license +21 -0
- package/native-notices/crates/typenum-1.20.1/license +1 -0
- package/native-notices/crates/typenum-1.20.1/license-apache +201 -0
- package/native-notices/crates/typenum-1.20.1/license-mit +21 -0
- package/native-notices/crates/unicode-ident-1.0.22/license-apache +176 -0
- package/native-notices/crates/unicode-ident-1.0.22/license-mit +23 -0
- package/native-notices/crates/unicode-ident-1.0.22/license-unicode +39 -0
- package/native-notices/crates/untrusted-0.9.0/license.txt +13 -0
- package/native-notices/crates/utf8parse-0.2.2/license-apache +176 -0
- package/native-notices/crates/utf8parse-0.2.2/license-mit +25 -0
- package/native-notices/crates/version_check-0.9.5/license-apache +201 -0
- package/native-notices/crates/version_check-0.9.5/license-mit +19 -0
- package/native-notices/crates/want-0.3.1/license +20 -0
- package/native-notices/crates/yasna-0.5.2/yasna-0.5.2-license-apache.txt +201 -0
- package/native-notices/crates/yasna-0.5.2/yasna-0.5.2-license-mit.txt +7 -0
- package/native-notices/crates/zerocopy-0.8.42/license-apache +202 -0
- package/native-notices/crates/zerocopy-0.8.42/license-bsd +24 -0
- package/native-notices/crates/zerocopy-0.8.42/license-mit +26 -0
- package/native-notices/crates/zeroize-1.8.2/license-apache +202 -0
- package/native-notices/crates/zeroize-1.8.2/license-mit +21 -0
- package/native-notices/crates/zmij-1.0.19/license-mit +23 -0
- package/native-notices/manifest.json +4124 -0
- package/native-notices/native/aws-lc-sys-0.37.0/aws-lc-1.67.0/aws-lc-license +530 -0
- package/native-notices/native/ring-0.17.14/boringssl-ring-0.17.14/license-boringssl +272 -0
- package/native-notices/native/ring-0.17.14/boringssl-ring-0.17.14/license-other-bits +13 -0
- package/native-notices/native/ring-0.17.14/fiat-crypto-ring-0.17.14/license-boringssl +272 -0
- package/native-notices/native/ring-0.17.14/fiat-crypto-ring-0.17.14/third_party-fiat-license +15 -0
- package/native-notices/native/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/jemalloc-5.3.1/jemalloc-copying +27 -0
- package/native-notices/readme.md +47 -0
- package/native-notices/runtime/gcc/gpl-3.0.txt +674 -0
- package/native-notices/runtime/gcc/runtime-library-exception-3.1.txt +73 -0
- package/native-notices/runtime/musl-1.2.5/copyright +193 -0
- package/native-notices/rust/compiler-builtins-license.txt +275 -0
- package/native-notices/rust/copyright-library.html +8266 -0
- package/native-notices/rust/crates/addr2line-0.25.1/license-apache +201 -0
- package/native-notices/rust/crates/addr2line-0.25.1/license-mit +25 -0
- package/native-notices/rust/crates/adler2-2.0.1/license-0bsd +12 -0
- package/native-notices/rust/crates/adler2-2.0.1/license-apache +201 -0
- package/native-notices/rust/crates/adler2-2.0.1/license-mit +23 -0
- package/native-notices/rust/crates/memchr-2.7.6/copying +3 -0
- package/native-notices/rust/crates/memchr-2.7.6/license-mit +21 -0
- package/native-notices/rust/crates/memchr-2.7.6/unlicense +24 -0
- package/native-notices/rust/crates/miniz_oxide-0.8.9/license +25 -0
- package/native-notices/rust/crates/miniz_oxide-0.8.9/license-apache.md +177 -0
- package/native-notices/rust/crates/miniz_oxide-0.8.9/license-mit.md +24 -0
- package/native-notices/rust/crates/miniz_oxide-0.8.9/license-zlib.md +14 -0
- package/native-notices/rust/crates/object-0.37.3/license-apache +201 -0
- package/native-notices/rust/crates/object-0.37.3/license-mit +25 -0
- package/native-notices/rust/licenses/apache-2.0.txt +73 -0
- package/native-notices/rust/licenses/bsd-2-clause.txt +9 -0
- package/native-notices/rust/licenses/cc-by-sa-4.0.txt +427 -0
- package/native-notices/rust/licenses/gcc-exception-3.1.txt +30 -0
- package/native-notices/rust/licenses/gpl-2.0-only.txt +133 -0
- package/native-notices/rust/licenses/gpl-3.0-or-later.txt +202 -0
- package/native-notices/rust/licenses/isc.txt +7 -0
- package/native-notices/rust/licenses/llvm-exception.txt +15 -0
- package/native-notices/rust/licenses/mit.txt +9 -0
- package/native-notices/rust/licenses/ncsa.txt +29 -0
- package/native-notices/rust/licenses/ofl-1.1.txt +43 -0
- package/native-notices/rust/licenses/unicode-3.0.txt +39 -0
- package/package.json +7 -6
- package/readme.md +15 -6
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/proxies/smart-proxy/rust-proxy-bridge.ts +10 -5
- package/ts/proxies/smart-proxy/smart-proxy.ts +10 -1
- package/ts/proxies/smart-proxy/utils/index.ts +1 -1
- package/ts/proxies/smart-proxy/utils/ip-entry-validation.ts +201 -0
- package/ts/proxies/smart-proxy/utils/route-validation-error.ts +20 -0
- package/ts/proxies/smart-proxy/utils/route-validator.ts +94 -83
- package/dist_rust/rustproxy_linux_amd64 +0 -0
- package/dist_rust/rustproxy_linux_amd64.tsrust-build.json +0 -14
- package/dist_rust/rustproxy_linux_arm64.tsrust-build.json +0 -14
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import * as plugins from '../../../plugins.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validation of configured IP entries, one rule per Rust parser that reads them.
|
|
4
|
+
*
|
|
5
|
+
* Every check accepts exactly what its Rust reader can match and answers why it refuses anything
|
|
6
|
+
* else, so a configuration that validates never carries an entry the engine silently ignores:
|
|
7
|
+
*
|
|
8
|
+
* - Security lists (`security.ipAllowList`, `security.ipBlockList`, `defaults.security`,
|
|
9
|
+
* `securityPolicy.blockedIps`/`blockedCidrs`) are read by `rustproxy-security` `IpPattern::parse`:
|
|
10
|
+
* `*`, an address or an `ipnet` prefix, compared as parsed addresses with the client converted
|
|
11
|
+
* from IPv4-mapped IPv6 to IPv4. Anything else becomes `0.0.0.0` and never matches.
|
|
12
|
+
* - Source matches (`match.clientIp`, `trustedProxyIPs` of a route policy or the settings) are read
|
|
13
|
+
* by `rustproxy-routing` `matchers::ip_matches`: `*`, an `ipnet` prefix, a four-part IPv4 wildcard,
|
|
14
|
+
* or an exact address compared as text against the client's Rust `Display` form, after a leading
|
|
15
|
+
* `::ffff:` is stripped from both sides.
|
|
16
|
+
* - VPN assigned addresses (`security.vpn.allowedAssignedIps`) are compared as text against the
|
|
17
|
+
* address the VPN metadata carries.
|
|
18
|
+
*
|
|
19
|
+
* A check answers `null` for an entry it accepts, else the reason it refuses it.
|
|
20
|
+
*/
|
|
21
|
+
const ipv4MappedPrefixLength = 96;
|
|
22
|
+
/** An address without a zone index, in any textual form `node:net` and Rust both read. */
|
|
23
|
+
const ipFamilyOf = (value) => {
|
|
24
|
+
if (value.includes('%'))
|
|
25
|
+
return 0;
|
|
26
|
+
return plugins.net.isIP(value);
|
|
27
|
+
};
|
|
28
|
+
/** The eight 16-bit segments of an IPv6 address `node:net` already accepted. */
|
|
29
|
+
const ipv6SegmentsOf = (address) => {
|
|
30
|
+
const toSegments = (text) => {
|
|
31
|
+
if (text === '')
|
|
32
|
+
return [];
|
|
33
|
+
const segments = [];
|
|
34
|
+
for (const part of text.split(':')) {
|
|
35
|
+
if (part.includes('.')) {
|
|
36
|
+
const [a, b, c, d] = part.split('.').map(Number);
|
|
37
|
+
segments.push((a << 8) | b, (c << 8) | d);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
segments.push(parseInt(part, 16));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return segments;
|
|
44
|
+
};
|
|
45
|
+
const compressionAt = address.indexOf('::');
|
|
46
|
+
if (compressionAt === -1) {
|
|
47
|
+
return toSegments(address);
|
|
48
|
+
}
|
|
49
|
+
const head = toSegments(address.slice(0, compressionAt));
|
|
50
|
+
const tail = toSegments(address.slice(compressionAt + 2));
|
|
51
|
+
return [...head, ...new Array(8 - head.length - tail.length).fill(0), ...tail];
|
|
52
|
+
};
|
|
53
|
+
/** The IPv4 address an IPv4-mapped IPv6 address (`::ffff:a.b.c.d`) carries, else `null`. */
|
|
54
|
+
const ipv4MappedOf = (segments) => {
|
|
55
|
+
if (segments.slice(0, 5).some((segment) => segment !== 0) || segments[5] !== 0xffff) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return [segments[6] >> 8, segments[6] & 0xff, segments[7] >> 8, segments[7] & 0xff].join('.');
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* The address as Rust's `Display` writes it: IPv4 unchanged (`node:net` admits only plain decimal
|
|
62
|
+
* octets), IPv4-mapped IPv6 as `::ffff:a.b.c.d`, any other IPv6 in lowercase hex without leading
|
|
63
|
+
* zeros and with the first longest run of two or more zero segments written as `::`.
|
|
64
|
+
*/
|
|
65
|
+
export const formatIpAddress = (address) => {
|
|
66
|
+
if (ipFamilyOf(address) !== 6) {
|
|
67
|
+
return address;
|
|
68
|
+
}
|
|
69
|
+
const segments = ipv6SegmentsOf(address);
|
|
70
|
+
const mapped = ipv4MappedOf(segments);
|
|
71
|
+
if (mapped !== null) {
|
|
72
|
+
return `::ffff:${mapped}`;
|
|
73
|
+
}
|
|
74
|
+
let longestStart = 0;
|
|
75
|
+
let longestLength = 0;
|
|
76
|
+
let currentStart = 0;
|
|
77
|
+
let currentLength = 0;
|
|
78
|
+
segments.forEach((segment, index) => {
|
|
79
|
+
if (segment === 0) {
|
|
80
|
+
if (currentLength === 0)
|
|
81
|
+
currentStart = index;
|
|
82
|
+
currentLength += 1;
|
|
83
|
+
if (currentLength > longestLength) {
|
|
84
|
+
longestStart = currentStart;
|
|
85
|
+
longestLength = currentLength;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
currentLength = 0;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
const hex = (part) => part.map((segment) => segment.toString(16)).join(':');
|
|
93
|
+
if (longestLength > 1) {
|
|
94
|
+
return `${hex(segments.slice(0, longestStart))}::${hex(segments.slice(longestStart + longestLength))}`;
|
|
95
|
+
}
|
|
96
|
+
return hex(segments);
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* An address, `/` and a prefix length as `ipnet` parses it: up to two digits and at most 32 for
|
|
100
|
+
* IPv4, up to three digits and at most 128 for IPv6. Host bits may be set.
|
|
101
|
+
*/
|
|
102
|
+
const parsePrefix = (value) => {
|
|
103
|
+
const parts = value.split('/');
|
|
104
|
+
if (parts.length !== 2)
|
|
105
|
+
return null;
|
|
106
|
+
const [address, lengthText] = parts;
|
|
107
|
+
const family = ipFamilyOf(address);
|
|
108
|
+
if (family === 4 && /^\d{1,2}$/.test(lengthText) && Number(lengthText) <= 32) {
|
|
109
|
+
return { address, family, length: Number(lengthText) };
|
|
110
|
+
}
|
|
111
|
+
if (family === 6 && /^\d{1,3}$/.test(lengthText) && Number(lengthText) <= 128) {
|
|
112
|
+
return { address, family, length: Number(lengthText) };
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
};
|
|
116
|
+
/** The IPv4 prefix an IPv4-mapped IPv6 prefix of at least 96 bits covers, else `null`. */
|
|
117
|
+
const ipv4PrefixOfMapped = (prefix) => {
|
|
118
|
+
if (prefix.family !== 6 || prefix.length < ipv4MappedPrefixLength)
|
|
119
|
+
return null;
|
|
120
|
+
const mapped = ipv4MappedOf(ipv6SegmentsOf(prefix.address));
|
|
121
|
+
return mapped === null ? null : `${mapped}/${prefix.length - ipv4MappedPrefixLength}`;
|
|
122
|
+
};
|
|
123
|
+
/** A four-part IPv4 wildcard with plain decimal octets first and only `*` parts after them. */
|
|
124
|
+
const isIpv4TrailingWildcard = (value) => {
|
|
125
|
+
const parts = value.split('.');
|
|
126
|
+
if (parts.length !== 4)
|
|
127
|
+
return false;
|
|
128
|
+
const firstWildcard = parts.indexOf('*');
|
|
129
|
+
if (firstWildcard === -1)
|
|
130
|
+
return false;
|
|
131
|
+
return parts.slice(0, firstWildcard).every((part) => /^(0|[1-9]\d{0,2})$/.test(part) && Number(part) <= 255)
|
|
132
|
+
&& parts.slice(firstWildcard).every((part) => part === '*');
|
|
133
|
+
};
|
|
134
|
+
const zoneIndexReason = 'a zone index (%…) is not supported';
|
|
135
|
+
/** Checks an entry of a security list: `ipAllowList`, `ipBlockList` or a global block list. */
|
|
136
|
+
export const checkSecurityIpEntry = (entry) => {
|
|
137
|
+
if (typeof entry !== 'string')
|
|
138
|
+
return 'must be a string';
|
|
139
|
+
if (entry === '*')
|
|
140
|
+
return null;
|
|
141
|
+
if (entry.includes('%'))
|
|
142
|
+
return zoneIndexReason;
|
|
143
|
+
const family = ipFamilyOf(entry);
|
|
144
|
+
if (family !== 0) {
|
|
145
|
+
const mapped = family === 6 ? ipv4MappedOf(ipv6SegmentsOf(entry)) : null;
|
|
146
|
+
return mapped === null
|
|
147
|
+
? null
|
|
148
|
+
: `an IPv4-mapped address never matches, because clients are compared as IPv4; write ${mapped}`;
|
|
149
|
+
}
|
|
150
|
+
const prefix = parsePrefix(entry);
|
|
151
|
+
if (prefix) {
|
|
152
|
+
const ipv4Prefix = ipv4PrefixOfMapped(prefix);
|
|
153
|
+
return ipv4Prefix === null
|
|
154
|
+
? null
|
|
155
|
+
: `an IPv4-mapped prefix never matches, because clients are compared as IPv4; write ${ipv4Prefix}`;
|
|
156
|
+
}
|
|
157
|
+
return "must be '*', an IPv4 or IPv6 address, or an address prefix such as 192.0.2.0/24";
|
|
158
|
+
};
|
|
159
|
+
/** Checks a source-match entry: `match.clientIp` or a `trustedProxyIPs` entry. */
|
|
160
|
+
export const checkSourceMatchIpEntry = (entry) => {
|
|
161
|
+
if (typeof entry !== 'string')
|
|
162
|
+
return 'must be a string';
|
|
163
|
+
if (entry === '*')
|
|
164
|
+
return null;
|
|
165
|
+
if (entry.includes('%'))
|
|
166
|
+
return zoneIndexReason;
|
|
167
|
+
if (ipFamilyOf(entry) !== 0) {
|
|
168
|
+
const canonical = formatIpAddress(entry);
|
|
169
|
+
return canonical === entry
|
|
170
|
+
? null
|
|
171
|
+
: `an exact address is compared as text with the client address; write ${canonical}`;
|
|
172
|
+
}
|
|
173
|
+
const prefix = parsePrefix(entry);
|
|
174
|
+
if (prefix) {
|
|
175
|
+
const ipv4Prefix = ipv4PrefixOfMapped(prefix);
|
|
176
|
+
return ipv4Prefix === null
|
|
177
|
+
? null
|
|
178
|
+
: `an IPv4-mapped prefix never matches, because clients are compared as IPv4; write ${ipv4Prefix}`;
|
|
179
|
+
}
|
|
180
|
+
if (isIpv4TrailingWildcard(entry))
|
|
181
|
+
return null;
|
|
182
|
+
return "must be '*', an IPv4 or IPv6 address, an address prefix such as 192.0.2.0/24, "
|
|
183
|
+
+ 'or a four-part IPv4 wildcard such as 192.0.2.*';
|
|
184
|
+
};
|
|
185
|
+
/** Checks a `security.vpn.allowedAssignedIps` entry. */
|
|
186
|
+
export const checkAssignedIpEntry = (entry) => {
|
|
187
|
+
if (typeof entry !== 'string')
|
|
188
|
+
return 'must be a string';
|
|
189
|
+
if (entry.includes('%'))
|
|
190
|
+
return zoneIndexReason;
|
|
191
|
+
if (ipFamilyOf(entry) === 0)
|
|
192
|
+
return 'must be one IPv4 or IPv6 address';
|
|
193
|
+
const canonical = formatIpAddress(entry);
|
|
194
|
+
return canonical === entry
|
|
195
|
+
? null
|
|
196
|
+
: `an assigned address is compared as text with the VPN client's address; write ${canonical}`;
|
|
197
|
+
};
|
|
198
|
+
/** Formats one refused entry for a validation message. */
|
|
199
|
+
export const describeRefusedIpEntry = (labelArg, entryArg, reasonArg) => `${labelArg}: ${String(entryArg)} (${reasonArg})`;
|
|
200
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXAtZW50cnktdmFsaWRhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3RzL3Byb3hpZXMvc21hcnQtcHJveHkvdXRpbHMvaXAtZW50cnktdmFsaWRhdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLHFCQUFxQixDQUFDO0FBRS9DOzs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FrQkc7QUFFSCxNQUFNLHNCQUFzQixHQUFHLEVBQUUsQ0FBQztBQUVsQywwRkFBMEY7QUFDMUYsTUFBTSxVQUFVLEdBQUcsQ0FBQyxLQUFhLEVBQWEsRUFBRTtJQUM5QyxJQUFJLEtBQUssQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDO1FBQUU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0FBQyxDQUFDO0lBQ3pDLE9BQU8sU0FBUyxLQUFLLEtBQUs7UUFDeEIsQ0FBQyxDQUFDLElBQUk7UUFDTixDQUFDLENBQUMsZ0ZBQWdGLFNBQVMsRUFBRSxDQUFDO0FBQ2xHLENBQUMsQ0FBQztBQUVGLDBEQUEwRDtBQUMxRCxNQUFNLENBQUMsTUFBTSxzQkFBc0IsR0FBRyxDQUFDLFFBQWdCLEVBQUUsUUFBaUIsRUFBRSxTQUFpQixFQUFVLEVBQUUsQ0FDdkcsR0FBRyxRQUFRLEtBQUssTUFBTSxDQUFDLFFBQVEsQ0FBQyxLQUFLLFNBQVMsR0FBRyxDQUFDIn0=
|
|
@@ -22,3 +22,12 @@ export declare class RouteValidationError extends Error {
|
|
|
22
22
|
readonly errors: IRouteValidationErrorEntry[];
|
|
23
23
|
constructor(summaryArg: string, errorsArg: IRouteValidationErrorEntry[]);
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Thrown when SmartProxy refuses settings outside its routes because they failed validation.
|
|
27
|
+
*
|
|
28
|
+
* `messages` lists every reason. The message names the first reasons only.
|
|
29
|
+
*/
|
|
30
|
+
export declare class SettingsValidationError extends Error {
|
|
31
|
+
readonly messages: string[];
|
|
32
|
+
constructor(summaryArg: string, messagesArg: string[]);
|
|
33
|
+
}
|
|
@@ -38,4 +38,22 @@ export class RouteValidationError extends Error {
|
|
|
38
38
|
this.errors = errorsArg;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Thrown when SmartProxy refuses settings outside its routes because they failed validation.
|
|
43
|
+
*
|
|
44
|
+
* `messages` lists every reason. The message names the first reasons only.
|
|
45
|
+
*/
|
|
46
|
+
export class SettingsValidationError extends Error {
|
|
47
|
+
messages;
|
|
48
|
+
constructor(summaryArg, messagesArg) {
|
|
49
|
+
const shownMessages = messagesArg.slice(0, MAX_MESSAGES_PER_ROUTE_IN_MESSAGE).map(truncateText);
|
|
50
|
+
const hiddenMessageCount = messagesArg.length - shownMessages.length;
|
|
51
|
+
if (hiddenMessageCount > 0) {
|
|
52
|
+
shownMessages.push(`and ${hiddenMessageCount} more`);
|
|
53
|
+
}
|
|
54
|
+
super(`${summaryArg}: ${shownMessages.join('; ')}`);
|
|
55
|
+
this.name = 'SettingsValidationError';
|
|
56
|
+
this.messages = messagesArg;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUtdmFsaWRhdGlvbi1lcnJvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3RzL3Byb3hpZXMvc21hcnQtcHJveHkvdXRpbHMvcm91dGUtdmFsaWRhdGlvbi1lcnJvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFlQSxNQUFNLHFCQUFxQixHQUFHLEVBQUUsQ0FBQztBQUNqQyxNQUFNLGlDQUFpQyxHQUFHLENBQUMsQ0FBQztBQUM1QyxNQUFNLDBCQUEwQixHQUFHLEdBQUcsQ0FBQztBQUV2QyxTQUFTLFlBQVksQ0FBQyxPQUFlO0lBQ25DLE9BQU8sT0FBTyxDQUFDLE1BQU0sR0FBRywwQkFBMEI7UUFDaEQsQ0FBQyxDQUFDLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQUUsMEJBQTBCLENBQUMsR0FBRztRQUNwRCxDQUFDLENBQUMsT0FBTyxDQUFDO0FBQ2QsQ0FBQztBQUVELFNBQVMsV0FBVyxDQUFDLFFBQW9DO0lBQ3ZELE1BQU0sYUFBYSxHQUFHLFFBQVEsQ0FBQyxRQUFRO1NBQ3BDLEtBQUssQ0FBQyxDQUFDLEVBQUUsaUNBQWlDLENBQUM7U0FDM0MsR0FBRyxDQUFDLFlBQVksQ0FBQyxDQUFDO0lBQ3JCLE1BQU0sa0JBQWtCLEdBQUcsUUFBUSx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QyxDQUFDLENBQUM7UUFDNUMsSUFBSSxDQUFDLElBQUksR0FBRyxzQkFBc0IsQ0FBQztRQUNuQyxJQUFJLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQztJQUMxQixDQUFDO0NBQ0Y7QUFFRDs7OztHQUlHO0FBQ0gsTUFBTSxPQUFPLHVCQUF3QixTQUFRLEtBQUs7SUFDaEMsUUFBUSxDQUFXO0lBRW5DLFlBQVksVUFBa0IsRUFBRSxXQUFxQjtRQUNuRCxNQUFNLGFBQWEsR0FBRyxXQUFXLENBQUMsS0FBSyxDQUFDLENBQUMsRUFBRSxpQ0FBaUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsQ0FBQztRQUNoRyxNQUFNLGtCQUFrQixHQUFHLFdBQVcsQ0FBQyxNQUFNLEdBQUcsYUFBYSxDQUFDLE1BQU0sQ0FBQztRQUNyRSxJQUFJLGtCQUFrQixHQUFHLENBQUMsRUFBRSxDQUFDO1lBQzNCLGFBQWEsQ0FBQyxJQUFJLENBQUMsT0FBTyxrQkFBa0IsT0FBTyxDQUFDLENBQUM7UUFDdkQsQ0FBQztRQUNELEtBQUssQ0FBQyxHQUFHLFVBQVUsS0FBSyxhQUFhLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQztRQUNwRCxJQUFJLENBQUMsSUFBSSxHQUFHLHlCQUF5QixDQUFDO1FBQ3RDLElBQUksQ0FBQyxRQUFRLEdBQUcsV0FBVyxDQUFDO0lBQzlCLENBQUM7Q0FDRiJ9
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IRouteConfig, IRouteMatch, IRouteAction } from '../models/route-types.js';
|
|
2
|
+
import type { ISmartProxyOptions, ISmartProxySecurityPolicy } from '../models/interfaces.js';
|
|
2
3
|
import { type IRouteValidationErrorEntry } from './route-validation-error.js';
|
|
3
4
|
/**
|
|
4
5
|
* Validates route configurations for correctness and safety
|
|
@@ -22,6 +23,14 @@ export declare class RouteValidator {
|
|
|
22
23
|
* A name or id that several routes share gets `[<index>]` appended, so every label is unique.
|
|
23
24
|
*/
|
|
24
25
|
static getRouteLabels(routes: IRouteConfig[]): string[];
|
|
26
|
+
/**
|
|
27
|
+
* Validate the IP entries of the settings outside routes: the global `trustedProxyIPs`, the
|
|
28
|
+
* `defaults.security` lists the engine copies into routes without security, and the global
|
|
29
|
+
* `securityPolicy`. Answers every reason, empty when the settings are valid.
|
|
30
|
+
*/
|
|
31
|
+
static validateSettings(settings: Pick<ISmartProxyOptions, 'trustedProxyIPs' | 'defaults' | 'securityPolicy'>): string[];
|
|
32
|
+
/** Validate the IP entries of a global ingress security policy. */
|
|
33
|
+
static validateSecurityPolicy(policy: ISmartProxySecurityPolicy): string[];
|
|
25
34
|
/**
|
|
26
35
|
* Validate multiple route configurations.
|
|
27
36
|
*
|
|
@@ -54,18 +63,6 @@ export declare class RouteValidator {
|
|
|
54
63
|
* Validate path pattern
|
|
55
64
|
*/
|
|
56
65
|
private static isValidPath;
|
|
57
|
-
/**
|
|
58
|
-
* Validate IP pattern
|
|
59
|
-
*/
|
|
60
|
-
private static isValidIPPattern;
|
|
61
|
-
/**
|
|
62
|
-
* Validate IPv4 address
|
|
63
|
-
*/
|
|
64
|
-
private static isValidIPv4;
|
|
65
|
-
/**
|
|
66
|
-
* Validate IPv6 address
|
|
67
|
-
*/
|
|
68
|
-
private static isValidIPv6;
|
|
69
66
|
/**
|
|
70
67
|
* Log validation errors
|
|
71
68
|
*/
|