Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@master_jacky/react-native-vpn-detect

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@master_jacky/react-native-vpn-detect

Checks for VPN & Proxy - Community maintained backup of react-native-vpn-detect

latest
Source
npmnpm
Version
2.0.0
Version published
Weekly downloads
50
-89.01%
Maintainers
1
Weekly downloads
 
Created
Source

@master_jacky/react-native-vpn-detect

⚠️ Important Notice: This is a community-maintained backup of the original react-native-vpn-detect package. I am NOT the original author. This package is maintained for backup purposes with deep gratitude to the original author leekuo.

Original Author: leekuo
Original Repository: react-native-vpn-detect

A React Native library for detecting VPN and Proxy connections.

Getting started

npm install @master_jacky/react-native-vpn-detect --save

or

yarn add @master_jacky/react-native-vpn-detect

Mostly automatic installation (React Native < 0.60)

$ react-native link @master_jacky/react-native-vpn-detect

Auto-linking (React Native >= 0.60)

For React Native 0.60 and above, the package will be automatically linked. Just run:

cd ios && pod install

Manual installation

iOS

  • In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  • Go to node_modules@master_jacky/react-native-vpn-detect and add MasterJackyReactNativeVpnDetect.xcodeproj
  • In XCode, in the project navigator, select your project. Add libMasterJackyReactNativeVpnDetect.a to your project's Build PhasesLink Binary With Libraries
  • Run your project (Cmd+R)

Android

  • Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.masterjacky.reactnativevpndetect.MasterJackyReactNativeVpnDetectPackage; to the imports at the top of the file
  • Add new MasterJackyReactNativeVpnDetectPackage() to the list returned by the getPackages() method
  • Append the following lines to android/settings.gradle:
    include ':master-jacky-react-native-vpn-detect'
    project(':master-jacky-react-native-vpn-detect').projectDir = new File(rootProject.projectDir, 	'../node_modules/@master_jacky/react-native-vpn-detect/android')
    
  • Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':master-jacky-react-native-vpn-detect')
    

Usage

// Import Library
import Security from "@master_jacky/react-native-vpn-detect";

// Example Usage
async function checkSecurity() {
	try {
		const detectVPN = await Security.detectVPN();
		const detectProxy = await Security.detectProxy();
		
		console.log('VPN detected:', detectVPN);
		console.log('Proxy detected:', detectProxy);
	} catch (error) {
		console.error('Error detecting VPN/Proxy:', error);
	}
}

checkSecurity();

API

detectVPN()

Returns a Promise that resolves to a boolean indicating whether a VPN connection is detected.

detectProxy()

Returns a Promise that resolves to a boolean indicating whether a Proxy connection is detected.

License

MIT License - see the LICENSE file for details.

Credits

Original Author: leekuo
Original Repository: react-native-vpn-detect

This package is maintained as a community backup with gratitude to the original author.

Keywords

react

FAQs

Package last updated on 19 Sep 2025

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