You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

react-native-websocket-ssl-pinning

Package Overview
Dependencies
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

react-native-websocket-ssl-pinning

Creates a secure WebSocket connection using ssl-pinning technique

0.2.8
unpublished
Source
npm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

react-native-websocket-ssl-pinning

Creates a secure WebSocket connection using ssl-pinning technique.

THIS PROJECT IS STILL IN DEVELOPMENT STAGE

Installation

yarn add react-native-websocket-ssl-pinning

Usage

Create the connection

import { fetch } from 'react-native-websocket-ssl-pinning';

try{
  const response = await fetch(`wss://${serverip}/`, {
	method: 'GET',
	timeoutInterval: 10000, // Request timeout
	sslPinning: {
	  certs: ['rootCA_public'],
	},
  });
  
  if (response.code === 101) {
	console.log(
	  'Switching protocols. Starting secure web socket connection...',
	);

	socketOpen()
  }
} catch(e) {
  console.error(e);
}

TODO: finish usage

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Made with create-react-native-library

Keywords

react-native

FAQs

Package last updated on 11 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts