
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-network-speed
Advanced tools
app的网络速度,而ios目前只能获取整个手机的网络速度,上网查了半天ios没找到能精确统计单个app网络速度的方法$ npm install react-native-network-speed --save
$ react-native link react-native-network-speed
Libraries ➜ Add Files to [your project's name]node_modules ➜ react-native-network-speed and add RNNetworkSpeed.xcodeprojlibRNNetworkSpeed.a to your project's Build Phases ➜ Link Binary With LibrariesCmd+R)<android/app/src/main/java/[...]/MainActivity.javaimport com.xh.networkspeed.RNNetworkSpeedPackage; to the imports at the top of the filenew RNNetworkSpeedPackage() to the list returned by the getPackages() methodandroid/settings.gradle:
include ':react-native-network-speed'
project(':react-native-network-speed').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-network-speed/android')
android/app/build.gradle:
compile project(':react-native-network-speed')
import networkSpeed from 'react-native-network-speed';
// start
networkSpeed.startListenNetworkSpeed(({downLoadSpeed,downLoadSpeedCurrent,upLoadSpeed,upLoadSpeedCurrent}) => {
console.log(downLoadSpeed + 'kb/s') // download speed for the entire device 整个设备的下载速度
console.log(downLoadSpeedCurrent + 'kb/s') // download speed for the current app 当前app的下载速度(currently can only be used on Android)
console.log(upLoadSpeed + 'kb/s') // upload speed for the entire device 整个设备的上传速度
console.log(upLoadSpeedCurrent + 'kb/s') // upload speed for the current app 当前app的上传速度(currently can only be used on Android)
})
// stop
networkSpeed.stopListenNetworkSpeed()
FAQs
get network speed for IOS, Android
We found that react-native-network-speed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.