Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@onekeyfe/react-native-sni-connect

Latest version: v6.8.0-23

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: 1keyfe
5 Stars
9 Forks
249 Versions
37.5K Downloads
TypeScript Repo language

Scan summary

@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.

  • Releases: 249 versions; the latest 5 were published on 23 Nov 2026.
  • Findings: No rules fired in version 6.8.0-23.
  • Downloads: 37,477 downloads.

Versions

249 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

No rules fired in 6.8.0-23

Findings

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.

README

The publisher’s own README, as collected from the registry.

@onekeyfe/react-native-sni-connect

HTTPS requests to a caller-supplied IP while TLS still validates the real hostname.

npm license iOS Android TurboModule

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.

Features

  • Pinned destination, real TLS identity — SNI, Host and certificate verification use hostname; ip only chooses the socket target.
  • Strict request validation — public IP literals only, relative paths only, control characters and module-owned routing headers rejected before I/O.
  • Bounded concurrency — 64 active requests per process, 16 per (hostname, ip) pair, a 256-request queue and SNI_RESOURCE_LIMIT on overflow.
  • Request-id cancellation — cancel one in-flight request or every request owned by the current runtime.
  • Binary uploads — uploadFile() streams a local file up to 20 MiB; isUploadFileSupported() feature-detects older native binaries.
  • Operational hooks — clearDNSCache(), per-pair getDebugSnapshot() and a isProxyActiveForUrl() preflight for adapters.

Installation

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" />

Usage

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.

Node/Desktop uploads

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.

API

React Native

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.
Node/Desktop

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.
Shared methods
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.

Platform support

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 ✅ ✅ —

Caveats

[!IMPORTANT] ip must be a public IP literal — loopback, private, link-local (including cloud metadata), CGNAT, multicast and reserved ranges are rejected. path cannot carry a scheme, host or port, and Host / Content-Length stay 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 with isUploadFileSupported() 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 multiValueHeaders is built. isProxyActiveForUrl() only reports proxy state; SNI transport always bypasses system proxy configuration.

References

  • OSCS standard
  • Native upload contract
  • Native interface
  • npm package
  • Changelog

License

MIT. See LICENSE.

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm @onekeyfe/react-native-sni-connect

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Frame 2085668439 (1)
Group 1261154229