
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
hubbleiq-sdk
Advanced tools
Note: v1.x
is compatible with Nodejs 18
. Please use latest versions.
The SDK communicates with your application through events
Install with yarn
or npm
.
Yarn:
yarn add hubbleiq-sdk
npm:
npm install --save hubbleiq-sdk
When you create the object, you need to put two parameters.
// import the component
import { HubbleIQLib } from "hubbleiq-sdk";
// and just use it
const hubbleIQLib = new HubbleIQLib("your apiKey", "your companyKey");
prop | type | default | comments |
---|---|---|---|
apiKey | string | not | Take it in admin panel, after registration on hubbleiq. |
companyKey | string | not | Take it in admin panel, after registration on hubbleiq. |
If you come across errors, please let us know so that we can improve our service.
Example with React. For start need import HubbleIQLib from "hubbleiq-sdk".
import { HubbleIQLib } from "hubbleiq-sdk";
const hubbleIQLib = new HubbleIQLib("apikey", "companyKey");
const [dSpeed, setDSpeed] = useState(0);
const [uSpeed, setUSpeed] = useState(0);
const [jitter, setJitter] = useState(0);
const [customHtml, setCustomHtml] = useState("");
const [isp, setIsp] = useState < any > "";
const [ipAddress, setIpAddress] = useState < any > "";
const [connectionHealth, setConnectionHealth] = useState < any > "";
const [customHeadline, setCustomHeadline] = useState < any > "";
const [token, setToken] = useState < any > "";
const [statusBackgroundColorForMsg, setStatusBackgroundColorForMsg] =
useState("0");
const [connectionMsg, setConnectionMsg] = useState("");
const [connectionMsgHeader, setConnectionMsgHeader] = useState("");
const [connectionStatus, setConnectionStatus] = useState("0");
useEffect(() => {
hubbleIQLib.init();
hubbleIQLib.checkInternetConnection();
hubbleIQLib.on("upload-measurement", (data) => {
setUSpeed(data.ClientToServerSpeed);
setJitter(data.Jitter);
});
hubbleIQLib.on("download-measurement", (data) => {
setDSpeed(data.ServerToClientSpeed);
setJitter(data.Jitter);
});
hubbleIQLib.on("complete", (data) => {
setDSpeed(data.ServerToClientSpeed);
setUSpeed(data.ClientToServerSpeed);
setJitter(data.Jitter);
});
hubbleIQLib.on("api-results", (data: any) => {
setCustomHtml(data.body);
setConnectionHealth(data.connectionHealth);
setCustomHeadline(data.headline);
setIsp(data.isp);
setIpAddress(data.ip_address);
setToken(data.token);
});
hubbleIQLib.on("connection-status", (data) => {
setConnectionStatus(data);
});
hubbleIQLib.on("connection-msg", (data) => {
setStatusBackgroundColorForMsg(data.color);
setConnectionMsg(data.msg);
setConnectionMsgHeader(data.header);
});
}, []);
Aditional: you can also use listening to other necessary events from the list of events.
async function startTest() {
if (dSpeed > 0 && uSpeed > 0 && jitter > 0) {
setDSpeed(0);
setUSpeed(0);
setJitter(0);
setLatency(0);
await hubbleIQLib.stop();
}
await hubbleIQLib.run();
}
const hubbleIQLib = new HubbleIQLib("apiKey", "companyKey");
hubbleIQLib.init();
await hubbleIQLib.run();
Emit Events:
await hubbleIQLib.stop();
This function must be started only once when the page is loaded, and it works continuously.
hubbleIQLib.checkInternetConnection();
Emit Events:
The function that checks packet loss.
await hubbleIQLib.calculatePacketLoss();
await hubbleIQLib.checkApplication();
If you have difficulties with the implementation, please contact us by email support@hubble.org
The module interacts with the UI through events. You can listen to the events:
event name | type of response | description |
---|---|---|
onstart | string | Server name |
complete | object | complete |
api-results | object | api-results |
connection-status | string | online or offline |
connection-stability | number | returned ms, example: 50 |
connection-msg | object | connection-msg |
upload-start | object | upload-start |
upload-measurement | object | upload-measurement |
upload-finished | object | upload-finished |
download-start | object | download-start |
download-measurement | object | download-measurement |
download-finished | object | download-finished |
test-results | object | test-results |
packet-loss | number | example: 0 |
@m-lab/ndt7
crypto-browserify
form-data
node-fetch
stream-browserify
tslib
web-worker
worker-plugin
Hubble teams.
For open source projects, say how it is licensed.
The project is under development and testing.
{
"c2sRate": number,
"s2cRate": number,
"MaxRTT": string,
"MinRTT": string,
"SumRTT": string,
"TCPInfo.Lost": string,
"ServerToClientSpeed": number,
"ClientToServerSpeed": number,
"Jitter": number,
"latency": number,
"CurRTO": string,
"SndLimTimeCwnd": string,
"SndLimTimeRwin": string,
...
}
{
"user_activity_id": number,
"overallStatus": string,
"status_description": string,
"headline": string,
"body": string (htmlformat),
"token": string,
"city": null,
"isp": null,
"ip_address": string,
"company_key": string,
"connectionHealth": {
"hdStreaming": string,
"streaming": string,
"internetVoice": string,
"screenSharing": string,
"fileSharing": string
}
}
Example api-results-example
{
color: string,
header: string,
msg: string
}
{
"ClientToServerSpeed": number,
"ServerToClientSpeed": number,
"Jitter": number,
"latency": number
}
{
"ClientToServerSpeed": number,
"ServerToClientSpeed": number,
"Jitter": number,
"latency": number
}
{
"user_activity_id": 1,
"overallStatus": "good",
"status_description": "very_good",
"headline": "Great internet connection...",
"body": "<div class=\"ext-subtitle\" style=\"margin-bottom: 20px;\">Your connection to the internet is fast, stable, and sufficient for working and gaming.</div>\n <div class=\"d-flex\">\n </div>",
"token": "user_token",
"city": null,
"isp": null,
"ip_address": "Ip address",
"company_key": "Company key",
"connectionHealth": {
"hdStreaming": "good",
"streaming": "good",
"internetVoice": "good",
"screenSharing": "good",
"fileSharing": "good"
}
}
2% // percentages of packet loss
FAQs
HubbleIQ testing SDK
The npm package hubbleiq-sdk receives a total of 0 weekly downloads. As such, hubbleiq-sdk popularity was classified as not popular.
We found that hubbleiq-sdk 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.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.