Scan your whole stack
From OX Research Newsroom
Are you using @onekeyfe/react-native-sni-connect?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v6.8.0-23
@onekeyfe/react-native-sni-connect was last scanned on 23 Nov 2026 at version 6.8.0-23. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 6.8.0-23 LATEST | 23 Nov 2026 | No rules fired |
| 6.8.0-22 | 23 Nov 2026 | No rules fired |
| 6.8.0-21 | 23 Nov 2026 | No rules fired |
| 6.8.0-20 | 23 Nov 2026 | Not shown |
| 6.8.0-19 | 23 Nov 2026 | Not shown |
Findings for v6.8.0-23. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 6.8.0-23; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
HTTPS requests to a caller-supplied IP while TLS still validates the real hostname.
Connects to a literal IP address you already resolved while preserving the real
hostname's TLS SNI, Host header and certificate validation, so the certificate
chain is checked against the hostname rather than the IP. Requests are text-only:
send a UTF-8 body or stream an app-sandbox file through uploadFile(). The
transport uses EMASCurl (libcurl) on iOS, OkHttp on Android, and Node HTTPS
in Electron's main process. Each connection uses HTTPS on port 443 and is
pinned to a validated public destination.
Host and certificate
verification use hostname; ip only chooses the socket target.(hostname, ip) pair, a 256-request queue and SNI_RESOURCE_LIMIT on overflow.uploadFile() streams a local file up to 20 MiB;
isUploadFileSupported() feature-detects older native binaries.clearDNSCache(), per-pair getDebugSnapshot() and a
isProxyActiveForUrl() preflight for adapters.yarn add @onekeyfe/react-native-sni-connect
Rebuild the native application after installing; the TurboModule is resolved at import time and throws a linking error when the pods or Android native build are missing. Android links through autolinking.
iOS. The pod depends on EMASCurl, which lives in Aliyun's spec repo. Add that source
and keep EMASCurl modular in the Podfile, then run pod install:
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/aliyun/aliyun-specs.git'
target 'YourApp' do
# React Native autolinks SniConnect. This explicit pod keeps Swift
# `import EMASCurl` visible when building static libraries.
pod 'EMASCurl', :modular_headers => true
end
Android. The application must declare the normal INTERNET permission:
<uses-permission android:name="android.permission.INTERNET" />
import {
request,
cancelRequest,
isProxyActiveForUrl,
} from '@onekeyfe/react-native-sni-connect';
const proxyActive = await isProxyActiveForUrl('https://example.com/api/v1/ping');
// Adapters should avoid SNI mode while a per-URL/system proxy is active.
const res = await request({
requestId: 'health-check-1', // required only if you want to cancel it
ip: '93.184.216.34', // public IP literal; private/loopback/metadata are rejected
hostname: 'example.com', // SNI, Host header and certificate validation
method: 'GET',
path: '/api/v1/ping', // relative path only; absolute URLs are rejected
headers: { 'Content-Type': 'application/json' },
timeout: 30_000,
});
console.log(res.status, res.headers, res.data);
await cancelRequest('health-check-1');
HTTP 4xx and 5xx resolve as normal responses; inspect status. The caller
owns the target IP, the request id lifecycle and higher-level retry policy.
Import SniNodeClient from the /node entry and configure
getAllowedUploadRoots to return the directories where your app writes its
archives. With no usable roots, uploads reject with SNI_INVALID_CONFIG.
import { join } from 'node:path';
import { app } from 'electron';
import { SniNodeClient } from '@onekeyfe/react-native-sni-connect/node';
const archiveRoot = join(app.getPath('userData'), 'log-archives');
const client = new SniNodeClient({
getAllowedUploadRoots: () => [archiveRoot],
});
async function uploadLogArchive(ip: string, fileName: string) {
return client.uploadFile({
ip, // Public IP resolved for wallet.onekeycn.com
hostname: 'wallet.onekeycn.com',
path: '/wallet/v1/client/log',
method: 'POST',
headers: { 'content-type': 'application/zip' },
filePath: join(archiveRoot, fileName),
timeout: 30_000,
});
}
The defaults allow POST and PUT to /wallet/v1/client/log on
https://wallet.onekeycn.com and https://wallet.onekeytest.com. The resolved
file must be a readable .zip directly under a configured root, between
1 byte and 20 MiB. Use verifyUploadFile for additional app-specific checks.
Import these functions and types from @onekeyfe/react-native-sni-connect.
| Export | Signature | Description |
|---|---|---|
request |
(config: SniConnectRequest) => Promise<SniConnectResponse> |
Sends an HTTPS request over the pinned SNI transport. |
uploadFile |
(config: SniConnectUploadFileRequest) => Promise<SniConnectResponse> |
Sends a local file body (POST or PUT, 1 byte–20 MiB). |
isUploadFileSupported |
() => boolean |
Reports whether the loaded native module exposes uploadFile. |
getUploadProgress |
(requestId: string) => Promise<SniConnectUploadProgress \| null> |
Reads the active upload progress for an ID. |
getDebugSnapshot |
(target: SniConnectDebugTarget) => Promise<SniConnectDebugSnapshot> |
Reads active and pending counters and request IDs for one pair. |
Import SniNodeClient and these types from
@onekeyfe/react-native-sni-connect/node. Call the methods on a client
instance. Use body: null for a GET or HEAD request.
| Method | Signature | Description |
|---|---|---|
request |
(config: SniNodeRequestConfig) => Promise<SniNodeResponse> |
Sends an HTTPS request over the pinned SNI transport. |
uploadFile |
(config: SniNodeUploadFileConfig) => Promise<SniNodeResponse> |
Streams a file from a configured app directory. |
getUploadProgress |
(requestId: string) => Promise<SniNodeUploadProgress \| null> |
Reads the active upload progress for an ID. |
getDebugSnapshot |
(target: Pick<SniNodeRequestConfig, 'hostname' \| 'ip'>) => Promise<SniNodeDebugSnapshot> |
Reads active and pending request counters for one pair. |
| Method | Signature | Description |
|---|---|---|
cancelRequest |
(requestId: string) => Promise<{ success: boolean }> |
Cancels the active request with that ID. |
cancelAllRequests |
() => Promise<{ success: boolean }> |
Cancels requests owned by the module or client instance. |
clearDNSCache |
() => Promise<{ success: boolean }> |
Evicts cached pinned destinations, clients and idle connections. |
isProxyActiveForUrl |
(url: string) => Promise<boolean> |
Reports whether the URL would use a proxy. |
Responses contain data (string), status, statusText, headers and
optional multiValueHeaders. Limits are 1 MiB for string bodies, 8 KiB for
path/query, 64 headers and 32 KiB total header bytes, and 10 MiB for responses.
| Capability | iOS | Android | Node/Desktop | Web |
|---|---|---|---|---|
| Pinned-IP request with hostname TLS | ✅ | ✅ | ✅ | — |
| String request body | ✅ | ✅ | ✅ | — |
Binary file upload (uploadFile) |
✅ | ✅ | ✅ | — |
| Per-request and bulk cancellation | ✅ | ✅ | ✅ | — |
| Cache clear and debug snapshot | ✅ | ✅ | ✅ | — |
| Proxy preflight | ✅ | ✅ | Requires a session resolver | — |
Repeated response headers (multiValueHeaders) |
⚠️ may collapse | ✅ | ✅ | — |
[!IMPORTANT]
ipmust be a public IP literal — loopback, private, link-local (including cloud metadata), CGNAT, multicast and reserved ranges are rejected.pathcannot carry a scheme, host or port, andHost/Content-Lengthstay module-owned.
[!WARNING] This is a text-response API with a 10 MiB response cap; binary response transport is out of scope. Send binary request bodies with
uploadFile()and feature-detect it withisUploadFileSupported()before use.
[!NOTE] On iOS the EMASCurl version used here exposes response headers as a dictionary view, so repeated headers may already be collapsed before
multiValueHeadersis built.isProxyActiveForUrl()only reports proxy state; SNI transport always bypasses system proxy configuration.
MIT. See LICENSE.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.